|
|
@ -1355,6 +1355,10 @@ void EmitContext::DefineInputs(const IR::Program& program) {
|
|
|
|
if (loads[IR::Attribute::PrimitiveId]) {
|
|
|
|
if (loads[IR::Attribute::PrimitiveId]) {
|
|
|
|
primitive_id = DefineInput(*this, U32[1], false, spv::BuiltIn::PrimitiveId);
|
|
|
|
primitive_id = DefineInput(*this, U32[1], false, spv::BuiltIn::PrimitiveId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (loads[IR::Attribute::Layer]) {
|
|
|
|
|
|
|
|
AddCapability(spv::Capability::Geometry);
|
|
|
|
|
|
|
|
layer = DefineInput(*this, U32[1], false, spv::BuiltIn::Layer);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (loads.AnyComponent(IR::Attribute::PositionX)) {
|
|
|
|
if (loads.AnyComponent(IR::Attribute::PositionX)) {
|
|
|
|
const bool is_fragment{stage != Stage::Fragment};
|
|
|
|
const bool is_fragment{stage != Stage::Fragment};
|
|
|
|
const spv::BuiltIn built_in{is_fragment ? spv::BuiltIn::Position : spv::BuiltIn::FragCoord};
|
|
|
|
const spv::BuiltIn built_in{is_fragment ? spv::BuiltIn::Position : spv::BuiltIn::FragCoord};
|
|
|
|