From fe80f22470a194f2736e2277f41acf246f27f1c8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timur=20Krist=C3=B3f?= Date: Wed, 12 Feb 2020 14:27:05 +0100 Subject: [PATCH] aco: Remove vertex_geometry_gs assertion from merged shaders. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We are going to support more kinds of merged shaders, such as vertex_tess_control_hs and tess_eval_geometry_gs. Signed-off-by: Timur Kristóf Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 63debb21b12..eadada9f277 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -9024,11 +9024,13 @@ void select_program(Program *program, if (i) { Builder bld(ctx.program, ctx.block); - assert(ctx.stage == vertex_geometry_gs); + bld.barrier(aco_opcode::p_memory_barrier_shared); bld.sopp(aco_opcode::s_barrier); - ctx.gs_wave_id = bld.sop2(aco_opcode::s_bfe_u32, bld.def(s1, m0), bld.def(s1, scc), get_arg(&ctx, args->merged_wave_info), Operand((8u << 16) | 16u)); + if (ctx.stage == vertex_geometry_gs) { + ctx.gs_wave_id = bld.sop2(aco_opcode::s_bfe_u32, bld.def(s1, m0), bld.def(s1, scc), get_arg(&ctx, args->merged_wave_info), Operand((8u << 16) | 16u)); + } } else if (ctx.stage == geometry_gs) ctx.gs_wave_id = get_arg(&ctx, args->gs_wave_id); -- 2.30.2