From 5172e082baf03fd97b098a759a96b06a4f21e203 Mon Sep 17 00:00:00 2001 From: foreman Date: Mon, 2 Mar 2015 17:54:56 -0500 Subject: [PATCH] P4 to Git Change 1126532 by gandryey@gera-dev-w7 on 2015/03/02 17:19:16 ECR #304775 - Don't report depth stencil write support Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_gl.cpp#46 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_gl_amd.hpp#16 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#117 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#88 edit [ROCm/clr commit: 50ff8414fbc4e0e3661c2f10f0043662a9cbcec1] --- projects/clr/opencl/api/opencl/amdocl/cl_gl.cpp | 11 ++++++----- projects/clr/opencl/api/opencl/amdocl/cl_gl_amd.hpp | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/projects/clr/opencl/api/opencl/amdocl/cl_gl.cpp b/projects/clr/opencl/api/opencl/amdocl/cl_gl.cpp index f4d32c92cf..705da52b54 100644 --- a/projects/clr/opencl/api/opencl/amdocl/cl_gl.cpp +++ b/projects/clr/opencl/api/opencl/amdocl/cl_gl.cpp @@ -1041,7 +1041,8 @@ checkForGLError(const Context &amdContext) bool getCLFormatFromGL(const Context& amdContext, GLint gliInternalFormat, cl_image_format* pclImageFormat, - int* piBytesPerPixel) + int* piBytesPerPixel, + cl_mem_flags flags) { bool bRetVal = false; @@ -1348,7 +1349,7 @@ CL_FLOAT break; } amd::Image::Format imageFormat(*pclImageFormat); - if (bRetVal && !imageFormat.isSupported(amdContext)) { + if (bRetVal && !imageFormat.isSupported(amdContext, 0, flags)) { bRetVal = false; } return bRetVal; @@ -1881,7 +1882,7 @@ clCreateFromGLTextureAMD( // Now get CL format from GL format and bytes per pixel int iBytesPerPixel = 0; - if (!getCLFormatFromGL(amdContext, glInternalFormat, &clImageFormat, &iBytesPerPixel)) { + if (!getCLFormatFromGL(amdContext, glInternalFormat, &clImageFormat, &iBytesPerPixel, clFlags)) { *not_null(errcode_ret) = CL_INVALID_IMAGE_FORMAT_DESCRIPTOR; LogWarning("\"texture\" format does not map to an appropriate CL image format"); return static_cast(0); @@ -1939,7 +1940,7 @@ clCreateFromGLTextureAMD( // Now get CL format from GL format and bytes per pixel int iBytesPerPixel = 0; - if (!getCLFormatFromGL(amdContext, glInternalFormat, &clImageFormat, &iBytesPerPixel)) { + if (!getCLFormatFromGL(amdContext, glInternalFormat, &clImageFormat, &iBytesPerPixel, clFlags)) { *not_null(errcode_ret) = CL_INVALID_IMAGE_FORMAT_DESCRIPTOR; LogWarning("\"texture\" format does not map to an appropriate CL image format"); return static_cast(0); @@ -2053,7 +2054,7 @@ clCreateFromGLRenderbufferAMD( // Now get CL format from GL format and bytes per pixel int iBytesPerPixel = 0; - if (!getCLFormatFromGL(amdContext, glInternalFormat, &clImageFormat, &iBytesPerPixel)) { + if (!getCLFormatFromGL(amdContext, glInternalFormat, &clImageFormat, &iBytesPerPixel, clFlags)) { *not_null(errcode_ret) = CL_INVALID_IMAGE_FORMAT_DESCRIPTOR; LogWarning("\"renderbuffer\" format does not map to an appropriate CL image format"); return (cl_mem) 0; diff --git a/projects/clr/opencl/api/opencl/amdocl/cl_gl_amd.hpp b/projects/clr/opencl/api/opencl/amdocl/cl_gl_amd.hpp index 6f05917e56..c79a523832 100644 --- a/projects/clr/opencl/api/opencl/amdocl/cl_gl_amd.hpp +++ b/projects/clr/opencl/api/opencl/amdocl/cl_gl_amd.hpp @@ -341,7 +341,9 @@ getCLFormatFromGL( const Context& amdContext, GLint gliInternalFormat, cl_image_format* pclImageFormat, - int* piBytesPerPixel); + int* piBytesPerPixel, + cl_mem_flags flags +); } //namespace amd