mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-28 21:01:04 +00:00
Don't dirty buffers, and don't create any init state for them
* Buffers have no state, they're immutable, and contents are handled by device memory initial state
This commit is contained in:
@@ -346,6 +346,10 @@ void WrappedVulkan::Create_InitialState(ResourceId id, WrappedVkRes *live, bool
|
||||
{
|
||||
RDCWARN("Framebuffer without initial state! should clear all attachments");
|
||||
}
|
||||
else if(type == eResBuffer)
|
||||
{
|
||||
// don't have to do anything for buffers, initial state is all handled by memory
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCERR("Unhandled resource type %d", type);
|
||||
|
||||
@@ -248,7 +248,6 @@ void WrappedVulkan::vkCmdCopyImage(
|
||||
record->MarkResourceFrameReferenced(GetResID(srcImage), eFrameRef_Read);
|
||||
record->MarkResourceFrameReferenced(GetResID(destImage), eFrameRef_Write);
|
||||
|
||||
// VKTODOHIGH init states not implemented yet...
|
||||
record->dirtied.insert(GetResID(destImage));
|
||||
{
|
||||
VkResourceRecord *im = GetRecord(destImage);
|
||||
@@ -412,8 +411,7 @@ void WrappedVulkan::vkCmdCopyImageToBuffer(
|
||||
record->MarkResourceFrameReferenced(GetResID(srcImage), eFrameRef_Read);
|
||||
record->MarkResourceFrameReferenced(GetResID(destBuffer), eFrameRef_Write);
|
||||
|
||||
// VKTODOMED: need to dirty the memory bound to the buffer?
|
||||
record->dirtied.insert(GetResID(destBuffer));
|
||||
// Don't dirty the buffer, just the memory behind it.
|
||||
{
|
||||
VkResourceRecord *buf = GetRecord(destBuffer);
|
||||
if(buf->GetMemoryRecord())
|
||||
@@ -499,8 +497,7 @@ void WrappedVulkan::vkCmdCopyBuffer(
|
||||
record->MarkResourceFrameReferenced(GetResID(srcBuffer), eFrameRef_Read);
|
||||
record->MarkResourceFrameReferenced(GetResID(destBuffer), eFrameRef_Write);
|
||||
|
||||
// VKTODOMED: need to dirty the memory bound to the buffer?
|
||||
record->dirtied.insert(GetResID(destBuffer));
|
||||
// Don't dirty the buffer, just the memory behind it.
|
||||
{
|
||||
VkResourceRecord *buf = GetRecord(destBuffer);
|
||||
if(buf->GetMemoryRecord())
|
||||
|
||||
Reference in New Issue
Block a user