diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-11-20 16:05:26 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-11-20 16:05:26 +0300 |
commit | 59ffe1c5b1155c22fd579685cc047ff6b7150811 (patch) | |
tree | 5807587aea63d279df5a99f279847e9e6d5c9238 /intern/cycles | |
parent | 3d447b6335f477fb58e3f2325eb3487a3d187dbb (diff) | |
parent | f2bb42a095acde57c540ff619c422132f491ef1c (diff) |
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/device/hip/device_impl.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/intern/cycles/device/hip/device_impl.cpp b/intern/cycles/device/hip/device_impl.cpp index 950fcaf1816..353a933e788 100644 --- a/intern/cycles/device/hip/device_impl.cpp +++ b/intern/cycles/device/hip/device_impl.cpp @@ -980,16 +980,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; @@ -1055,12 +1055,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) { + /* 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) { |