summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-09-22 15:34:12 +0200
committerMarek Olšák <[email protected]>2013-09-29 15:18:09 +0200
commit0cb9de1dd078395d541c32c0de81ea4f05147baa (patch)
treee6564dc7b0f5b9d058b64bec4074e0f971769f18 /src/gallium/drivers/r600
parentba650ccf91a103d90d45b5927a8a9220e222cfc5 (diff)
radeonsi: move debug options to R600_DEBUG
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/r600_shader.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index a5d330e5f34..71818c7f0dc 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -84,33 +84,6 @@ static void r600_add_gpr_array(struct r600_shader *ps, int start_gpr,
ps->arrays[n].gpr_count = size;
}
-static unsigned tgsi_get_processor_type(const struct tgsi_token *tokens)
-{
- struct tgsi_parse_context parse;
-
- if (tgsi_parse_init( &parse, tokens ) != TGSI_PARSE_OK) {
- debug_printf("tgsi_parse_init() failed in %s:%i!\n", __func__, __LINE__);
- return ~0;
- }
- return parse.FullHeader.Processor.Processor;
-}
-
-static bool r600_can_dump_shader(struct r600_screen *rscreen, unsigned processor_type)
-{
- switch (processor_type) {
- case TGSI_PROCESSOR_VERTEX:
- return (rscreen->b.debug_flags & DBG_VS) != 0;
- case TGSI_PROCESSOR_GEOMETRY:
- return (rscreen->b.debug_flags & DBG_GS) != 0;
- case TGSI_PROCESSOR_FRAGMENT:
- return (rscreen->b.debug_flags & DBG_PS) != 0;
- case TGSI_PROCESSOR_COMPUTE:
- return (rscreen->b.debug_flags & DBG_CS) != 0;
- default:
- return false;
- }
-}
-
static void r600_dump_streamout(struct pipe_stream_output_info *so)
{
unsigned i;
@@ -139,7 +112,7 @@ int r600_pipe_shader_create(struct pipe_context *ctx,
struct r600_pipe_shader_selector *sel = shader->selector;
int r, i;
uint32_t *ptr;
- bool dump = r600_can_dump_shader(rctx->screen, tgsi_get_processor_type(sel->tokens));
+ bool dump = r600_can_dump_shader(&rctx->screen->b, sel->tokens);
unsigned use_sb = !(rctx->screen->b.debug_flags & DBG_NO_SB);
unsigned sb_disasm = use_sb || (rctx->screen->b.debug_flags & DBG_SB_DISASM);
@@ -1122,7 +1095,7 @@ static int r600_shader_from_tgsi(struct r600_screen *rscreen,
if (use_llvm) {
struct radeon_llvm_context radeon_llvm_ctx;
LLVMModuleRef mod;
- bool dump = r600_can_dump_shader(rscreen, ctx.type);
+ bool dump = r600_can_dump_shader(&rscreen->b, tokens);
boolean use_kill = false;
memset(&radeon_llvm_ctx, 0, sizeof(radeon_llvm_ctx));