Add colorfront and txtcoord support

This commit is contained in:
Feng Chen 2021-09-01 00:07:25 +08:00
parent c7662fd962
commit b86a4caa20
5 changed files with 57 additions and 0 deletions

View file

@ -9,6 +9,14 @@
namespace Shader::IR {
u32 TxtCoordAttributeIndex(Attribute attribute) {
return (static_cast<u32>(attribute) - static_cast<u32>(Attribute::FixedFncTexture0S)) / 4u;
}
u32 TxtCoordAttributeElement(Attribute attribute) {
return static_cast<u32>(attribute) % 4;
}
bool IsGeneric(Attribute attribute) noexcept {
return attribute >= Attribute::Generic0X && attribute <= Attribute::Generic31X;
}