diff options
author | Kenneth Graunke <[email protected]> | 2012-09-04 11:29:30 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-09-20 14:47:23 -0700 |
commit | c96828ecb46b5aee3121a018be365b738c35cbdc (patch) | |
tree | de5acfd7f833b8e50246dd50f69c168eb32ae4f8 /src/mesa/main/fbobject.c | |
parent | 8504f18c3dafb62d10c4f1572145ce3b8a6f3f5c (diff) |
mesa: Ignore SRGB when determining compatible resolve formats.
MSAA resolves and other blit-like operations ignore SRGB state anyway,
so we should be able to safely allow resolves between compatible
SRGB/linear formats like SRGBA8 and RGBA8888.
This matches the behavior of the nVidia and AMD binary drivers.
Fixes completely black rendering when using multisampling in L4D2.
NOTE: This is a candidate for the 9.0 branch.
Reviewed-by: Paul Berry <[email protected]>
Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r-- | src/mesa/main/fbobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 1736899cba1..9cde52ae690 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2792,7 +2792,8 @@ compatible_resolve_formats(const struct gl_renderbuffer *colorReadRb, { /* The simple case where we know the backing formats are the same. */ - if (colorReadRb->Format == colorDrawRb->Format) { + if (_mesa_get_srgb_format_linear(colorReadRb->Format) == + _mesa_get_srgb_format_linear(colorDrawRb->Format)) { return GL_TRUE; } |