mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
gles: Fix double frees. (#1323)
* gles: Fix double frees. Remove a few explicit frees in the redirect_buffers test which are already handled by a wrapper. * gles: Fix double frees A recent update to the object wrapper classes (#1268) changed the behavior of assigning to a wrapper, whereby the wrapped object is now released upon assignment. A couple of tests were manually calling clReleaseMemObject and then assigning `nullptr` to the wrapper, resulting in the wrapper calling clReleaseMemObject on an object that had already been destroyed. Co-authored-by: spauls <spauls@qti.qualcomm.com>
This commit is contained in:
committed by
GitHub
parent
02bf24d2b1
commit
ddca0f802b
@@ -205,10 +205,10 @@ int test_buffer_kernel(cl_context context, cl_command_queue queue, ExplicitType
|
||||
if (validate_only) {
|
||||
int result = (CheckGLObjectInfo(streams[0], CL_GL_OBJECT_BUFFER, (GLuint)inGLBuffer, (GLenum)0, 0) |
|
||||
CheckGLObjectInfo(streams[2], CL_GL_OBJECT_BUFFER, (GLuint)outGLBuffer, (GLenum)0, 0) );
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
clReleaseMemObject(streams[i]);
|
||||
streams[i] = NULL;
|
||||
streams[i].reset();
|
||||
}
|
||||
|
||||
glDeleteBuffers(1, &inGLBuffer); inGLBuffer = 0;
|
||||
@@ -287,8 +287,7 @@ int test_buffer_kernel(cl_context context, cl_command_queue queue, ExplicitType
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
clReleaseMemObject(streams[i]);
|
||||
streams[i] = NULL;
|
||||
streams[i].reset();
|
||||
}
|
||||
|
||||
glDeleteBuffers(1, &inGLBuffer); inGLBuffer = 0;
|
||||
|
||||
Reference in New Issue
Block a user