[Mesa-dev] [PATCH 2/4] r600g: add some members to radeon_llvm_context
Tom Stellard
tom at stellard.net
Mon Sep 24 07:12:38 PDT 2012
On Mon, Sep 24, 2012 at 12:43:15AM +0200, Vincent Lejeune wrote:
> ---
> src/gallium/drivers/r600/r600_shader.c | 5 +++++
> src/gallium/drivers/radeon/radeon_llvm.h | 8 ++++++++
> 2 files changed, 13 insertions(+)
>
> diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
> index c363ca5..14c1763 100644
> --- a/src/gallium/drivers/r600/r600_shader.c
> +++ b/src/gallium/drivers/r600/r600_shader.c
> @@ -1322,6 +1322,11 @@ static int r600_shader_from_tgsi(struct r600_context * rctx, struct r600_pipe_sh
> unsigned dump = 0;
> memset(&radeon_llvm_ctx, 0, sizeof(radeon_llvm_ctx));
> radeon_llvm_ctx.reserved_reg_count = ctx.file_offset[TGSI_FILE_INPUT];
> + radeon_llvm_ctx.type = ctx.type;
> + radeon_llvm_ctx.two_side = shader->two_side;
> + radeon_llvm_ctx.face_input = ctx.face_gpr;
> + radeon_llvm_ctx.tgsi_inputs.r600_inputs = ctx.shader->input;
> + radeon_llvm_ctx.chip_class = ctx.bc->chip_class;
> mod = r600_tgsi_llvm(&radeon_llvm_ctx, tokens);
> if (debug_get_bool_option("R600_DUMP_SHADERS", FALSE)) {
> dump = 1;
> diff --git a/src/gallium/drivers/radeon/radeon_llvm.h b/src/gallium/drivers/radeon/radeon_llvm.h
> index 7a32bb0..814d707 100644
> --- a/src/gallium/drivers/radeon/radeon_llvm.h
> +++ b/src/gallium/drivers/radeon/radeon_llvm.h
> @@ -54,6 +54,14 @@ struct radeon_llvm_context {
>
> struct lp_build_tgsi_soa_context soa;
>
> + unsigned chip_class;
> + unsigned type;
> + unsigned face_input;
> + unsigned two_side;
> + union {
> + struct r600_shader_io * r600_inputs;
> + } tgsi_inputs;
> +
Why is this a union?
> /*=== Front end configuration ===*/
>
> /* Special Intrinsics */
> --
> 1.7.11.4
>
> _______________________________________________
> 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