- fix enough bugs to finally get some visuals
This commit is contained in:
parent
e1d1358249
commit
fe67a2c24f
13 changed files with 93 additions and 19 deletions
|
|
@ -5,6 +5,16 @@
|
|||
#include "vulkan/renderer/vk_renderstate.h"
|
||||
#include "doomerrors.h"
|
||||
|
||||
VKBuffer::~VKBuffer()
|
||||
{
|
||||
if (map)
|
||||
mBuffer->Unmap();
|
||||
|
||||
auto fb = GetVulkanFrameBuffer();
|
||||
if (fb && mBuffer)
|
||||
fb->mFrameDeleteList.push_back(std::move(mBuffer));
|
||||
}
|
||||
|
||||
void VKBuffer::SetData(size_t size, const void *data, bool staticdata)
|
||||
{
|
||||
auto fb = GetVulkanFrameBuffer();
|
||||
|
|
@ -37,6 +47,8 @@ void VKBuffer::SetData(size_t size, const void *data, bool staticdata)
|
|||
if (mPersistent)
|
||||
{
|
||||
map = mBuffer->Map(0, size);
|
||||
if (data)
|
||||
memcpy(map, data, size);
|
||||
}
|
||||
else if (data)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue