Add colorfront and txtcoord support

This commit is contained in:
Feng Chen
2021-09-01 00:07:25 +08:00
parent 5f19b66189
commit 73b11f390e
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;
}