From: Timur Kristóf Date: Wed, 12 Feb 2020 13:27:05 +0000 (+0100) Subject: aco: Remove vertex_geometry_gs assertion from merged shaders. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe80f22470a194f2736e2277f41acf246f27f1c8;p=mesa.git aco: Remove vertex_geometry_gs assertion from merged shaders. 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: --- 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);