P4 to Git Change 1571960 by skeely@skeely_LC_linux on 2018/06/22 17:44:33
SWDEV-155716 - Fetch backing buffer of texture buffers for use with GL buffer APIs. Don't assume that texture buffer names will be the same as the backing store's buffer name. It is illegal (but unchecked) in GL to use a texture object name in a buffer object API. Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_gl.cpp#60 edit
Цей коміт міститься в:
@@ -1696,7 +1696,16 @@ cl_mem clCreateFromGLTextureAMD(Context& amdContext, cl_mem_flags clFlags, GLenu
|
||||
GLint size;
|
||||
|
||||
// In case target is GL_TEXTURE_BUFFER
|
||||
amdContext.glenv()->glBindBuffer_(glTarget, texture);
|
||||
GLint backingBuffer;
|
||||
clearGLErrors(amdContext);
|
||||
amdContext.glenv()->glGetTexLevelParameteriv_(
|
||||
glTarget, 0, GL_TEXTURE_BUFFER_DATA_STORE_BINDING, &backingBuffer);
|
||||
if (GL_NO_ERROR != (glErr = amdContext.glenv()->glGetError_())) {
|
||||
*not_null(errcode_ret) = CL_INVALID_IMAGE_FORMAT_DESCRIPTOR;
|
||||
LogWarning("Cannot get backing buffer for GL \"texture buffer\" object");
|
||||
return static_cast<cl_mem>(0);
|
||||
}
|
||||
amdContext.glenv()->glBindBuffer_(glTarget, backingBuffer);
|
||||
|
||||
// Get GL texture format and check if it's compatible with CL format
|
||||
clearGLErrors(amdContext);
|
||||
|
||||
Посилання в новій задачі
Заблокувати користувача