From e562fde86ad12580510d07b45ad0251bee940137 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 18 May 2022 22:29:06 +0200 Subject: [PATCH] r600: enable sb by default also for NIR Currently, the NIR code path doesn't use clause local registers, but these seem to help a lot with some work loads. Signed-off-by: Gert Wollny Reviewed-by: Filip Gawin Part-of: --- src/gallium/drivers/r600/r600_shader.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 487a4b79342..45c61e7fd05 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -179,8 +179,8 @@ int r600_pipe_shader_create(struct pipe_context *ctx, pipe_shader_type_from_mesa(sel->nir->info.stage); bool dump = r600_can_dump_shader(&rctx->screen->b, processor); - unsigned use_sb = !(rctx->screen->b.debug_flags & (DBG_NO_SB | DBG_NIR)) || - (rctx->screen->b.debug_flags & DBG_NIR_SB); + unsigned use_sb = !(rctx->screen->b.debug_flags & DBG_NO_SB) || + (rctx->screen->b.debug_flags & DBG_NIR_SB); unsigned sb_disasm; unsigned export_shader; @@ -263,6 +263,7 @@ int r600_pipe_shader_create(struct pipe_context *ctx, * with NTT) */ use_sb &= !(shader->shader.indirect_files & (1 << TGSI_FILE_TEMPORARY)); + use_sb &= !(shader->shader.indirect_files & (1 << TGSI_FILE_CONSTANT)); /* sb has scheduling assertion fails with interpolate_at. */ use_sb &= !shader->shader.uses_interpolate_at_sample;