Report vulkan dynamic offsets separately for manual application

* Baking these into descriptors when we get arbitrary 'GetDescriptor' queries
  independent of the bound descriptor sets is not possible - a descriptor set
  could be in theory bound twice to two places with different dynamic offsets.
* Instead we report these as part of the pipeline states and the abstraction &
  replay API consumer will need to manually apply them to get the true buffer
  offset.
* The offsets are indexed by descriptor storage byte offset for easier
  processing (the dynamic offset struct can be turned into a pair and used to
  initialise a dict)
This commit is contained in:
baldurk
2024-04-10 16:12:32 +01:00
parent d03c379f3d
commit fa22c7c7fc
4 changed files with 116 additions and 1 deletions
+12 -1
View File
@@ -2138,6 +2138,15 @@ void DoSerialise(SerialiserType &ser, VKPipe::DescriptorBinding &el)
SIZE_CHECK(48);
}
template <typename SerialiserType>
void DoSerialise(SerialiserType &ser, VKPipe::DynamicOffset &el)
{
SERIALISE_MEMBER(descriptorByteOffset);
SERIALISE_MEMBER(dynamicBufferByteOffset);
SIZE_CHECK(16);
}
template <typename SerialiserType>
void DoSerialise(SerialiserType &ser, VKPipe::DescriptorSet &el)
{
@@ -2149,7 +2158,9 @@ void DoSerialise(SerialiserType &ser, VKPipe::DescriptorSet &el)
SERIALISE_MEMBER(inlineData);
SIZE_CHECK(72);
SERIALISE_MEMBER(dynamicOffsets);
SIZE_CHECK(96);
}
template <typename SerialiserType>