diff options
author | Michel Dänzer <[email protected]> | 2013-12-19 11:36:52 +0900 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2013-12-20 18:51:09 +0900 |
commit | d58090500017dccec9e0991318881057455bc367 (patch) | |
tree | 4bb72dfa059d08c30cde91ebe56f22544a0a0aaa /src/gallium/drivers/radeonsi | |
parent | 8252847b7b283ed7f7c514ce44246a2926a0add2 (diff) |
radeonsi: Only scan pixel shaders for TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS
It's not relevant for other shader types.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 5274effbb68..8705d16d6ca 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2246,14 +2246,17 @@ static void *si_create_shader_state(struct pipe_context *ctx, { struct si_pipe_shader_selector *sel = CALLOC_STRUCT(si_pipe_shader_selector); int r; - struct tgsi_shader_info info; - - tgsi_scan_shader(state->tokens, &info); sel->type = pipe_shader_type; sel->tokens = tgsi_dup_tokens(state->tokens); sel->so = state->stream_output; - sel->fs_write_all = info.color0_writes_all_cbufs; + + 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; + } r = si_shader_select(ctx, sel, NULL); if (r) { |