summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-07-29 16:27:03 -0600
committerBrian Paul <brianp@vmware.com>2009-07-29 16:33:58 -0600
commitb9889517f5e7eceb14bd103bbdff9ff47ce6ed25 (patch)
tree3ce1520391909f877eefa91c9b1b464fac5d2b37 /src/mesa/state_tracker
parent9c4c9f2837e08c5f69bc0d12bce7a656b2291837 (diff)
gallium: fix SSE shadow texture instructions
When sampling a 2D shadow map we need 3 texcoord components, not 2. The third component (distance from light source) is compared against the texture sample to return the result (visible vs. occluded). Also, enable proper handling of TGSI_TEXTURE_SHADOW targets in Mesa->TGSI translation. There's a possibility for breakage in gallium drivers if they fail to handle the TGSI_TEXTURE_SHADOW1D / TGSI_TEXTURE_SHADOW2D / TGSI_TEXTURE_SHADOWRECT texture targets for TGSI_OPCODE_TEX/TXP instructions, but that should be easy to fix. With these changes, progs/demos/shadowtex.c renders properly again with softpipe.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 6380cd6b2a..c8fb39d558 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -158,12 +158,6 @@ map_texture_target(
GLuint textarget,
GLboolean shadow )
{
-#if 1
- /* XXX remove this line after we've checked that the rest of gallium
- * can handle the TGSI_TEXTURE_SHADOWx tokens.
- */
- shadow = GL_FALSE;
-#endif
switch( textarget ) {
case TEXTURE_1D_INDEX:
if (shadow)