From f7217b99f243738f941a5d009c68387dfadcb50a Mon Sep 17 00:00:00 2001 From: Vadim Girlin Date: Sat, 24 Aug 2013 00:54:54 +0400 Subject: [PATCH] r600g: enable SB backend by default MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Vadim Girlin Reviewed-by: Marek Olšák Reviewed-by: Tom Stellard Reviewed-by: Christian König --- src/gallium/drivers/r600/r600_asm.c | 3 ++- src/gallium/drivers/r600/r600_pipe.c | 4 ++-- src/gallium/drivers/r600/r600_pipe.h | 2 +- src/gallium/drivers/r600/r600_shader.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index b8eedae457b..a0492a66e19 100644 --- a/src/gallium/drivers/r600/r600_asm.c +++ b/src/gallium/drivers/r600/r600_asm.c @@ -2281,7 +2281,8 @@ void *r600_create_vertex_fetch_shader(struct pipe_context *ctx, uint32_t *bytecode; int i, j, r, fs_size; struct r600_fetch_shader *shader; - unsigned sb_disasm = rctx->screen->debug_flags & (DBG_SB_DISASM | DBG_SB); + unsigned no_sb = rctx->screen->debug_flags & DBG_NO_SB; + unsigned sb_disasm = !no_sb || (rctx->screen->debug_flags & DBG_SB_DISASM); assert(count < 32); diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 2be5910fcb2..edd50f00b6d 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -67,8 +67,8 @@ static const struct debug_named_value debug_options[] = { { "noinvalrange", DBG_NO_DISCARD_RANGE, "Disable handling of INVALIDATE_RANGE map flags" }, /* shader backend */ - { "sb", DBG_SB, "Enable optimization of graphics shaders" }, - { "sbcl", DBG_SB_CS, "Enable optimization of compute shaders" }, + { "nosb", DBG_NO_SB, "Disable sb backend for graphics shaders" }, + { "sbcl", DBG_SB_CS, "Enable sb backend for compute shaders" }, { "sbdry", DBG_SB_DRY_RUN, "Don't use optimized bytecode (just print the dumps)" }, { "sbstat", DBG_SB_STAT, "Print optimization statistics for shaders" }, { "sbdump", DBG_SB_DUMP, "Print IR dumps after some optimization passes" }, diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 21d68c9387b..398ac89d0ae 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -249,7 +249,7 @@ typedef boolean (*r600g_dma_blit_t)(struct pipe_context *ctx, #define DBG_NO_ASYNC_DMA (1 << 19) #define DBG_NO_DISCARD_RANGE (1 << 20) /* shader backend */ -#define DBG_SB (1 << 21) +#define DBG_NO_SB (1 << 21) #define DBG_SB_CS (1 << 22) #define DBG_SB_DRY_RUN (1 << 23) #define DBG_SB_STAT (1 << 24) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index f7eab761bb0..9a23f01731a 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -140,7 +140,7 @@ int r600_pipe_shader_create(struct pipe_context *ctx, int r, i; uint32_t *ptr; bool dump = r600_can_dump_shader(rctx->screen, tgsi_get_processor_type(sel->tokens)); - unsigned use_sb = rctx->screen->debug_flags & DBG_SB; + unsigned use_sb = !(rctx->screen->debug_flags & DBG_NO_SB); unsigned sb_disasm = use_sb || (rctx->screen->debug_flags & DBG_SB_DISASM); shader->shader.bc.isa = rctx->isa; -- 2.30.2