From fd06b313b010adb6c6e9a7c30ab55163397f4d47 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Thu, 24 Nov 2022 16:39:35 +0100 Subject: [PATCH] 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: 735718ed33b2 ("etnaviv: move etna_layout_multiple into etnaviv_resource.c") Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index 3f4e3869832..ecb62e7d3aa 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c @@ -264,8 +264,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