summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-12-19 11:51:39 +0000
committerDave Airlie <[email protected]>2011-12-19 20:45:08 +0000
commit42696ba16fc548aa680b43a93e7b5929aa429d3c (patch)
tree261f272c4d982b0c74c1483592f648f03baf9617 /src/gallium
parent97b778efe7949977b4e857413807d1efcad346aa (diff)
softpipe: fix shadow1d tests.
This fixes the piglit glsl-1.10 shadow1D related tests. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 4115e357dba..8df81d14f87 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -1760,7 +1760,6 @@ exec_tex(struct tgsi_exec_machine *mach,
switch (inst->Texture.Texture) {
case TGSI_TEXTURE_1D:
- case TGSI_TEXTURE_SHADOW1D:
FETCH(&r[0], 0, CHAN_X);
if (modifier == TEX_MODIFIER_PROJECTED) {
@@ -1772,6 +1771,19 @@ exec_tex(struct tgsi_exec_machine *mach,
control,
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
break;
+ case TGSI_TEXTURE_SHADOW1D:
+ FETCH(&r[0], 0, CHAN_X);
+ FETCH(&r[2], 0, CHAN_Z);
+
+ if (modifier == TEX_MODIFIER_PROJECTED) {
+ micro_div(&r[0], &r[0], &r[3]);
+ }
+
+ fetch_texel(mach->Samplers[unit],
+ &r[0], &ZeroVec, &r[2], lod, /* S, T, P, LOD */
+ control,
+ &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
+ break;
case TGSI_TEXTURE_2D:
case TGSI_TEXTURE_RECT: