[Mesa-dev] [PATCH 2/2] radeonsi: renamed gs_used_inputs to inputs_read
Marek Olšák
maraeo at gmail.com
Tue Jul 21 16:13:42 PDT 2015
For the series:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Wed, Jul 22, 2015 at 1:06 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This is also picked from Marek's tess work, it reduces
> the conflicts with my GS5 work.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/gallium/drivers/radeonsi/si_shader.c | 2 +-
> src/gallium/drivers/radeonsi/si_shader.h | 4 +++-
> src/gallium/drivers/radeonsi/si_state_shaders.c | 6 +++---
> 3 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index a944547..2705dcc 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -384,7 +384,7 @@ static LLVMValueRef fetch_input_gs(
> args[1] = vtx_offset;
> args[2] = lp_build_const_int32(gallivm,
> (get_param_index(semantic_name, semantic_index,
> - shader->selector->gs_used_inputs) * 4 +
> + shader->selector->inputs_read) * 4 +
> swizzle) * 256);
> args[3] = uint->zero;
> args[4] = uint->one; /* OFFEN */
> diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
> index 21bae5f..fbbd747 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.h
> +++ b/src/gallium/drivers/radeonsi/si_shader.h
> @@ -116,7 +116,9 @@ struct si_shader_selector {
> unsigned gs_output_prim;
> unsigned gs_max_out_vertices;
> unsigned gs_num_invocations;
> - uint64_t gs_used_inputs; /* mask of "get_unique_index" bits */
> +
> + /* mask of "get_unique_index" bits */
> + uint64_t inputs_read;
> };
>
> union si_shader_key {
> diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
> index 78be4d9..ad398d9 100644
> --- a/src/gallium/drivers/radeonsi/si_state_shaders.c
> +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
> @@ -112,7 +112,7 @@ static void si_shader_gs(struct si_shader *shader)
> si_pm4_set_reg(pm4, R_028A68_VGT_GSVS_RING_OFFSET_3, gsvs_itemsize);
>
> si_pm4_set_reg(pm4, R_028AAC_VGT_ESGS_RING_ITEMSIZE,
> - util_bitcount64(shader->selector->gs_used_inputs) * (16 >> 2));
> + util_bitcount64(shader->selector->inputs_read) * (16 >> 2));
> si_pm4_set_reg(pm4, R_028AB0_VGT_GSVS_RING_ITEMSIZE, gsvs_itemsize);
>
> si_pm4_set_reg(pm4, R_028B38_VGT_GS_MAX_VERT_OUT, gs_max_vert_out);
> @@ -353,7 +353,7 @@ static inline void si_shader_selector_key(struct pipe_context *ctx,
>
> if (sctx->gs_shader) {
> key->vs.as_es = 1;
> - key->vs.gs_used_inputs = sctx->gs_shader->gs_used_inputs;
> + key->vs.gs_used_inputs = sctx->gs_shader->inputs_read;
> }
> break;
> case PIPE_SHADER_GEOMETRY:
> @@ -487,7 +487,7 @@ static void *si_create_shader_state(struct pipe_context *ctx,
> case TGSI_SEMANTIC_PRIMID:
> break;
> default:
> - sel->gs_used_inputs |=
> + sel->inputs_read |=
> 1llu << si_shader_io_get_unique_index(name, index);
> }
> }
> --
> 2.4.3
>
> _______________________________________________
> 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