Ilia Mirkin
2014-May-10 21:53 UTC
[Nouveau] [PATCH] 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 <imirkin at alum.mit.edu> Cc: "10.2" <mesa-stable at lists.freedesktop.org> --- src/gallium/drivers/nouveau/nv50/nv50_surface.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_surface.c b/src/gallium/drivers/nouveau/nv50/nv50_surface.c index 8addefe..23613d8 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) { -- 1.8.5.5
Ben Skeggs
2014-May-11 23:21 UTC
[Nouveau] [Mesa-dev] [PATCH] nv50, nvc0: fix blit 3d path for 1d array textures
On Sun, May 11, 2014 at 7:53 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:> 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 <imirkin at alum.mit.edu> > Cc: "10.2" <mesa-stable at lists.freedesktop.org>Reviewed-by: Ben Skeggs <bskeggs at redhat.com>> --- > src/gallium/drivers/nouveau/nv50/nv50_surface.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/src/gallium/drivers/nouveau/nv50/nv50_surface.c b/src/gallium/drivers/nouveau/nv50/nv50_surface.c > index 8addefe..23613d8 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) { > -- > 1.8.5.5 > > _______________________________________________ > mesa-dev mailing list > mesa-dev at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Apparently Analagous Threads
- [RFC 4/9] tgsi: populate precise
- [RFC 0/9] Add precise/invariant semantics to TGSI
- [PATCH 0/2] nv50, nvc0: fix weirdo zs formats and their blits
- [PATCH] Autogenerate uureg opcode macros
- [PATCH mesa 0/3] tgsi and nouveau global / local / opencl-input mem support