summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-04-10 23:58:34 +0200
committerMarek Olšák <[email protected]>2015-04-16 18:36:29 +0200
commitb79c620663dc4eab1ad342a7961fa7aa16cff562 (patch)
treed9ba3147fad1adaa3e94ad839dbd11ff20bb946d /src/gallium/drivers/radeonsi
parent99eef3b8b324d3be6f3b8f2a34c95006d8205599 (diff)
radeonsi: add a debug option to compile shaders when they're created
Tested-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index b0a6fb9fc84..1bbc6b3ca7a 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -465,6 +465,7 @@ static void *si_create_shader_state(struct pipe_context *ctx,
const struct pipe_shader_state *state,
unsigned pipe_shader_type)
{
+ struct si_screen *sscreen = (struct si_screen *)ctx->screen;
struct si_shader_selector *sel = CALLOC_STRUCT(si_shader_selector);
int i;
@@ -494,6 +495,9 @@ static void *si_create_shader_state(struct pipe_context *ctx,
}
}
+ if (sscreen->b.debug_flags & DBG_PRECOMPILE)
+ si_shader_select(ctx, sel);
+
return sel;
}