Update athena, minor buffer pool changes

This commit is contained in:
Jack Andersen 2017-01-31 21:19:15 -10:00
parent 4a7b47200a
commit 8469ee8fac
3 changed files with 19 additions and 5 deletions

2
hecl/extern/athena vendored

@ -1 +1 @@
Subproject commit fd84808762fcae588d50d9522e50a43c90da41d2 Subproject commit cecbcffd96b615dfe7d8cf97827151cd82d92e58

View File

@ -67,9 +67,11 @@ class UniformBufferPool
void updateBuffer() void updateBuffer()
{ {
if (buffer) if (cpuBuffer)
{
buffer->unmap(); buffer->unmap();
cpuBuffer = nullptr; cpuBuffer = nullptr;
}
dirty = false; dirty = false;
} }
@ -84,6 +86,11 @@ class UniformBufferPool
{ {
if (useCount.fetch_sub(1) == 1) if (useCount.fetch_sub(1) == 1)
{ {
if (cpuBuffer)
{
buffer->unmap();
cpuBuffer = nullptr;
}
pool.m_token.deletePoolBuffer(buffer); pool.m_token.deletePoolBuffer(buffer);
buffer = nullptr; buffer = nullptr;
} }

View File

@ -67,9 +67,11 @@ class VertexBufferPool
void updateBuffer() void updateBuffer()
{ {
if (buffer) if (cpuBuffer)
{
buffer->unmap(); buffer->unmap();
cpuBuffer = nullptr; cpuBuffer = nullptr;
}
dirty = false; dirty = false;
} }
@ -84,6 +86,11 @@ class VertexBufferPool
{ {
if (useCount.fetch_sub(1) == 1) if (useCount.fetch_sub(1) == 1)
{ {
if (cpuBuffer)
{
buffer->unmap();
cpuBuffer = nullptr;
}
pool.m_token.deletePoolBuffer(buffer); pool.m_token.deletePoolBuffer(buffer);
buffer = nullptr; buffer = nullptr;
} }