According to the 1.1 spec section 9.8.3.1 interop should support the following opengl internal formats:
GL_RGBA8 CL_RGBA,
GL_RGBA,
GL_UNSIGNED_INT_8_8_8_8_REV
GL_BGRA,
GL_UNSIGNED_INT_8_8_8_8_REV
GL_RGBA16
GL_RGBA8I, GL_RGBA8I_EXT
GL_RGBA16I, GL_RGBA16I_EXT
GL_RGBA32I, GL_RGBA32I_EXT
GL_RGBA8UI, GL_RGBA8UI_EXT
GL_RGBA16UI, GL_RGBA16UI_EXT
GL_RGBA32UI, GL_RGBA32UI_EXT
In my testing it only supports the following:
GL_RGBA8
GL_RGBA
GL_RGBA16
GL_RGBA16F
GL_RGBA32F
Any other formats return the correct return code for non-support (CL_INVALID_IMAGE_FORMAT_DESCRIPTOR) however the spec doesn't allow for a lack of support for the above types.
Is there somewhere to submit an official bug/non to spec issue with AMD?
Just wanted to check if you got an update on this Micah?
Thanks!
Micah,
Just a quick check to see if you had a response yet on this.
Thanks.
Did anyone ever get further with this issue? I have the same problem and wonder whether there was a solution.
Thanks,
Please post a copy of your code (as zip file) so that we can reproduce here.
Please include the following details as well.
Platform - win32 / win64 / lin32 / lin64 or some other?
Win7 or win vista or Win8.. Similarly for linux, your distribution
Version of driver
CPU or GPU Target?
CPU/GPU details of your hardware
Hi sorry I have taken a while to respond to this - I've been quite busy.
This issue still persists. I am trying to use a GL_RGBA16UI renderbuffer from within OpenCL.
I have attached a file, main.zip which contains a single source file, main.cpp. It can be built (On linux) with
g++ -o main main.cpp -lm -lGL -lGLEW -lglut -lOpenCL
This is a fairly bare program, which should just create a GL context, then a CL context, then a renderbuffer, and then add this to the CL context. If successful it should just fall through, otherwise it will print an error code when creating the renderbuffer. This always throws an error -39 (CL_INVALID_IMAGE_FORMAT_DESCRIPTOR) whenever I run it. This is (Presumably) because my driver does not support GL_RGBA16UI renderbuffers, despite them being in the spec.
My vital stats are:
Radeon HD 7950, Ubuntu linux 12.04. Drivers installed from the AMD site - they are the latest stable - 9.012, catalyst version 2.18. AMD SDK V2.8.
If you require any more info please let me know. Also if you can spot any glaring errors in the code that would be helpful - I think the lack of GL_RGBA16UI renderbuffers is a pretty big deal so I can't be the only person to have noticed... I'm hoping it's just an error with my code.
Best regards,
Andrew
Hi AndrewChambers,
Thanks for the testcase. At this moment it looks to be valid bug to me. I was able to run it after installing a few more packages on my linux machine. Here are my results:
cas@cas-MS-7751:~/Downloads/GLCode$ g++ -o main -I "/opt/AMDAPP/include/" main.cpp -L "/opt/AMDAPP/lib/x86_64/" -lm -lGL -lGLEW -lglut -lOpenCL
cas@cas-MS-7751:~/Downloads/GLCode$ ./main
making buffers...
Renderbuffer fail, error code: -39
cas@cas-MS-7751:~/Downloads/GLCode$ vim main (Modifying the main.cpp to use GL_RGBA16 format)
cas@cas-MS-7751:~/Downloads/GLCode$ vim main.cpp
cas@cas-MS-7751:~/Downloads/GLCode$ g++ -o main -I "/opt/AMDAPP/include/" main.cpp -L "/opt/AMDAPP/lib/x86_64/" -lm -lGL -lGLEW -lglut -lOpenCL
cas@cas-MS-7751:~/Downloads/GLCode$ ./main
making buffers...
cas@cas-MS-7751:~/Downloads/GLCode$
I had installed freeglut3-dev (freeglut.h) and libglew1-mesa-dev packages, for compilation. I am quite new to this side of OpenCL myself. But as i understand some RenderBuffer formats are not supported. I tried changing your code to add a format which is supported. Maybe you can check the code,
and write a test to know what all formats are currently supported and what all formats are not supported. PFA modified main.cpp.
For reference, I had ran this testcase on HD 7770 with 13.1 driver in Ubuntu 12.04, with APP SDK 2.8.
This issue is no longer reproducible on the latest driver. Let us know if you continue to see this issue.