From 27fec0366006285b63eae9e0fa9c13348cf48b88 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") (cherry picked from commit 648dfe88f493cceff80f9ecbfb7f7808ef1f76cf) Part-of: --- .pick_status.json | 2 +- src/gallium/drivers/r300/r300_texture_desc.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 4c3bcd621fd..6e6c1965cac 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -684,7 +684,7 @@ "description": "r300: don't apply odd macroblock rounding to 3D textures", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "0763fb947a338c50eef69f5af6d9a20204ef4b1b", "notes": null 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); }