From 1d4a211d6c969ef4d25cc9714c8db9dc2ebe6d32 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 14 Mar 2025 14:51:49 +0100 Subject: [PATCH] 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 --- intern/cycles/device/hiprt/device_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intern/cycles/device/hiprt/device_impl.cpp b/intern/cycles/device/hiprt/device_impl.cpp index e0176edecde..9ff3f5bef01 100644 --- a/intern/cycles/device/hiprt/device_impl.cpp +++ b/intern/cycles/device/hiprt/device_impl.cpp @@ -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;