mesa: Fix RGBBuffers for renderbuffers with sized internal formats
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 22 Feb 2019 09:16:41 +0000 (01:16 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 25 Feb 2019 08:57:42 +0000 (00:57 -0800)
commit6921588d549af2408bb621a7569d832bb4639a56
tree4a1a203b80ac539d5cf678209b0ffefd16556110
parentda9c0307637b630a8178a8169ee5ede108a77a81
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 <tapani.palli@intel.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
src/mesa/main/fbobject.c