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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-07-07 11:40:19 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-07-07 11:40:19 +0300
commitfee7f688c32eee152742dcda031675d42975e52f (patch)
treef1084b58c28960cddcf14e102ddd9adba5f17a42 /intern/cycles
parentd25ccf83ad562b43f918aa88e7d63760f2ebbad5 (diff)
Cycles: Fix ambiguity in call of min() function
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/device/opencl/opencl_base.cpp3
-rw-r--r--intern/cycles/device/opencl/opencl_split.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/device/opencl/opencl_base.cpp b/intern/cycles/device/opencl/opencl_base.cpp
index 49d7a228524..509da7a0a84 100644
--- a/intern/cycles/device/opencl/opencl_base.cpp
+++ b/intern/cycles/device/opencl/opencl_base.cpp
@@ -282,7 +282,8 @@ void OpenCLDeviceBase::mem_alloc(const char *name, device_memory& mem, MemoryTyp
clGetDeviceInfo(cdDevice, CL_DEVICE_MAX_MEM_ALLOC_SIZE, sizeof(cl_ulong), &max_alloc_size, NULL);
if(DebugFlags().opencl.mem_limit) {
- max_alloc_size = min(max_alloc_size, DebugFlags().opencl.mem_limit - stats.mem_used);
+ max_alloc_size = min(max_alloc_size,
+ cl_ulong(DebugFlags().opencl.mem_limit - stats.mem_used));
}
if(size > max_alloc_size) {
diff --git a/intern/cycles/device/opencl/opencl_split.cpp b/intern/cycles/device/opencl/opencl_split.cpp
index fdaca2252d9..76d9983e9a2 100644
--- a/intern/cycles/device/opencl/opencl_split.cpp
+++ b/intern/cycles/device/opencl/opencl_split.cpp
@@ -426,7 +426,8 @@ public:
clGetDeviceInfo(device->cdDevice, CL_DEVICE_MAX_MEM_ALLOC_SIZE, sizeof(cl_ulong), &max_buffer_size, NULL);
if(DebugFlags().opencl.mem_limit) {
- max_buffer_size = min(max_buffer_size, DebugFlags().opencl.mem_limit - device->stats.mem_used);
+ max_buffer_size = min(max_buffer_size,
+ cl_ulong(DebugFlags().opencl.mem_limit - device->stats.mem_used));
}
VLOG(1) << "Maximum device allocation size: "