Fixing mesh rendering

This commit is contained in:
Dynamitos
2023-12-24 21:49:49 +01:00
parent 95dcfda1cd
commit 1ae8d68838
8 changed files with 51 additions and 33 deletions
+1
View File
@@ -32,6 +32,7 @@ public:
};
struct MeshData
{
AABB boundingBox;
uint32 numMeshlets = 0;
uint32 meshletOffset = 0;
uint32 firstIndex = 0;
+2 -2
View File
@@ -13,7 +13,7 @@ struct PendingBuffer
bool writeOnly;
};
static std::map<Vulkan::Buffer*, PendingBuffer> pendingBuffers;
static Map<Vulkan::Buffer*, PendingBuffer> pendingBuffers;
Buffer::Buffer(PGraphics graphics, uint64 size, VkBufferUsageFlags usage, Gfx::QueueType& queueType, bool dynamic)
: graphics(graphics)
@@ -239,7 +239,7 @@ void Buffer::unmap()
auto found = pendingBuffers.find(this);
if (found != pendingBuffers.end())
{
PendingBuffer& pending = found->second;
PendingBuffer& pending = found->value;
pending.stagingBuffer->flush();
if (pending.writeOnly)
{