r600g: add some members to radeon_llvm_context
authorVincent Lejeune <vljn@ovi.com>
Sun, 23 Sep 2012 13:53:57 +0000 (15:53 +0200)
committerVincent Lejeune <vljn@ovi.com>
Thu, 27 Sep 2012 23:46:38 +0000 (01:46 +0200)
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/radeon/radeon_llvm.h

index 20bf79d411636581ffeddc2649d68a48c39ffb91..bf4877ae81d7f6a1aba8243f1dbf2912fcd8e6cf 100644 (file)
@@ -1332,6 +1332,11 @@ static int r600_shader_from_tgsi(struct r600_screen *rscreen,
                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.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;
index 7a32bb083b26ab212fe33ac7f035df897d1ac454..6118b118bb8afe9a27f916cd9b51851eeb6817cf 100644 (file)
@@ -54,6 +54,12 @@ struct radeon_llvm_context {
 
        struct lp_build_tgsi_soa_context soa;
 
+       unsigned chip_class;
+       unsigned type;
+       unsigned face_input;
+       unsigned two_side;
+       struct r600_shader_io * r600_inputs;
+
        /*=== Front end configuration ===*/
 
        /* Special Intrinsics */