radeonsi: Really dump TGSI code before any TGSI->LLVM conversion attempt
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 15 Jan 2014 03:31:07 +0000 (12:31 +0900)
committerMichel Dänzer <michel@daenzer.net>
Wed, 29 Jan 2014 02:07:58 +0000 (11:07 +0900)
While we're at it, use the local variable 'sel'.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader.c

index 7718e919555abafbf67d79a770ac64d814805201..c9001a0ec1057a8efc8ddc65a0e2d975cfb9140c 100644 (file)
@@ -2421,7 +2421,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);
@@ -2509,13 +2516,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 (si_shader_ctx.type == TGSI_PROCESSOR_GEOMETRY) {
                si_shader_ctx.gs_next_vertex =
                        lp_build_alloca(bld_base->base.gallivm,