diff --git a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata.hpp b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata.hpp index 67de970e4..296d3893b 100644 --- a/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata.hpp +++ b/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata.hpp @@ -148,6 +148,10 @@ enum class IrTextureNumericClass { Unsupported, Float, Uint, Sint }; inline constexpr std::uint32_t ShaderImageIdentitySwizzle = 0x00000facu; +[[nodiscard]] constexpr std::uint32_t DstSel(std::uint32_t x, std::uint32_t y = 0, std::uint32_t z = 0, std::uint32_t w = 0) { + return (x & 0x7u) | ((y & 0x7u) << 3u) | ((z & 0x7u) << 6u) | ((w & 0x7u) << 9u); +} + enum class ResourceKind { None, ScalarBuffer,