Mesa (9.0): mesa: Ignore SRGB when determining compatible resolve formats.
Kenneth Graunke
kwg at kemper.freedesktop.org
Tue Sep 25 14:22:34 UTC 2012
Module: Mesa
Branch: 9.0
Commit: 82a08e2f469d7f7a09006aaf28290ece26dd979d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=82a08e2f469d7f7a09006aaf28290ece26dd979d
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Tue Sep 4 11:29:30 2012 -0700
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 <stereotype441 at gmail.com>
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
(cherry picked from commit c96828ecb46b5aee3121a018be365b738c35cbdc)
---
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 abc9d83..6d9bf35 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -2802,7 +2802,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;
}
More information about the mesa-commit
mailing list