Mesa (main): r600: enable sb by default also for NIR

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 7 20:18:52 UTC 2022


Module: Mesa
Branch: main
Commit: e562fde86ad12580510d07b45ad0251bee940137
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e562fde86ad12580510d07b45ad0251bee940137

Author: Gert Wollny <gert.wollny at collabora.com>
Date:   Wed May 18 22:29:06 2022 +0200

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 <gert.wollny at collabora.com>
Reviewed-by: Filip Gawin <filip at gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17076>

---

 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;



More information about the mesa-commit mailing list