Rename parameters
This commit is contained in:
@@ -9,11 +9,21 @@
|
||||
|
||||
namespace Shader::IR {
|
||||
|
||||
u32 TxtCoordAttributeIndex(Attribute attribute) {
|
||||
bool IsFixedFncTexture(Attribute attribute) {
|
||||
return attribute >= Attribute::FixedFncTexture0S && attribute <= Attribute::FixedFncTexture9Q;
|
||||
}
|
||||
|
||||
u32 FixedFncTextureAttributeIndex(Attribute attribute) {
|
||||
if (!IsFixedFncTexture(attribute)) {
|
||||
throw InvalidArgument("Attribute is not fixedfnctexture {}", attribute);
|
||||
}
|
||||
return (static_cast<u32>(attribute) - static_cast<u32>(Attribute::FixedFncTexture0S)) / 4u;
|
||||
}
|
||||
|
||||
u32 TxtCoordAttributeElement(Attribute attribute) {
|
||||
u32 FixedFncTextureAttributeElement(Attribute attribute) {
|
||||
if (!IsFixedFncTexture(attribute)) {
|
||||
throw InvalidArgument("Attribute is not fixedfnctexture {}", attribute);
|
||||
}
|
||||
return static_cast<u32>(attribute) % 4;
|
||||
}
|
||||
|
||||
|
||||
@@ -222,12 +222,12 @@ enum class Attribute : u64 {
|
||||
FrontFace = 255,
|
||||
};
|
||||
|
||||
constexpr size_t NUM_TXT_COORD = 10;
|
||||
constexpr size_t NUM_FIXEDFNCTEXTURE = 10;
|
||||
constexpr size_t NUM_GENERICS = 32;
|
||||
|
||||
[[nodiscard]] u32 TxtCoordAttributeIndex(Attribute attribute);
|
||||
[[nodiscard]] u32 FixedFncTextureAttributeIndex(Attribute attribute);
|
||||
|
||||
[[nodiscard]] u32 TxtCoordAttributeElement(Attribute attribute);
|
||||
[[nodiscard]] u32 FixedFncTextureAttributeElement(Attribute attribute);
|
||||
|
||||
[[nodiscard]] bool IsGeneric(Attribute attribute) noexcept;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user