Test glRenderbufferStorage with unsized depth format
authorNicolas Capens <capn@google.com>
Tue, 23 Jan 2018 23:16:39 +0000 (23:16 +0000)
committerNicolas Capens <capn@google.com>
Tue, 23 Jan 2018 23:24:16 +0000 (23:24 +0000)
The OpenGL ES 2.0 specification only supports formats from Table 4.5,
which are all sized internal formats, while ES 3.0 explicitly states
that "<internalformat> must be a sized internal format".

A color format (GL_RGBA) was already being negatively tested for, but
not a depth format.

modules/gles2/functional/es2fNegativeBufferApiTests.cpp

index 84894f9..4dfcb70 100644 (file)
@@ -393,6 +393,8 @@ void NegativeBufferApiTests::init (void)
                        expectError(GL_INVALID_ENUM);
                        glRenderbufferStorage(GL_RENDERBUFFER, GL_RGBA, 1, 1);
                        expectError(GL_INVALID_ENUM);
+                       glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, 1, 1);
+                       expectError(GL_INVALID_ENUM);
                        m_log << TestLog::EndSection;
 
                        m_log << TestLog::Section("", "GL_INVALID_VALUE is generated if width or height is less than zero.");