[Mesa-dev] [PATCH 09/16] radeonsi: Really dump TGSI code before any TGSI->LLVM conversion attempt
Michel Dänzer
michel at daenzer.net
Fri Jan 24 01:33:21 PST 2014
From: Michel Dänzer <michel.daenzer at amd.com>
While we're at it, use the local variable 'sel'.
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/gallium/drivers/radeonsi/si_shader.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 100a385..fbd56e0 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -2453,7 +2453,14 @@ int si_pipe_shader_create(
struct lp_build_tgsi_context * bld_base;
LLVMModuleRef mod;
int r = 0;
- bool dump = r600_can_dump_shader(&sctx->screen->b, shader->selector->tokens);
+ bool dump = r600_can_dump_shader(&sctx->screen->b, sel->tokens);
+
+ /* Dump TGSI code before doing TGSI->LLVM conversion in case the
+ * conversion fails. */
+ if (dump) {
+ tgsi_dump(sel->tokens, 0);
+ si_dump_streamout(&sel->so);
+ }
assert(shader->shader.noutput == 0);
assert(shader->shader.nparam == 0);
@@ -2548,14 +2555,6 @@ int si_pipe_shader_create(
preload_samplers(&si_shader_ctx);
preload_streamout_buffers(&si_shader_ctx);
- /* Dump TGSI code before doing TGSI->LLVM conversion in case the
- * conversion fails. */
- if (dump) {
- tgsi_dump(sel->tokens, 0);
- si_dump_streamout(&sel->so);
- }
-
-
#if HAVE_LLVM >= 0x0305
if (si_shader_ctx.type == TGSI_PROCESSOR_GEOMETRY) {
si_shader_ctx.gs_next_vertex =
--
1.8.5.3
More information about the mesa-dev
mailing list