mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 21:35:46 +00:00
glasm: Add passthrough geometry shader support
This commit is contained in:
parent
b1df436cef
commit
362888dcb0
5 changed files with 33 additions and 8 deletions
|
@ -83,13 +83,14 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile
|
|||
break;
|
||||
}
|
||||
const std::string_view attr_stage{stage == Stage::Fragment ? "fragment" : "vertex"};
|
||||
const VaryingState loads{info.loads.mask | info.passthrough.mask};
|
||||
for (size_t index = 0; index < IR::NUM_GENERICS; ++index) {
|
||||
if (info.loads.Generic(index)) {
|
||||
if (loads.Generic(index)) {
|
||||
Add("{}ATTRIB in_attr{}[]={{{}.attrib[{}..{}]}};",
|
||||
InterpDecorator(info.interpolation[index]), index, attr_stage, index, index);
|
||||
}
|
||||
}
|
||||
if (IsInputArray(stage) && info.loads.AnyComponent(IR::Attribute::PositionX)) {
|
||||
if (IsInputArray(stage) && loads.AnyComponent(IR::Attribute::PositionX)) {
|
||||
Add("ATTRIB vertex_position=vertex.position;");
|
||||
}
|
||||
if (info.uses_invocation_id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue