r300: don't apply odd macroblock rounding to 3D textures
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

This is intended only for NPOT 2D textures.

Fixes: 0763fb947 ("r300: align macro-tiled stride-addressed textures in X")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40674>
This commit is contained in:
Pavel Ondračka 2026-03-27 10:42:42 +01:00 committed by Marge Bot
parent f6b9e9c22b
commit 648dfe88f4

View file

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