Mesa (master): a5xx: improve 3d texture sampling

Ilia Mirkin imirkin at kemper.freedesktop.org
Tue Jul 4 22:28:53 UTC 2017


Module: Mesa
Branch: master
Commit: 02379b68f6106ba04428017c138d9467820be5b6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=02379b68f6106ba04428017c138d9467820be5b6

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Tue Jul  4 11:48:25 2017 -0400

a5xx: improve 3d texture sampling

At least the first level works now. Eventually the later levels stop
working, there appears to be some alignment issue. But this improves the
situation immensely.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Acked-by: Rob Clark <robdclark at gmail.com>

---

 src/gallium/drivers/freedreno/a5xx/fd5_texture.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_texture.c b/src/gallium/drivers/freedreno/a5xx/fd5_texture.c
index a546cfc332..87b69ea1c1 100644
--- a/src/gallium/drivers/freedreno/a5xx/fd5_texture.c
+++ b/src/gallium/drivers/freedreno/a5xx/fd5_texture.c
@@ -221,7 +221,6 @@ fd5_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
 	struct fd5_pipe_sampler_view *so = CALLOC_STRUCT(fd5_pipe_sampler_view);
 	struct fd_resource *rsc = fd_resource(prsc);
 	unsigned lvl, layers;
-	uint32_t sz2 = 0;
 
 	if (!so)
 		return NULL;
@@ -298,8 +297,6 @@ fd5_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
 			A5XX_TEX_CONST_5_DEPTH(layers / 6);
 		break;
 	case PIPE_TEXTURE_3D:
-		while (lvl < cso->u.tex.last_level && sz2 != rsc->slices[lvl+1].size0)
-			sz2 = rsc->slices[++lvl].size0;
 		so->texconst3 =
 			A5XX_TEX_CONST_3_ARRAY_PITCH(rsc->slices[lvl].size0);
 		so->texconst5 =




More information about the mesa-commit mailing list