Add colorfront and txtcoord support
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -222,8 +222,13 @@ enum class Attribute : u64 {
|
||||
FrontFace = 255,
|
||||
};
|
||||
|
||||
constexpr size_t NUM_TXT_COORD = 10;
|
||||
constexpr size_t NUM_GENERICS = 32;
|
||||
|
||||
[[nodiscard]] u32 TxtCoordAttributeIndex(Attribute attribute);
|
||||
|
||||
[[nodiscard]] u32 TxtCoordAttributeElement(Attribute attribute);
|
||||
|
||||
[[nodiscard]] bool IsGeneric(Attribute attribute) noexcept;
|
||||
|
||||
[[nodiscard]] u32 GenericAttributeIndex(Attribute attribute);
|
||||
|
||||
Reference in New Issue
Block a user