mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 05:20:45 +00:00
Follow the spec strictly - only coherent memory is 'implicitly flushed'
* Technically coherent memory isn't implicitly flushed either, but this is handling is required if memory is mapped, written to, and unmapped without ever hitting a QueueSubmit where we will check any current coherent map, and treat it as persistent to flush it out.
This commit is contained in:
@@ -417,7 +417,13 @@ void WrappedVulkan::vkUnmapMemory(
|
||||
|
||||
if(capframe)
|
||||
{
|
||||
if(!state.mapFlushed)
|
||||
// coherent maps must always serialise all data on unmap, even if a flush was seen, because
|
||||
// unflushed data is *also* visible. This is a bit redundant since data is serialised here
|
||||
// and in any flushes, but that's the app's fault - the spec calls out flushing coherent maps
|
||||
// as inefficient
|
||||
// if the memory is not coherent, we must have a flush for every region written while it is
|
||||
// mapped, there is no implicit flush on unmap, so we follow the spec strictly on this.
|
||||
if(state.mapCoherent)
|
||||
{
|
||||
CACHE_THREAD_SERIALISER();
|
||||
|
||||
@@ -436,11 +442,6 @@ void WrappedVulkan::vkUnmapMemory(
|
||||
GetResourceManager()->MarkResourceFrameReferenced(id, eFrameRef_Write);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// VKTODOLOW for now assuming flushes cover all writes. Technically
|
||||
// this is true for all non-coherent memory types.
|
||||
}
|
||||
}
|
||||
|
||||
state.mappedPtr = NULL;
|
||||
|
||||
Reference in New Issue
Block a user