diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-11 03:47:58 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-11 03:47:58 +0400 |
commit | 241fccaf6a113963598e5ad040e7e72c857bea00 (patch) | |
tree | fe4072418d5aefcb302350c59140783c4fe5db41 /intern/cycles/device | |
parent | 9e1ca2858920f059c957401160d0a9b75b6ff2bf (diff) |
Fix T37817: cycles CUDA detection problem on Windows with non-ascii paths.
Diffstat (limited to 'intern/cycles/device')
-rw-r--r-- | intern/cycles/device/device_cuda.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp index 8db915f769c..0fbb48cf431 100644 --- a/intern/cycles/device/device_cuda.cpp +++ b/intern/cycles/device/device_cuda.cpp @@ -355,7 +355,14 @@ public: /* open module */ cuda_push_context(); - CUresult result = cuModuleLoad(&cuModule, cubin.c_str()); + string cubin_data; + CUresult result; + + if (path_read_text(cubin, cubin_data)) + result = cuModuleLoadData(&cuModule, cubin_data.c_str()); + else + result = CUDA_ERROR_FILE_NOT_FOUND; + if(cuda_error_(result, "cuModuleLoad")) cuda_error_message(string_printf("Failed loading CUDA kernel %s.", cubin.c_str())); |