P4 to Git Change 1087490 by gandryey@gera-dev-w7 on 2014/10/14 19:07:04
EPR #403341 - [Regression][OCL] P2P SDI to GPU (RGBA) and P2P SDI to GPU (RGB) show corruption on sdi output - Enable GL Acquire/Release calls for more resource types. GL can enable color compression, but compute doesn't support it. Thus decompression can be required. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#194 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.h#41 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp#18 edit
This commit is contained in:
1 parent
af02d04050
commit
b4f7a4274b
3 files changed
+31
-30
No files matched your search
@@ -761,20 +761,23 @@ CALGSLDevice::resGLAcquire(CALvoid* GLplatformContext,
|
||||
//! @note: GSL device isn't thread safe
|
||||
amd::ScopedLock k(gslDeviceOps());
|
||||
|
||||
GLResource hRes;
|
||||
GLResource hRes = {0};
|
||||
osAssert(mbResHandle);
|
||||
hRes.mbResHandle = (GLuintp)mbResHandle;
|
||||
switch(type)
|
||||
switch(type)
|
||||
{
|
||||
case CAL_RES_GL_BUFFER_TYPE_TEXTURE:
|
||||
hRes.type = GL_RESOURCE_ATTACH_TEXTURE_AMD;
|
||||
break;
|
||||
break;
|
||||
case CAL_RES_GL_BUFFER_TYPE_RENDERBUFFER:
|
||||
hRes.type = GL_RESOURCE_ATTACH_RENDERBUFFER_AMD;
|
||||
break;
|
||||
break;
|
||||
case CAL_RES_GL_BUFFER_TYPE_VERTEXBUFFER:
|
||||
hRes.type = GL_RESOURCE_ATTACH_VERTEXBUFFER_AMD;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
// @note: No acquire for GL_RESOURCE_ATTACH_FRAMEBUFFER_AMD
|
||||
return true;
|
||||
}
|
||||
bool status = false;
|
||||
#ifdef ATI_OS_LINUX
|
||||
@@ -796,15 +799,31 @@ CALGSLDevice::resGLAcquire(CALvoid* GLplatformContext,
|
||||
|
||||
bool
|
||||
CALGSLDevice::resGLRelease(CALvoid* GLplatformContext,
|
||||
CALvoid* mbResHandle) const
|
||||
CALvoid* mbResHandle,
|
||||
CALuint type) const
|
||||
{
|
||||
//! @note: GSL device isn't thread safe
|
||||
amd::ScopedLock k(gslDeviceOps());
|
||||
|
||||
GLResource hRes;
|
||||
GLResource hRes = {0};
|
||||
osAssert(mbResHandle);
|
||||
bool status = false;
|
||||
hRes.mbResHandle = (GLuintp)mbResHandle;
|
||||
switch(type)
|
||||
{
|
||||
case CAL_RES_GL_BUFFER_TYPE_TEXTURE:
|
||||
hRes.type = GL_RESOURCE_ATTACH_TEXTURE_AMD;
|
||||
break;
|
||||
case CAL_RES_GL_BUFFER_TYPE_RENDERBUFFER:
|
||||
hRes.type = GL_RESOURCE_ATTACH_RENDERBUFFER_AMD;
|
||||
break;
|
||||
case CAL_RES_GL_BUFFER_TYPE_VERTEXBUFFER:
|
||||
hRes.type = GL_RESOURCE_ATTACH_VERTEXBUFFER_AMD;
|
||||
break;
|
||||
default:
|
||||
// @note: No release for GL_RESOURCE_ATTACH_FRAMEBUFFER_AMD
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef ATI_OS_LINUX
|
||||
//TODO : make sure the application GL context is current. if not no
|
||||
@@ -836,7 +855,7 @@ CALGSLDevice::resGLFree (
|
||||
//! @note: GSL device isn't thread safe
|
||||
amd::ScopedLock k(gslDeviceOps());
|
||||
|
||||
GLResource hRes;
|
||||
GLResource hRes = {0};
|
||||
|
||||
osAssert(mbResHandle);
|
||||
hRes.mbResHandle = (GLuintp)mbResHandle;
|
||||
|
||||
Reference in new issue
Block a user