glasm: Fix tessellation input attributes

This commit is contained in:
ReinUsesLisp 2021-05-20 21:48:09 -03:00 committed by ameerj
parent 35db68e859
commit 7d0baaa1c9

View file

@ -21,9 +21,12 @@ void GetCbuf(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, ScalarU
} }
std::string VertexIndex(EmitContext& ctx, ScalarU32 vertex) { std::string VertexIndex(EmitContext& ctx, ScalarU32 vertex) {
if (ctx.stage == Stage::Geometry) { switch (ctx.stage) {
case Stage::TessellationControl:
case Stage::TessellationEval:
case Stage::Geometry:
return fmt::format("[{}]", vertex); return fmt::format("[{}]", vertex);
} else { default:
return ""; return "";
} }
} }