The too early OpenGL 4.2 drivers status

No only the Khronos Group has announced OpenGL 4.2 but AMD and NVIDIA have released their OpenGL 4.2 beta drivers at the same time. I didn't expect too much for them as usually OpenGL drivers released at the same time of specifications have they share of issues.

Both AMD and NVIDIA had time to update their OpenGL 4.2 drivers and has already fixed quite some issues, NVIDIA being incredibly fast once again with only two updates instead of three for AMD.

In the first AMD drivers, the OpenGL 4.2 context wasn't exposed so that we had to use extensions but some was missing. Their were just missing because as I could run a sample using the unexposed atomic counter. This is enough evidence for me to conclude that AMD is working with a version control system like SVN or Perforce and enable and disable features using #define to compensate for weak branching capabilities. That the kind of example which makes me love Git (or Mercurial but I use Git) even more where these issues can't happened! It's the 21th centuary, everyone should use a version control system that works unfortunately development and ecosystem legacy is a pain.

Actually, the best of these drivers update is that AMD has fixed a lot of bugs including the horrible crashes of the GLSL compiler when some errors occurred. We can finally take advantage of the great AMD debug output implementation!

AMD debug output goodness

It is fair to say that I am always developing on both AMD and NVIDIA platform as I have both a Radeon HD 5850 and a GeForce GTX 470 on my main machine and I hardly understand how we could work otherwise. However, there is obviously a "main display" where the application will be launch by default. This "main display" change all the time for me, there are periods where it's my AMD card and there are periods my NVIDIA card and there are some where "Ah, it's running on that card". What condition my choice could be a feature that I am exploring or a bug that annoyed me for example. This time I am back on AMD thanks to the amazing job that has been done by AMD to provide meaningful debug output log.

On NVIDIA implementation of the debug output, the log will only report the equivalent of glGetError and we will catch it in the debug output function using a break point. The benefit from glGetError is that all the errors are reported with no need to search it using a dycotomic method based on loads of glGetError everywhere...! (yes yes, we all did it as some point!) However this is still way too limited compare to the potential of this extension! AMD implementation of debug output is much more advanced and will return very often some relevant and detailled feedback. Here is two examples I ran into rescently and saved for this post:

1008: glBindVertexArray parameter 'array' has an invalid value '5': must be a valid vertex array object name (GL_INVALID_OPERATION) AMD debug output

2163: glNamedFramebufferTextureEXT failed because the image can not be attached to the referenced attachment point through the called function (GL_INVALID_OPERATION) AMD debug output

Isn't it great? Ok ok, it's not great it's freaking awesome and an OpenGL programmer's dream coming true!!!

In any case, if you are using OpenGL, I don't want to know any excuse but the first thing you must do is checking if GL_ARB_debug_output is available and initialing it. It's going to take you 15 minutes but save you hours!

White: Unsupported or untested.

Blue: The sample works but it doesn't follow the OpenGL specification.

Green: The sample works following the OpenGL specification.

Orange: The sample doesn't work correctly but a workaround is possible.

Red: The sample does't work and I haven't found any workaround.

Black: Really distubing problem!

For this report, I have indicated, as comments, the error fixed from the first OpenGL 4.2 drivers released by AMD and NVIDIA using "Beta 1" and "280.28" respectively. AMD OpenGL 4.2 driver beta 3 didn't fix any issue from this drivers status compare to Beta 2. These tests have been done on Seven 64 with the OpenGL Samples Pack 4.2.1.1 just released.

Notice that there are still issues on the shader interface matching which affect NVIDIA in the samples 420-sampler-fetch, 420-sampler-load and 420-image-unpack and AMD in the samples 410-primitive-tessellation-5 and 420-transform-feedback-instanced. I bet that if I was looking for it, I would break the drivers in many more ways as it only continues to expose the specification problem.

