diff options
author | Jonathan Marek <[email protected]> | 2020-07-07 18:00:55 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-07-08 20:46:08 +0000 |
commit | 344e764b01202d9894c793d393d060dc5530145b (patch) | |
tree | f6391cb23b686a4f689e696fc68551141dcc0210 | |
parent | 3021cb3215822aafb4021cf0e44b75b98a76ca86 (diff) |
freedreno/a2xx: fix compressed textures
Two problems:
* Multiply has higher priority than shift
* rsc->layout.format isn't initialized for a2xx
Fixes: 5a8718f01b397 ("freedreno: Make the slice pitch be bytes, not pixels.")
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5796>
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_texture.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_texture.c b/src/gallium/drivers/freedreno/a2xx/fd2_texture.c index 938fc6951d8..5545c416191 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_texture.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_texture.c @@ -187,8 +187,8 @@ fd2_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, A2XX_SQ_TEX_0_SIGN_Y(fmt.sign) | A2XX_SQ_TEX_0_SIGN_Z(fmt.sign) | A2XX_SQ_TEX_0_SIGN_W(fmt.sign) | - A2XX_SQ_TEX_0_PITCH(slice0->pitch >> fdl_cpp_shift(&rsc->layout) * - util_format_get_blockwidth(rsc->layout.format)) | + A2XX_SQ_TEX_0_PITCH((slice0->pitch >> fdl_cpp_shift(&rsc->layout)) * + util_format_get_blockwidth(prsc->format)) | COND(rsc->layout.tile_mode, A2XX_SQ_TEX_0_TILED); so->tex1 = A2XX_SQ_TEX_1_FORMAT(fmt.format) | |