Add some comments.

This commit is contained in:
Henrik Rydgård 2023-06-05 09:49:58 +02:00
parent 186b0f105c
commit d90671e877
2 changed files with 4 additions and 0 deletions

View File

@ -135,6 +135,8 @@ public:
return blocks_[curBlockIndex_].writePtr;
}
// NOTE: If you can avoid this by writing the data directly into memory returned from Allocate,
// do so. Savings from avoiding memcpy can be significant.
VkDeviceSize Push(const void *data, VkDeviceSize numBytes, int alignment, VkBuffer *vkbuf) {
uint32_t bindOffset;
uint8_t *ptr = Allocate(numBytes, alignment, vkbuf, &bindOffset);

View File

@ -825,6 +825,8 @@ void DrawEngineVulkan::DoFlush() {
VkDescriptorSet ds = GetOrCreateDescriptorSet(imageView, sampler, baseBuf, lightBuf, boneBuf, tess);
// TODO: Can we avoid binding all three when not needed? Same below for hardware transform.
// Think this will require different descriptor set layouts.
const uint32_t dynamicUBOOffsets[3] = {
baseUBOOffset, lightUBOOffset, boneUBOOffset,
};