OSDN Git Service

blit: Don't take into account the Mesa format when checking MSRT blit
authorNeil Roberts <neil@linux.intel.com>
Thu, 19 Nov 2015 14:29:19 +0000 (15:29 +0100)
committerNeil Roberts <neil@linux.intel.com>
Thu, 10 Dec 2015 11:03:58 +0000 (11:03 +0000)
commitba67739b662eaf68f7a1117005e20079b2653044
treec46b42a66998a1b1a47c70567fe52d457144269f
parent3f10774cbab1e803f8aa3d6d24f8f6f98b8128c3
blit: Don't take into account the Mesa format when checking MSRT blit

According to the GLES3 spec, blitting between multisample FBOs with
different internal formats should not be allowed. The
compatible_resolve_formats function implements this check. Previously
it had a shortcut where if the Mesa formats of the two renderbuffers
were the same then it would assume the blit is ok. However some
drivers map different internal formats to the same Mesa format, for
example it might implement both GL_RGB and GL_RGBA textures with
MESA_FORMAT_R8G8B8A_UNORM. The function is used to generate a GL error
according to what the GL spec requires so the blit should not be
allowed in that case. This patch just removes the shortcut so that it
only ever looks at the internal format.

Note that I posted a related patch to disable this check altogether
for desktop GL. However this function is still used on GLES3 because
there are conformance tests that require this behaviour so this patch
is still useful.

Cc: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/blit.c