freedreno/a2xx: fix compressed textures

Two problems:
* Multiply has higher priority than shift
* rsc->layout.format isn't initialized for a2xx

Fixes: 5a8718f01b ("freedreno: Make the slice pitch be bytes, not pixels.")

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5796>
This commit is contained in:
Jonathan Marek 2020-07-07 18:00:55 -04:00 committed by Marge Bot
parent 3021cb3215
commit 344e764b01
1 changed files with 2 additions and 2 deletions

View File

@ -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) |