llvmpipe: dump shaders if LP_DEBUG=tgsi

This commit is contained in:
Brian Paul
2010-04-28 13:18:51 -06:00
parent 18d1d59484
commit ac6725b8f9
2 changed files with 12 additions and 0 deletions
@@ -967,6 +967,11 @@ llvmpipe_create_fs_state(struct pipe_context *pipe,
/* we need to keep a local copy of the tokens */
shader->base.tokens = tgsi_dup_tokens(templ->tokens);
if (LP_DEBUG & DEBUG_TGSI) {
debug_printf("llvmpipe: Create fragment shader %p:\n", (void *) shader);
tgsi_dump(templ->tokens, 0);
}
return shader;
}
@@ -28,11 +28,13 @@
#include "pipe/p_defines.h"
#include "tgsi/tgsi_dump.h"
#include "tgsi/tgsi_parse.h"
#include "util/u_memory.h"
#include "draw/draw_context.h"
#include "lp_context.h"
#include "lp_debug.h"
#include "lp_state.h"
@@ -57,6 +59,11 @@ llvmpipe_create_vs_state(struct pipe_context *pipe,
if (state->draw_data == NULL)
goto fail;
if (LP_DEBUG & DEBUG_TGSI) {
debug_printf("llvmpipe: Create vertex shader %p:\n", (void *) state);
tgsi_dump(templ->tokens, 0);
}
return state;
fail: