summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv50
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-05-10 17:51:21 -0400
committerIlia Mirkin <[email protected]>2014-05-11 19:26:31 -0400
commit8baed872126b331aa8d789b78986c0100c6d853a (patch)
treefbbacbce0f4d064d30a95058cb4bb7cae1738ed7 /src/gallium/drivers/nouveau/nv50
parent4467c0c9fbf2c13b6c73a002e8247448ee12d4c4 (diff)
nv50,nvc0: fix blit 3d path for 1d array textures
Need to adjust coordinates since the shader receives the array index as depth in z, but the TEX instruction expects it to be the second coordinate for a 1D array texture. This fixes fbo-generatemipmap-array. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Cc: "10.2" <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50')
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_surface.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_surface.c b/src/gallium/drivers/nouveau/nv50/nv50_surface.c
index df3bc86fb48..d02f5fed82c 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_surface.c
@@ -698,6 +698,12 @@ nv50_blitter_make_fp(struct pipe_context *pipe,
tc = ureg_DECL_fs_input(
ureg, TGSI_SEMANTIC_GENERIC, 0, TGSI_INTERPOLATE_LINEAR);
+ if (ptarg == PIPE_TEXTURE_1D_ARRAY) {
+ /* Adjust coordinates. Depth is in z, but TEX expects it to be in y. */
+ tc = ureg_swizzle(tc, TGSI_SWIZZLE_X, TGSI_SWIZZLE_Z,
+ TGSI_SWIZZLE_Z, TGSI_SWIZZLE_Z);
+ }
+
data = ureg_DECL_temporary(ureg);
if (tex_s) {