mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix rendering motion blur scenes with OptiX failing with CUDA_ERROR_INVALID_CONTEXT
Commit baeb11826b switched memory
allocation for the motion transform to use CUDA directly, instead of going
through abstractions. But no CUDA context was set active before those
were called, so the calls failed. This fixes that by binding a context beforehand.
This commit is contained in:
parent
4c1fb64123
commit
ff430dea66
1 changed files with 2 additions and 0 deletions
|
|
@ -1432,6 +1432,8 @@ class OptiXDevice : public Device {
|
|||
size_t motion_transform_size = sizeof(OptixSRTMotionTransform) +
|
||||
motion_keys * sizeof(OptixSRTData);
|
||||
|
||||
const CUDAContextScope scope(cuda_context);
|
||||
|
||||
CUdeviceptr motion_transform_gpu = 0;
|
||||
check_result_cuda_ret(cuMemAlloc(&motion_transform_gpu, motion_transform_size));
|
||||
as_mem.push_back(motion_transform_gpu);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue