From 97b778efe7949977b4e857413807d1efcad346aa Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 19 Dec 2011 10:34:20 +0000 Subject: 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 Reviewed-by: Brian Paul --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/gallium/auxiliary/tgsi') 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); -- cgit v1.2.3