[Mesa-dev] [PATCH 01/53] r600/shader: split address get out to a function.
Oded Gabbay
oded.gabbay at gmail.com
Mon Nov 30 00:47:34 PST 2015
On Mon, Nov 30, 2015 at 8:20 AM, Dave Airlie <airlied at gmail.com> wrote:
>
> From: Dave Airlie <airlied at redhat.com>
>
> This will be used in the tess shaders.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/gallium/drivers/r600/r600_shader.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
> index d25fc3b..6233753 100644
> --- a/src/gallium/drivers/r600/r600_shader.c
> +++ b/src/gallium/drivers/r600/r600_shader.c
> @@ -598,6 +598,11 @@ static int select_twoside_color(struct r600_shader_ctx *ctx, int front, int back
> return 0;
> }
>
> +static inline int get_address_file_reg(struct r600_shader_ctx *ctx, int index)
> +{
> + return index > 0 ? ctx->bc->index_reg[index - 1] : ctx->bc->ar_reg;
> +}
> +
> static int vs_add_primid_output(struct r600_shader_ctx *ctx, int prim_id_sid)
> {
> int i;
> @@ -7188,7 +7193,7 @@ static int tgsi_eg_arl(struct r600_shader_ctx *ctx)
> struct r600_bytecode_alu alu;
> int r;
> int i, lasti = tgsi_last_instruction(inst->Dst[0].Register.WriteMask);
> - unsigned reg = inst->Dst[0].Register.Index > 0 ? ctx->bc->index_reg[inst->Dst[0].Register.Index - 1] : ctx->bc->ar_reg;
> + unsigned reg = get_address_file_reg(ctx, inst->Dst[0].Register.Index);
>
> assert(inst->Dst[0].Register.Index < 3);
> memset(&alu, 0, sizeof(struct r600_bytecode_alu));
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Reviewed-by: Oded Gabbay <oded.gabbay at gmail.com>
More information about the mesa-dev
mailing list