freedreno: Make the slice pitch be bytes, not pixels.
[mesa.git] / src / gallium / drivers / freedreno / a4xx / fd4_texture.c
index de4e2d271440f9f0f0431c2011e515f48babf128..a9d7d0d43ebc2da6ddf083dcfaa5b3df3a0f1052 100644 (file)
@@ -277,8 +277,7 @@ fd4_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
                        A4XX_TEX_CONST_1_HEIGHT(u_minify(prsc->height0, lvl));
                so->texconst2 =
                        A4XX_TEX_CONST_2_FETCHSIZE(fd4_pipe2fetchsize(format)) |
-                       A4XX_TEX_CONST_2_PITCH(
-                               util_format_get_nblocksx(format, slice->pitch) * rsc->layout.cpp);
+                       A4XX_TEX_CONST_2_PITCH(slice->pitch);
                so->offset = fd_resource_offset(rsc, lvl, cso->u.tex.first_layer);
        }