HLSL: implement [unroll] and [loop] attributes
This adds infrastructure suitable for any front end to create SPIR-V loop control flags. The only current front end doing so is HLSL. [unroll] turns into spv::LoopControlUnrollMask [loop] turns into spv::LoopControlDontUnrollMask no specification means spv::LoopControlMaskNone
This commit is contained in:
@@ -62,6 +62,7 @@ namespace glslang {
|
||||
EatPatchConstantFunc,
|
||||
EatPatchSize,
|
||||
EatUnroll,
|
||||
EatLoop,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -86,6 +87,9 @@ namespace glslang {
|
||||
// Const lookup: search for (but do not modify) the attribute in the map.
|
||||
const TIntermAggregate* operator[](TAttributeType) const;
|
||||
|
||||
// True if entry exists in map (even if value is nullptr)
|
||||
bool contains(TAttributeType) const;
|
||||
|
||||
protected:
|
||||
// Find an attribute enum given its name.
|
||||
static TAttributeType attributeFromName(const TString&);
|
||||
|
||||
Reference in New Issue
Block a user