OpenGL Samples Pack 4.2.1.1, OpenGL specification tests AMD Catalyst 11.8 preview (26/07/2011) AMD Catalyst 11.8 OpenGL 4.2 beta 3 (30/08/2011) NVIDIA Forceware 280.19 (27/07/2011) NVIDIA Forceware 280.36 (24/08/2011) 420-transform-feedback-instanced Can't readback built-in variables. max_vertices affects the alignment in the transform feedback buffer 420-texture-storage 280.28: No trilinear filtering 420-texture-pixel-store Beta 1: Loading not correct 420-texture-compressed Texture storage with BPTC generates invalid operation errors 420-test-depth-conservative 420-sampler-fetch Bug on the shader interface matching 420-memory-barrier 420-image-unpack Unpack isn't correct? 280.36: Bug on the shader interface matching. 280.28: Parsing error of the binding layout qualifier 420-image-load 280.36: Flat color. 280.28: Parsing error of the binding layout qualifier 420-draw-base-instance 420-direct-state-access-ext 280.28: Invalid operation 420-buffer-uniform Unsupported uniform block array 420-atomic-counter glMapBufferRange on atomic counter fails The buffer must be initialized to be allocated 410-program-separate-dsa-ext 280.28: Invalid operation 410-program-binary 410-program-64 410-primitive-tessellation-5 Bug on the shader interface matching: Block member not active with linked separated program Bug on the shader interface matching: Block member not active with linked separated program 410-primitive-tessellation-2 410-primitive-instanced layout(location = 0) flat out vec4 Color; generates a parsing error. 410-fbo-multisample-dsa-ext 280.28: Invalid operation 410-fbo-layered 400-transform-feedback-stream layout(location = 0, stream = 0) result in error: layout location can only set once. Only half of the geometry rendered max_vertices affects the alignment in the transform feedback buffer 400-transform-feedback-object 400-texture-buffer-rgb 400-sampler-gather 400-sampler-fetch 400-sampler-array 400-program-varying-structs 400-program-varying-blocks 400-program-subroutine 400-program-64 400-primitive-tessellation 400-primitive-smooth-shading 400-primitive-instanced 400-fbo-rtt-texture-array 400-fbo-rtt 400-fbo-multisample 400-fbo-layered 400-draw-indirect 400-buffer-uniform Unsupported uniform block array Unsupported uniform block array 400-blend-rtt 330-texture-pixel-store 330-transform-feedback-separated GetTransformFeedbackVarying returns the wrong value for the size parameter 330-transform-feedback-interleaved GetTransformFeedbackVarying returns the wrong value for the size parameter 330-primitive-point-sprite glPointParameteri (GL_POINT_SPRITE_COORD_ORIGIN, ...) ignored glPointParameteri (GL_POINT_SPRITE_COORD_ORIGIN, ...) ignored Pop free clipping Pop free clipping 330-fbo-srgb A scissor test optimizations introduce a rendering bug 330-error-sampler-offset GLSL compiler crash 330-draw-without-data Location 0 must be bound Location 0 must be bound 330-buffer-type i32 vertex input data not supported i32 vertex input data not supported

OpenGL Samples Pack 4.2.1.1, proprietary features AMD Catalyst 11.8 preview (26/07/2011) AMD Catalyst 11.8 OpenGL 4.2 beta 3 (30/08/2011) NVIDIA Forceware 280.19 (27/07/2011) NVIDIA Forceware 280.36 (24/08/2011) 410-texture-copy-nv NV_copy_image not supported NV_copy_image not supported 410-primitive-bindless-nv NV_shader_buffer_load not supported NV_shader_buffer_load not supported 410-fbo-multisample-amd AMD_sample_positions not supported AMD_sample_positions not supported 410-fbo-multisample-dsa-nv NV_texture_multisample not supported NV_texture_multisample not supported 280.28: Invalid operation 410-draw-indirect-amd AMD_multi_draw_indirect not supported AMD_multi_draw_indirect not supported