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 <tapani.palli@intel.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
for (i = -2; i < (GLint) ctx->Const.MaxColorAttachments; i++) {
struct gl_renderbuffer_attachment *att;
GLenum f;
for (i = -2; i < (GLint) ctx->Const.MaxColorAttachments; i++) {
struct gl_renderbuffer_attachment *att;
GLenum f;
mesa_format attFormat;
GLenum att_tex_target = GL_NONE;
mesa_format attFormat;
GLenum att_tex_target = GL_NONE;
minHeight = MIN2(minHeight, texImg->Height);
maxHeight = MAX2(maxHeight, texImg->Height);
f = texImg->_BaseFormat;
minHeight = MIN2(minHeight, texImg->Height);
maxHeight = MAX2(maxHeight, texImg->Height);
f = texImg->_BaseFormat;
attFormat = texImg->TexFormat;
numImages++;
attFormat = texImg->TexFormat;
numImages++;
minHeight = MIN2(minHeight, att->Renderbuffer->Height);
maxHeight = MAX2(minHeight, att->Renderbuffer->Height);
f = att->Renderbuffer->InternalFormat;
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++;
attFormat = att->Renderbuffer->Format;
numImages++;
if (_mesa_is_format_integer_color(attFormat))
fb->_IntegerBuffers |= (1 << i);
if (_mesa_is_format_integer_color(attFormat))
fb->_IntegerBuffers |= (1 << i);
+ if (baseFormat == GL_RGB)
fb->_RGBBuffers |= (1 << i);
if (type == GL_FLOAT && _mesa_get_format_max_bits(attFormat) > 16)
fb->_RGBBuffers |= (1 << i);
if (type == GL_FLOAT && _mesa_get_format_max_bits(attFormat) > 16)