diff options
author | Marek Olšák <[email protected]> | 2014-09-30 15:12:09 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-10-04 15:16:14 +0200 |
commit | 5233568861b082ee288d845f447012fa47e8bd1e (patch) | |
tree | ebae8d3e34c3d22ac58bf698f3ade833a1fa7683 /src/gallium/drivers/radeonsi/si_state.c | |
parent | af4f5a7c97f3ab47bbd21aa7c27d0c0aaf01f959 (diff) |
radeonsi: get tgsi_shader_info only once before compilation
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index ed90f13a074..0e2d6c4e6b5 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -30,7 +30,6 @@ #include "radeon/r600_cs.h" #include "tgsi/tgsi_parse.h" -#include "tgsi/tgsi_scan.h" #include "util/u_format.h" #include "util/u_format_s3tc.h" #include "util/u_framebuffer.h" @@ -2311,13 +2310,10 @@ static void *si_create_shader_state(struct pipe_context *ctx, sel->type = pipe_shader_type; sel->tokens = tgsi_dup_tokens(state->tokens); sel->so = state->stream_output; + tgsi_scan_shader(state->tokens, &sel->info); - if (pipe_shader_type == PIPE_SHADER_FRAGMENT) { - struct tgsi_shader_info info; - - tgsi_scan_shader(state->tokens, &info); - sel->fs_write_all = info.color0_writes_all_cbufs; - } + if (pipe_shader_type == PIPE_SHADER_FRAGMENT) + sel->fs_write_all = sel->info.color0_writes_all_cbufs; r = si_shader_select(ctx, sel); if (r) { |