Commit 0fb0864e by Geoff Lang

Fix inverted validation check for glClearBuffer.

The validation would generate the correct errors to satisfy tests but would skip clears. TEST=conformance2/reading/format-r11f-g11f-b10f.html TEST=conformance2/reading/read-pixels-from-fbo-test.html TEST=conformance2/rendering/clearbuffer-sub-source.html TEST=deqp/functional/gles3/fbocolorbuffer/clear.html TEST=deqp/functional/gles3/fboinvalidate/sub.html TEST=deqp/functional/gles3/framebufferblit/default_framebuffer_*.html BUG=angleproject:1954 Change-Id: I0f220d06f98b630be5d27c7ffb1837d4ef29e0ac Reviewed-on: https://chromium-review.googlesource.com/558786Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 739bd8ba
...@@ -1557,7 +1557,7 @@ bool ValidateClearBufferiv(ValidationContext *context, ...@@ -1557,7 +1557,7 @@ bool ValidateClearBufferiv(ValidationContext *context,
if (context->getExtensions().webglCompatibility) if (context->getExtensions().webglCompatibility)
{ {
constexpr GLenum validComponentTypes[] = {GL_INT}; constexpr GLenum validComponentTypes[] = {GL_INT};
if (ValidateWebGLFramebufferAttachmentClearType( if (!ValidateWebGLFramebufferAttachmentClearType(
context, drawbuffer, validComponentTypes, ArraySize(validComponentTypes))) context, drawbuffer, validComponentTypes, ArraySize(validComponentTypes)))
{ {
return false; return false;
...@@ -1598,7 +1598,7 @@ bool ValidateClearBufferuiv(ValidationContext *context, ...@@ -1598,7 +1598,7 @@ bool ValidateClearBufferuiv(ValidationContext *context,
if (context->getExtensions().webglCompatibility) if (context->getExtensions().webglCompatibility)
{ {
constexpr GLenum validComponentTypes[] = {GL_UNSIGNED_INT}; constexpr GLenum validComponentTypes[] = {GL_UNSIGNED_INT};
if (ValidateWebGLFramebufferAttachmentClearType( if (!ValidateWebGLFramebufferAttachmentClearType(
context, drawbuffer, validComponentTypes, ArraySize(validComponentTypes))) context, drawbuffer, validComponentTypes, ArraySize(validComponentTypes)))
{ {
return false; return false;
...@@ -1632,7 +1632,7 @@ bool ValidateClearBufferfv(ValidationContext *context, ...@@ -1632,7 +1632,7 @@ bool ValidateClearBufferfv(ValidationContext *context,
{ {
constexpr GLenum validComponentTypes[] = {GL_FLOAT, GL_UNSIGNED_NORMALIZED, constexpr GLenum validComponentTypes[] = {GL_FLOAT, GL_UNSIGNED_NORMALIZED,
GL_SIGNED_NORMALIZED}; GL_SIGNED_NORMALIZED};
if (ValidateWebGLFramebufferAttachmentClearType( if (!ValidateWebGLFramebufferAttachmentClearType(
context, drawbuffer, validComponentTypes, ArraySize(validComponentTypes))) context, drawbuffer, validComponentTypes, ArraySize(validComponentTypes)))
{ {
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment