From 648dfe88f493cceff80f9ecbfb7f7808ef1f76cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Ondra=C4=8Dka?= Date: Fri, 27 Mar 2026 10:42:42 +0100 Subject: [PATCH] r300: don't apply odd macroblock rounding to 3D textures This is intended only for NPOT 2D textures. Fixes: 0763fb947 ("r300: align macro-tiled stride-addressed textures in X") Part-of: --- src/gallium/drivers/r300/r300_texture_desc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r300/r300_texture_desc.c b/src/gallium/drivers/r300/r300_texture_desc.c index 773490a517c..58b3f8a0f99 100644 --- a/src/gallium/drivers/r300/r300_texture_desc.c +++ b/src/gallium/drivers/r300/r300_texture_desc.c @@ -140,7 +140,9 @@ static unsigned r300_texture_get_stride(struct r300_screen *screen, /* NPOT textures use stride addressing (TX_PITCH_EN). Keep macro-tiled * strides at an even number of macro tiles in X to prevent flakes. */ - if (tex->tex.macrotile[level] && tex->tex.uses_stride_addressing) { + if (tex->b.target != PIPE_TEXTURE_3D && + tex->tex.macrotile[level] && + tex->tex.uses_stride_addressing) { width = align(width, tile_width * 2); }