Mesa (7.10): i965: Fix tex_swizzle when depth mode is GL_RED
Kenneth Graunke
kwg at kemper.freedesktop.org
Wed Mar 23 03:29:35 UTC 2011
Module: Mesa
Branch: 7.10
Commit: b8a077cee0f3856d5c3d4468918513515bbd0dcb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8a077cee0f3856d5c3d4468918513515bbd0dcb
Author: Chad Versace <chad.versace at intel.com>
Date: Sat Mar 12 17:49:41 2011 -0800
i965: Fix tex_swizzle when depth mode is GL_RED
Change swizzle from (x000) to (x001).
Signed-off-by: Chad Versace <chad.versace at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_wm.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 656501b..4f4cd9d 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -379,9 +379,10 @@ static void brw_wm_populate_key( struct brw_context *brw,
} else if (t->DepthMode == GL_LUMINANCE) {
swizzles[3] = SWIZZLE_ONE;
} else if (t->DepthMode == GL_RED) {
+ /* See table 3.23 of the GL 3.0 spec. */
swizzles[1] = SWIZZLE_ZERO;
swizzles[2] = SWIZZLE_ZERO;
- swizzles[3] = SWIZZLE_ZERO;
+ swizzles[3] = SWIZZLE_ONE;
}
}
More information about the mesa-commit
mailing list