mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-05 03:54:32 +00:00
Move attribute related definitions to spirv anonymous namespace
This commit is contained in:
@@ -9,24 +9,6 @@
|
||||
|
||||
namespace Shader::IR {
|
||||
|
||||
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 FixedFncTextureAttributeElement(Attribute attribute) {
|
||||
if (!IsFixedFncTexture(attribute)) {
|
||||
throw InvalidArgument("Attribute is not fixedfnctexture {}", attribute);
|
||||
}
|
||||
return static_cast<u32>(attribute) % 4;
|
||||
}
|
||||
|
||||
bool IsGeneric(Attribute attribute) noexcept {
|
||||
return attribute >= Attribute::Generic0X && attribute <= Attribute::Generic31X;
|
||||
}
|
||||
|
||||
@@ -222,15 +222,8 @@ enum class Attribute : u64 {
|
||||
FrontFace = 255,
|
||||
};
|
||||
|
||||
constexpr size_t NUM_FIXEDFNCTEXTURE = 10;
|
||||
constexpr size_t NUM_GENERICS = 32;
|
||||
|
||||
[[nodiscard]] bool IsFixedFncTexture(Attribute attribute);
|
||||
|
||||
[[nodiscard]] u32 FixedFncTextureAttributeIndex(Attribute attribute);
|
||||
|
||||
[[nodiscard]] u32 FixedFncTextureAttributeElement(Attribute attribute);
|
||||
|
||||
[[nodiscard]] bool IsGeneric(Attribute attribute) noexcept;
|
||||
|
||||
[[nodiscard]] u32 GenericAttributeIndex(Attribute attribute);
|
||||
|
||||
Reference in New Issue
Block a user