[Mesa-dev] [PATCH 4/6] i965: Add field brw_wm_prog_key.depth_modes[]
Chad Versace
chad.versace at intel.com
Sat Mar 12 17:49:38 PST 2011
... which holds the GL_DEPTH_TEXTURE_MODE of each enabled texture.
Signed-off-by: Chad Versace <chad.versace at intel.com>
---
src/mesa/drivers/dri/i965/brw_wm.c | 2 ++
src/mesa/drivers/dri/i965/brw_wm.h | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 390b3d6..d3e5107 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -364,6 +364,8 @@ static void brw_wm_populate_key( struct brw_context *brw,
SWIZZLE_NIL
};
+ key->depth_modes[i] = t->DepthMode;
+
/* GL_DEPTH_TEXTURE_MODE is normally handled through
* brw_wm_surface_state, but it applies to shadow compares as
* well and our shadow compares always return the result in
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index d9cae75..18801b5 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.h
+++ b/src/mesa/drivers/dri/i965/brw_wm.h
@@ -71,6 +71,7 @@ struct brw_wm_prog_key {
GLuint yuvtex_swap_mask:16; /* UV swaped */
GLushort tex_swizzles[BRW_MAX_TEX_UNIT];
+ GLenum depth_modes[BRW_MAX_TEX_UNIT]; /**< GL_DEPTH_TEXTURE_MODE */
GLushort drawable_height;
GLbitfield64 vp_outputs_written;
--
1.7.4
More information about the mesa-dev
mailing list