Merge pull request #9253 from vonchenplus/attr_layer
shader: Implement miss attribute layer
This commit is contained in:
commit
9c67334031
5 changed files with 13 additions and 0 deletions
|
@ -1359,6 +1359,10 @@ void EmitContext::DefineInputs(const IR::Program& program) {
|
|||
if (loads[IR::Attribute::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)) {
|
||||
const bool is_fragment{stage != Stage::Fragment};
|
||||
const spv::BuiltIn built_in{is_fragment ? spv::BuiltIn::Position : spv::BuiltIn::FragCoord};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue