From a90d1df8204b108fffb53fd20eecf6b5f61be6fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 14 Aug 2020 23:56:05 -0400 Subject: [PATCH] radeonsi: change PIPE_SHADER to MESA_SHADER (si_compile_llvm) Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_shader.c | 4 ++-- src/gallium/drivers/radeonsi/si_shader_internal.h | 2 +- src/gallium/drivers/radeonsi/si_shader_llvm.c | 6 +++--- src/gallium/drivers/radeonsi/si_shader_llvm_gs.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 44fc036b877..a13f906e58f 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1836,7 +1836,7 @@ static bool si_llvm_compile_shader(struct si_screen *sscreen, struct ac_llvm_com /* Compile to bytecode. */ if (!si_compile_llvm(sscreen, &shader->binary, &shader->config, compiler, &ctx.ac, debug, - ctx.type, si_get_shader_name(shader), + ctx.stage, si_get_shader_name(shader), si_should_optimize_less(compiler, shader->selector))) { si_llvm_dispose(&ctx); fprintf(stderr, "LLVM failed to compile shader\n"); @@ -2007,7 +2007,7 @@ si_get_shader_part(struct si_screen *sscreen, struct si_shader_part **list, si_llvm_optimize_module(&ctx); if (!si_compile_llvm(sscreen, &result->binary, &result->config, compiler, &ctx.ac, debug, - ctx.type, name, false)) { + ctx.stage, name, false)) { FREE(result); result = NULL; goto out; diff --git a/src/gallium/drivers/radeonsi/si_shader_internal.h b/src/gallium/drivers/radeonsi/si_shader_internal.h index 6413085d5b2..025a94680ae 100644 --- a/src/gallium/drivers/radeonsi/si_shader_internal.h +++ b/src/gallium/drivers/radeonsi/si_shader_internal.h @@ -227,7 +227,7 @@ bool gfx10_ngg_calculate_subgroup_info(struct si_shader *shader); bool si_compile_llvm(struct si_screen *sscreen, struct si_shader_binary *binary, struct ac_shader_config *conf, struct ac_llvm_compiler *compiler, struct ac_llvm_context *ac, struct pipe_debug_callback *debug, - enum pipe_shader_type shader_type, const char *name, bool less_optimized); + gl_shader_stage stage, const char *name, bool less_optimized); void si_llvm_context_init(struct si_shader_context *ctx, struct si_screen *sscreen, struct ac_llvm_compiler *compiler, unsigned wave_size); void si_llvm_create_func(struct si_shader_context *ctx, const char *name, LLVMTypeRef *return_types, diff --git a/src/gallium/drivers/radeonsi/si_shader_llvm.c b/src/gallium/drivers/radeonsi/si_shader_llvm.c index 724af7ed9bc..3b1e4dafec1 100644 --- a/src/gallium/drivers/radeonsi/si_shader_llvm.c +++ b/src/gallium/drivers/radeonsi/si_shader_llvm.c @@ -70,11 +70,11 @@ static void si_diagnostic_handler(LLVMDiagnosticInfoRef di, void *context) bool si_compile_llvm(struct si_screen *sscreen, struct si_shader_binary *binary, struct ac_shader_config *conf, struct ac_llvm_compiler *compiler, struct ac_llvm_context *ac, struct pipe_debug_callback *debug, - enum pipe_shader_type shader_type, const char *name, bool less_optimized) + gl_shader_stage stage, const char *name, bool less_optimized) { unsigned count = p_atomic_inc_return(&sscreen->num_compilations); - if (si_can_dump_shader(sscreen, tgsi_processor_to_shader_stage(shader_type))) { + if (si_can_dump_shader(sscreen, stage)) { fprintf(stderr, "radeonsi: Compiling shader %d\n", count); if (!(sscreen->debug_flags & (DBG(NO_IR) | DBG(PREOPT_IR)))) { @@ -114,7 +114,7 @@ bool si_compile_llvm(struct si_screen *sscreen, struct si_shader_binary *binary, struct ac_rtld_binary rtld; if (!ac_rtld_open(&rtld, (struct ac_rtld_open_info){ .info = &sscreen->info, - .shader_type = tgsi_processor_to_shader_stage(shader_type), + .shader_type = stage, .wave_size = ac->wave_size, .num_parts = 1, .elf_ptrs = &binary->elf_buffer, diff --git a/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c b/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c index 904c81d7165..f9cfbbba7bc 100644 --- a/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c +++ b/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c @@ -570,7 +570,7 @@ struct si_shader *si_generate_gs_copy_shader(struct si_screen *sscreen, bool ok = false; if (si_compile_llvm(sscreen, &ctx.shader->binary, &ctx.shader->config, ctx.compiler, &ctx.ac, - debug, PIPE_SHADER_GEOMETRY, "GS Copy Shader", false)) { + debug, MESA_SHADER_GEOMETRY, "GS Copy Shader", false)) { if (si_can_dump_shader(sscreen, MESA_SHADER_GEOMETRY)) fprintf(stderr, "GS Copy Shader:\n"); si_shader_dump(sscreen, ctx.shader, debug, stderr, true); -- 2.30.2