[Mesa-dev] [PATCH 2/3] radeonsi: obtain commonly used LLVM types only once

Marek Olšák maraeo at gmail.com
Wed Feb 10 22:39:16 UTC 2016


Also, I'm adding this in order to initialize the types for GS
properly. (I've just run piglit)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c
b/src/gallium/drivers/radeonsi/si_shader.c
index fa4e26a..baa1090 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -115,6 +115,12 @@ static struct si_shader_context *si_shader_context(
        return (struct si_shader_context *)bld_base;
 }

+static void si_init_shader_ctx(struct si_shader_context *ctx,
+                              struct si_screen *sscreen,
+                              struct si_shader *shader,
+                              LLVMTargetMachineRef tm,
+                              struct tgsi_shader_info *info);
+

 #define PERSPECTIVE_BASE 0
 #define LINEAR_BASE 9
@@ -4190,11 +4196,10 @@ static int si_generate_gs_copy_shader(struct
si_screen *sscreen,

        outputs = MALLOC(gsinfo->num_outputs * sizeof(outputs[0]));

+       si_init_shader_ctx(ctx, sscreen, ctx->shader, ctx->tm, gsinfo);
        ctx->type = TGSI_PROCESSOR_VERTEX;
        ctx->is_gs_copy_shader = true;

-       radeon_llvm_context_init(&ctx->radeon_bld);
-
        create_meta_data(ctx);
        create_function(ctx);
        preload_streamout_buffers(ctx);

Marek


More information about the mesa-dev mailing list