Fix: Incorrect check of device pointers in HIP-RT code
The code was checking the same device pointer instead of checking that both allocations are successful. Pull Request: https://projects.blender.org/blender/blender/pulls/135977
This commit is contained in:
committed by
Sergey Sharybin
parent
fdd402c3d8
commit
1d4a211d6c
@@ -1109,7 +1109,7 @@ hiprtScene HIPRTDevice::build_tlas(BVHHIPRT *bvh,
|
||||
|
||||
custom_prim_info.copy_to_device();
|
||||
custom_prim_info_offset.copy_to_device();
|
||||
if (custom_prim_info.device_pointer == 0 || custom_prim_info.device_pointer == 0) {
|
||||
if (custom_prim_info.device_pointer == 0 || custom_prim_info_offset.device_pointer == 0) {
|
||||
set_error("Failed to allocate custom_prim_info_offset for TLAS");
|
||||
hiprtDestroyScene(hiprt_context, scene);
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user