Go to the documentation of this file.
68 static constexpr
Uint32 _BindingIndexBits = 16;
69 static constexpr
Uint32 _SamplerIndBits = 16;
70 static constexpr
Uint32 _ArraySizeBits = 26;
71 static constexpr
Uint32 _DescrTypeBits = 4;
72 static constexpr
Uint32 _DescrSetBits = 1;
73 static constexpr
Uint32 _SamplerAssignedBits = 1;
75 static_assert((_BindingIndexBits + _ArraySizeBits + _SamplerIndBits + _DescrTypeBits + _DescrSetBits + _SamplerAssignedBits) % 32 == 0,
"Bits are not optimally packed");
78 static_assert((1u << _DescrTypeBits) >=
static_cast<Uint32>(
DescriptorType::Count),
"Not enough bits to store DescriptorType values");
79 static_assert((1u << _BindingIndexBits) >= MAX_RESOURCES_IN_SIGNATURE,
"Not enough bits to store resource binding index");
80 static_assert((1u << _SamplerIndBits) >= MAX_RESOURCES_IN_SIGNATURE,
"Not enough bits to store sampler resource index");
104 bool _ImtblSamplerAssigned,
106 Uint32 _StaticCacheOffset) noexcept :
119 VERIFY(
BindingIndex == _BindingIndex,
"Binding index (", _BindingIndex,
") exceeds maximum representable value");
120 VERIFY(
ArraySize == _ArraySize,
"Array size (", _ArraySize,
") exceeds maximum representable value");
121 VERIFY(
SamplerInd == _SamplerInd,
"Sampler index (", _SamplerInd,
") exceeds maximum representable value");
123 VERIFY(
DescrSet == _DescrSet,
"Descriptor set (", _DescrSet,
") exceeds maximum representable value");
167 static_assert(
static_cast<Uint32>(
DescriptorType::Count) == 15,
"Please update the switch below to handle the new descriptor type");
189 return VK_DESCRIPTOR_TYPE_MAX_ENUM;
ResourceCacheContentType
The type of the content that is stored in the shader resource cache.
Definition: ShaderResourceCacheCommon.hpp:39
static constexpr Uint32 MaxDescriptorSets
Definition: PipelineResourceAttribsVk.hpp:84
bool IsCompatibleWith(const PipelineResourceAttribsVk &rhs) const
Definition: PipelineResourceAttribsVk.hpp:147
@ StorageBufferDynamic_ReadOnly
const Uint32 DescrType
Definition: PipelineResourceAttribsVk.hpp:91
const Uint32 DescrSet
Definition: PipelineResourceAttribsVk.hpp:92
const Uint32 SamplerInd
Definition: PipelineResourceAttribsVk.hpp:89
#define UNEXPECTED(...)
Definition: DebugUtilities.hpp:77
const Uint32 ImtblSamplerAssigned
Definition: PipelineResourceAttribsVk.hpp:93
const Uint32 StaticCacheOffset
Definition: PipelineResourceAttribsVk.hpp:96
size_t GetHash() const
Definition: PipelineResourceAttribsVk.hpp:159
VkDescriptorType DescriptorTypeToVkDescriptorType(DescriptorType Type)
Definition: PipelineResourceAttribsVk.hpp:165
const Uint32 ArraySize
Definition: PipelineResourceAttribsVk.hpp:90
bool IsImmutableSamplerAssigned() const
Definition: PipelineResourceAttribsVk.hpp:137
bool IsCombinedWithSampler() const
Definition: PipelineResourceAttribsVk.hpp:142
PipelineResourceAttribsVk(Uint32 _BindingIndex, Uint32 _SamplerInd, Uint32 _ArraySize, DescriptorType _DescrType, Uint32 _DescrSet, bool _ImtblSamplerAssigned, Uint32 _SRBCacheOffset, Uint32 _StaticCacheOffset) noexcept
Definition: PipelineResourceAttribsVk.hpp:99
const D3D12_PIPELINE_STATE_SUBOBJECT_TYPE Type
Definition: PipelineStateD3D12Impl.cpp:69
uint32_t Uint32
32-bit unsigned integer
Definition: BasicTypes.h:51
std::size_t ComputeHash(const ArgsType &... Args)
Definition: HashUtils.hpp:57
const Uint32 BindingIndex
Definition: PipelineResourceAttribsVk.hpp:88
DescriptorType GetDescriptorType() const
Definition: PipelineResourceAttribsVk.hpp:132
@ SRB
Resources of a shader resource binding.
DescriptorType
Definition: PipelineResourceAttribsVk.hpp:42
const Uint32 SRBCacheOffset
Definition: PipelineResourceAttribsVk.hpp:95
@ StorageTexelBuffer_ReadOnly
uint8_t Uint8
8-bit unsigned integer
Definition: BasicTypes.h:53
#define VERIFY(...)
Definition: DebugUtilities.hpp:76
static constexpr Uint32 InvalidSamplerInd
Definition: PipelineResourceAttribsVk.hpp:85
Definition: PipelineResourceAttribsVk.hpp:65
Uint32 CacheOffset(ResourceCacheContentType CacheType) const
Definition: PipelineResourceAttribsVk.hpp:127
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37