mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-18 23:07:07 -05:00
The remap mode stays a specialization constant and cache key input. Scale and offset are two push words at byte 104, patched per draw, so draws that differ only in depth range share one pipeline. The recipe, journal and serializer carry the mode only.
51 lines
1.8 KiB
C++
51 lines
1.8 KiB
C++
#ifndef CORE_SHADER_RECOMPILER_PIPELINESPECIALIZATION_HPP
|
|
#define CORE_SHADER_RECOMPILER_PIPELINESPECIALIZATION_HPP
|
|
|
|
#include <cstdint>
|
|
|
|
namespace ShaderRecompiler {
|
|
|
|
struct PipelineSpecializationConstant {
|
|
std::uint32_t id;
|
|
std::uint32_t value;
|
|
|
|
bool operator==(const PipelineSpecializationConstant&) const = default;
|
|
};
|
|
|
|
namespace PipelineSpecialization {
|
|
|
|
inline constexpr std::uint32_t CompareBase = 49152u;
|
|
inline constexpr std::uint32_t CompareWords = 6u;
|
|
inline constexpr std::uint32_t BufferBase = 0u;
|
|
inline constexpr std::uint32_t BufferWords = 4u;
|
|
inline constexpr std::uint32_t ImageBase = 1024u;
|
|
inline constexpr std::uint32_t ImageWords = 5u;
|
|
inline constexpr std::uint32_t VertexBase = 4096u;
|
|
inline constexpr std::uint32_t VertexWords = 6u;
|
|
inline constexpr std::uint32_t PushDataOffset = 8188u;
|
|
inline constexpr std::uint32_t ExportBase = 8192u;
|
|
inline constexpr std::uint32_t ExportPackingBase = 8224u;
|
|
inline constexpr std::uint32_t DualSourceBlend = 8232u;
|
|
inline constexpr std::uint32_t RasterPrimitive = 8233u;
|
|
inline constexpr std::uint32_t LayerExported = 8234u;
|
|
inline constexpr std::uint32_t StencilReferenceOffset = 8235u;
|
|
inline constexpr std::uint32_t ReversedBlend = 8236u;
|
|
inline constexpr std::uint32_t DepthRemapBase = 8240u;
|
|
inline constexpr std::uint32_t DepthRemapWords = 1u;
|
|
inline constexpr std::uint32_t HeapCountBase = 8256u;
|
|
inline constexpr std::uint32_t MipCountBase = 8320u;
|
|
inline constexpr std::uint32_t DescriptorIndexBase = 16384u;
|
|
inline constexpr std::uint32_t DescriptorIndexStride = 128u;
|
|
inline constexpr std::uint32_t FoldOffsetBase = 57344u;
|
|
inline constexpr std::uint32_t UnnormalizedBaseLevelBase = 57408u;
|
|
|
|
inline constexpr std::uint32_t DescriptorIndex(std::uint32_t binding, std::uint32_t element) {
|
|
return DescriptorIndexBase + binding * DescriptorIndexStride + element;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|