r300: enable tiling for scanout to fix DRI3 performance

Also don't use square tiling for scanout because the DDX doesn't use it
either.

Reviewed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28209>
This commit is contained in:
Marek Olšák 2024-03-13 17:24:28 -04:00 committed by Marge Bot
parent 58b773bd9a
commit f424ef1801
3 changed files with 5 additions and 4 deletions

View file

@ -374,7 +374,6 @@ spec@!opengl 1.0@depth-clear-precision-check@depth24,Fail
spec@!opengl 1.0@depth-clear-precision-check@depth24_stencil8,Fail
spec@!opengl 1.0@depth-clear-precision-check@depth32,Fail
spec@!opengl 1.0@gl-1.0-blend-func,Fail
spec@!opengl 1.0@gl-1.0-drawbuffer-modes,Fail
spec@!opengl 1.0@gl-1.0-edgeflag,Fail
spec@!opengl 1.0@gl-1.0-edgeflag-quads,Fail
spec@!opengl 1.0@gl-1.0-no-op-paths,Fail

View file

@ -1120,8 +1120,8 @@ struct pipe_resource *r300_texture_create(struct pipe_screen *screen,
struct r300_screen *rscreen = r300_screen(screen);
enum radeon_bo_layout microtile, macrotile;
if ((base->flags & R300_RESOURCE_FLAG_TRANSFER) ||
(base->bind & (PIPE_BIND_SCANOUT | PIPE_BIND_LINEAR))) {
if (base->flags & R300_RESOURCE_FLAG_TRANSFER ||
base->bind & PIPE_BIND_LINEAR) {
microtile = RADEON_LAYOUT_LINEAR;
macrotile = RADEON_LAYOUT_LINEAR;
} else {

View file

@ -527,7 +527,9 @@ static void r300_setup_tiling(struct r300_screen *screen,
break;
case 2:
tex->tex.microtile = RADEON_LAYOUT_SQUARETILED;
tex->tex.microtile =
tex->b.bind & PIPE_BIND_SCANOUT ?
RADEON_LAYOUT_TILED : RADEON_LAYOUT_SQUARETILED;
break;
}