radeonsi: use gallivm less
authorMarek Olšák <marek.olsak@amd.com>
Thu, 21 Jun 2018 22:52:21 +0000 (18:52 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 25 Jun 2018 22:33:58 +0000 (18:33 -0400)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader_nir.c

index 8680b4e35d1623c3c01f00429f0a84ea012c78b7..133cb556ae744f47333ff309e07e6d58188b1450 100644 (file)
@@ -5847,7 +5847,7 @@ si_generate_gs_copy_shader(struct si_screen *sscreen,
 
        r = si_compile_llvm(sscreen, &ctx.shader->binary,
                            &ctx.shader->config, ctx.compiler,
-                           ctx.gallivm.module,
+                           ctx.ac.module,
                            debug, PIPE_SHADER_GEOMETRY,
                            "GS Copy Shader");
        if (!r) {
@@ -6982,7 +6982,7 @@ int si_compile_tgsi_shader(struct si_screen *sscreen,
 
        /* Compile to bytecode. */
        r = si_compile_llvm(sscreen, &shader->binary, &shader->config, compiler,
-                           ctx.gallivm.module, debug, ctx.type, "TGSI shader");
+                           ctx.ac.module, debug, ctx.type, "TGSI shader");
        si_llvm_dispose(&ctx);
        if (r) {
                fprintf(stderr, "LLVM failed to compile shader\n");
index c46d0ab5a8238664f3828a7c2ee1a89a3802bc16..d7e8ccd304739ff2457abb4ff99a0e8a837c9f2f 100644 (file)
@@ -920,7 +920,7 @@ si_nir_load_sampler_desc(struct ac_shader_abi *abi,
                if (dynamic_index)
                        index = si_llvm_bound_index(ctx, index, ctx->num_images);
 
-               index = LLVMBuildSub(ctx->gallivm.builder,
+               index = LLVMBuildSub(ctx->ac.builder,
                                     LLVMConstInt(ctx->i32, SI_NUM_IMAGES - 1, 0),
                                     index, "");
 
@@ -933,7 +933,7 @@ si_nir_load_sampler_desc(struct ac_shader_abi *abi,
        if (dynamic_index)
                index = si_llvm_bound_index(ctx, index, ctx->num_samplers);
 
-       index = LLVMBuildAdd(ctx->gallivm.builder, index,
+       index = LLVMBuildAdd(ctx->ac.builder, index,
                             LLVMConstInt(ctx->i32, SI_NUM_IMAGES / 2, 0), "");
 
        return si_load_sampler_desc(ctx, list, index, desc_type);