glsl: Add passthrough geometry shader support

This commit is contained in:
ameerj 2021-06-24 20:13:21 -04:00
parent 8612b5fec5
commit f7352411f0
3 changed files with 27 additions and 7 deletions

View file

@ -17,6 +17,9 @@ std::string_view OutputVertexIndex(EmitContext& ctx) {
}
void InitializeOutputVaryings(EmitContext& ctx) {
if (ctx.uses_geometry_passthrough) {
return;
}
if (ctx.stage == Stage::VertexB || ctx.stage == Stage::Geometry) {
ctx.Add("gl_Position=vec4(0,0,0,1);");
}