[Mesa-dev] [PATCH] radeonsi: Only scan pixel shaders for TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS
Marek Olšák
maraeo at gmail.com
Thu Dec 19 03:12:45 PST 2013
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Thu, Dec 19, 2013 at 3:37 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> It's not relevant for other shader types.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
> src/gallium/drivers/radeonsi/si_state.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
> index 5274eff..8705d16 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) {
> --
> 1.8.5.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list