summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-12-19 10:34:20 +0000
committerDave Airlie <[email protected]>2011-12-19 20:44:47 +0000
commit97b778efe7949977b4e857413807d1efcad346aa (patch)
tree61fa94e3114b68fbcf931d76d9f4fbbbb67bee2a /src/gallium/auxiliary
parentf4ab1783b390cd8ff7f4b1e7ba9fc15893e2d69c (diff)
softpipe: fix shadow 2d texture array sampling
The 4th texcoord is used in this case for the comparison. This fixes piglit glsl-fs-shadow2DArray* on softpipe. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index a44ba8093db..4115e357dba 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -1822,7 +1822,6 @@ exec_tex(struct tgsi_exec_machine *mach,
break;
case TGSI_TEXTURE_2D_ARRAY:
- case TGSI_TEXTURE_SHADOW2D_ARRAY:
FETCH(&r[0], 0, CHAN_X);
FETCH(&r[1], 0, CHAN_Y);
FETCH(&r[2], 0, CHAN_Z);
@@ -1837,7 +1836,17 @@ exec_tex(struct tgsi_exec_machine *mach,
control,
&r[0], &r[1], &r[2], &r[3]); /* outputs */
break;
+ case TGSI_TEXTURE_SHADOW2D_ARRAY:
+ FETCH(&r[0], 0, CHAN_X);
+ FETCH(&r[1], 0, CHAN_Y);
+ FETCH(&r[2], 0, CHAN_Z);
+ FETCH(&r[3], 0, CHAN_W);
+ fetch_texel(mach->Samplers[unit],
+ &r[0], &r[1], &r[2], &r[3], /* S, T, P, LOD */
+ control,
+ &r[0], &r[1], &r[2], &r[3]); /* outputs */
+ break;
case TGSI_TEXTURE_3D:
case TGSI_TEXTURE_CUBE:
FETCH(&r[0], 0, CHAN_X);