etnaviv: always use RS align when GPU has TEXTURE_HALIGN feature

Due to a logic bug we didn't always up-align the resource when the GPU
has the TEXTURE_HALIGN feature, which broke the RS blit when we need
to blit into a sampler shadow from a multi-tiled render target.

Fixes: 735718ed33 ("etnaviv: move etna_layout_multiple into etnaviv_resource.c")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19991>
(cherry picked from commit fd06b313b0)
This commit is contained in:
Lucas Stach 2022-11-24 16:39:35 +01:00 committed by Eric Engestrom
parent 1869c2ebf5
commit a47ce0b938
2 changed files with 3 additions and 3 deletions

View file

@ -1174,7 +1174,7 @@
"description": "etnaviv: always use RS align when GPU has TEXTURE_HALIGN feature",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "735718ed33b2e2b029469faac6d5e9fc52a5c723"
},

View file

@ -203,8 +203,8 @@ etna_layout_multiple(const struct etna_screen *screen,
* engine's width. If not, we must not align resources used only for
* textures. If this GPU uses the BLT engine, never do RS align.
*/
bool rs_align = !specs->use_blt && !etna_resource_sampler_only(templat) &&
VIV_FEATURE(screen, chipMinorFeatures1, TEXTURE_HALIGN);
bool rs_align = !specs->use_blt && (!etna_resource_sampler_only(templat) ||
VIV_FEATURE(screen, chipMinorFeatures1, TEXTURE_HALIGN));
int msaa_xscale = 1, msaa_yscale = 1;
/* Compressed textures are padded to their block size, but we don't have