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>2015-07-19 00:30:19 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-07-19 00:30:19 +0300
commit4bca8a6bc5fe34b7c7c58cbdbc3454bfc444d5be (patch)
tree3dcff4dac83d2324a1ac4f74b02e603a316c1e87 /intern/cycles/device/device_opencl.cpp
parentfaeac63f68f188e7a1e0f87748c1c95c9465f3d1 (diff)
Fix T45484: Regression OpenCL split: access violation
That was a primary school error caused by moving statements inside assert() which effectivly disabled crucial code in release builds.
Diffstat (limited to 'intern/cycles/device/device_opencl.cpp')
-rw-r--r--intern/cycles/device/device_opencl.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index 35810266218..2a596a288bf 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -548,7 +548,9 @@ public:
return NULL;
/* caller is going to release it when done with it, so retain it */
- assert(clRetainProgram(program) == CL_SUCCESS);
+ cl_int ciErr = clRetainProgram(program);
+ assert(ciErr == CL_SUCCESS);
+ (void)ciErr;
return program;
}
@@ -567,7 +569,9 @@ public:
/* increment reference count in OpenCL.
* The caller is going to release the object when done with it. */
- assert(clRetainContext(context) == CL_SUCCESS);
+ cl_int ciErr = clRetainContext(context);
+ assert(ciErr == CL_SUCCESS);
+ (void)ciErr;
}
/* see store_something comment */
@@ -600,7 +604,9 @@ public:
/* Increment reference count in OpenCL.
* The caller is going to release the object when done with it.
*/
- assert(clRetainProgram(program) == CL_SUCCESS);
+ cl_int ciErr = clRetainProgram(program);
+ assert(ciErr == CL_SUCCESS);
+ (void)ciErr;
}
/* Discard all cached contexts and programs. */