[Bf-blender-cvs] [4bca8a6] master: Fix T45484: Regression OpenCL split: access violation
Sergey Sharybin
noreply at git.blender.org
Sat Jul 18 23:32:47 CEST 2015
Commit: 4bca8a6bc5fe34b7c7c58cbdbc3454bfc444d5be
Author: Sergey Sharybin
Date: Sat Jul 18 23:30:19 2015 +0200
Branches: master
https://developer.blender.org/rB4bca8a6bc5fe34b7c7c58cbdbc3454bfc444d5be
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.
===================================================================
M intern/cycles/device/device_opencl.cpp
===================================================================
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index 3581026..2a596a2 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. */
More information about the Bf-blender-cvs
mailing list