diff options
author | Kenneth Graunke <[email protected]> | 2019-02-22 01:16:41 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-25 00:57:42 -0800 |
commit | 6921588d549af2408bb621a7569d832bb4639a56 (patch) | |
tree | 4a1a203b80ac539d5cf678209b0ffefd16556110 /src/mesa | |
parent | da9c0307637b630a8178a8169ee5ede108a77a81 (diff) |
mesa: Fix RGBBuffers for renderbuffers with sized internal formats
For texture attachments, 'f' is texImg->_BaseFormat, but for
renderbuffer attachments, 'f' is att->Renderbuffer->InternalFormat.
InternalFormat may be something like GL_RGB8, which causes our
(f == GL_RGB) check to fail. Switch to using a proper _BaseFormat,
which drops the size.
Fixes dEQP-GLES31.functional.draw_buffers_indexed.random.
max_required_draw_buffers.15 on iris when combined with a driver fix.
Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Timur Kristóf <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/fbobject.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 1298e09e1b0..047ef4ee395 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1014,6 +1014,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, for (i = -2; i < (GLint) ctx->Const.MaxColorAttachments; i++) { struct gl_renderbuffer_attachment *att; GLenum f; + GLenum baseFormat; mesa_format attFormat; GLenum att_tex_target = GL_NONE; @@ -1068,6 +1069,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, minHeight = MIN2(minHeight, texImg->Height); maxHeight = MAX2(maxHeight, texImg->Height); f = texImg->_BaseFormat; + baseFormat = f; attFormat = texImg->TexFormat; numImages++; @@ -1100,6 +1102,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, minHeight = MIN2(minHeight, att->Renderbuffer->Height); maxHeight = MAX2(minHeight, att->Renderbuffer->Height); f = att->Renderbuffer->InternalFormat; + baseFormat = att->Renderbuffer->_BaseFormat; attFormat = att->Renderbuffer->Format; numImages++; @@ -1151,7 +1154,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, if (_mesa_is_format_integer_color(attFormat)) fb->_IntegerBuffers |= (1 << i); - if (f == GL_RGB) + if (baseFormat == GL_RGB) fb->_RGBBuffers |= (1 << i); if (type == GL_FLOAT && _mesa_get_format_max_bits(attFormat) > 16) |