[Mesa-dev] [PATCH 23/42] st/mesa: switch cs over to shared shader_info

Marek Olšák maraeo at gmail.com
Thu Oct 20 15:32:53 UTC 2016


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Thu, Oct 20, 2016 at 1:09 AM, Timothy Arceri
<timothy.arceri at collabora.com> wrote:
> ---
>  src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 11 ++++-------
>  src/mesa/state_tracker/st_program.c        |  2 +-
>  2 files changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index 281f724..61a461d 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -5857,17 +5857,14 @@ emit_face_var(struct gl_context *ctx, struct st_translate *t)
>  }
>
>  static void
> -emit_compute_block_size(const struct gl_program *program,
> +emit_compute_block_size(const struct gl_program *prog,
>                          struct ureg_program *ureg) {
> -   const struct gl_compute_program *cp =
> -      (const struct gl_compute_program *)program;
> -
>     ureg_property(ureg, TGSI_PROPERTY_CS_FIXED_BLOCK_WIDTH,
> -                       cp->LocalSize[0]);
> +                 prog->info.cs.local_size[0]);
>     ureg_property(ureg, TGSI_PROPERTY_CS_FIXED_BLOCK_HEIGHT,
> -                       cp->LocalSize[1]);
> +                 prog->info.cs.local_size[1]);
>     ureg_property(ureg, TGSI_PROPERTY_CS_FIXED_BLOCK_DEPTH,
> -                       cp->LocalSize[2]);
> +                 prog->info.cs.local_size[2]);
>  }
>
>  /**
> diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
> index e671e12..2e58f07 100644
> --- a/src/mesa/state_tracker/st_program.c
> +++ b/src/mesa/state_tracker/st_program.c
> @@ -1686,7 +1686,7 @@ st_translate_compute_program(struct st_context *st,
>
>     stcp->tgsi.ir_type = PIPE_SHADER_IR_TGSI;
>     stcp->tgsi.prog = prog.tokens;
> -   stcp->tgsi.req_local_mem = stcp->Base.SharedSize;
> +   stcp->tgsi.req_local_mem = stcp->Base.Base.info.cs.shared_size;
>     stcp->tgsi.req_private_mem = 0;
>     stcp->tgsi.req_input_mem = 0;
>
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list