Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-01-18 23:06:35 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-01-19 13:35:07 +0300
commit0fe41009f095835bda961a67697b36cbc8cade49 (patch)
tree5ac5379e8fb889f2dc4754043c76dfe2ba90c5d5 /intern/cycles/device/opencl
parent889321e22b70006a550c923c0ace18e75732e106 (diff)
Fix T53830: Cycles OpenCL debug assert on macOS,
This was probably harmless besides some unnecessary memory usage due to aligning allocations too much.
Diffstat (limited to 'intern/cycles/device/opencl')
-rw-r--r--intern/cycles/device/opencl/opencl_util.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/device/opencl/opencl_util.cpp b/intern/cycles/device/opencl/opencl_util.cpp
index 459d512172f..47d099a1f94 100644
--- a/intern/cycles/device/opencl/opencl_util.cpp
+++ b/intern/cycles/device/opencl/opencl_util.cpp
@@ -1137,14 +1137,14 @@ bool OpenCLInfo::get_driver_version(cl_device_id device_id,
int OpenCLInfo::mem_address_alignment(cl_device_id device_id)
{
- int base_align_bits;
+ int base_align_bytes;
if(clGetDeviceInfo(device_id,
- CL_DEVICE_MEM_BASE_ADDR_ALIGN,
+ CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE,
sizeof(int),
- &base_align_bits,
+ &base_align_bytes,
NULL) == CL_SUCCESS)
{
- return base_align_bits/8;
+ return base_align_bytes;
}
return 1;
}