Mesa (master): radeonsi: Really dump TGSI code before any TGSI-> LLVM conversion attempt
Michel Dänzer
daenzer at kemper.freedesktop.org
Wed Jan 29 02:46:19 UTC 2014
Module: Mesa
Branch: master
Commit: e1df0d45c4dc76922b240e7b43deb0e173b78f1e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e1df0d45c4dc76922b240e7b43deb0e173b78f1e
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Wed Jan 15 12:31:07 2014 +0900
radeonsi: Really dump TGSI code before any TGSI->LLVM conversion attempt
While we're at it, use the local variable 'sel'.
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_shader.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 7718e91..c9001a0 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -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,
More information about the mesa-commit
mailing list