From f2bb42a095acde57c540ff619c422132f491ef1c Mon Sep 17 00:00:00 2001 From: Sayak Biswas Date: Sat, 20 Nov 2021 01:26:30 +0100 Subject: Fix T92984: Cycles HIP crash with smoke volumes This fixes the the app crash happening when trying to render smoke as a dense 3D texture. The changes are related to matching up hipew with the actual HIP headers. Differential Revision: https://developer.blender.org/D13296 --- intern/cycles/device/hip/device_impl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'intern/cycles/device/hip/device_impl.cpp') diff --git a/intern/cycles/device/hip/device_impl.cpp b/intern/cycles/device/hip/device_impl.cpp index d7f68934b46..78ccf318cf8 100644 --- a/intern/cycles/device/hip/device_impl.cpp +++ b/intern/cycles/device/hip/device_impl.cpp @@ -990,16 +990,16 @@ void HIPDevice::tex_alloc(device_texture &mem) << string_human_readable_number(mem.memory_size()) << " bytes. (" << string_human_readable_size(mem.memory_size()) << ")"; - hip_assert(hipArray3DCreate(&array_3d, &desc)); + hip_assert(hipArray3DCreate((hArray*)&array_3d, &desc)); if (!array_3d) { return; } HIP_MEMCPY3D param; - memset(¶m, 0, sizeof(param)); + memset(¶m, 0, sizeof(HIP_MEMCPY3D)); param.dstMemoryType = hipMemoryTypeArray; - param.dstArray = &array_3d; + param.dstArray = array_3d; param.srcMemoryType = hipMemoryTypeHost; param.srcHost = mem.host_pointer; param.srcPitch = src_pitch; @@ -1065,13 +1065,13 @@ void HIPDevice::tex_alloc(device_texture &mem) if (mem.info.data_type != IMAGE_DATA_TYPE_NANOVDB_FLOAT && mem.info.data_type != IMAGE_DATA_TYPE_NANOVDB_FLOAT3) { - /* Kepler+, bindless textures. */ + /* Bindless textures. */ hipResourceDesc resDesc; memset(&resDesc, 0, sizeof(resDesc)); if (array_3d) { resDesc.resType = hipResourceTypeArray; - resDesc.res.array.h_Array = &array_3d; + resDesc.res.array.h_Array = array_3d; resDesc.flags = 0; } else if (mem.data_height > 0) { -- cgit v1.2.3