vkd3d: Handle reserved resources in host barrier code

Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
Joshua Ashton 2020-11-15 16:57:11 +00:00 committed by Hans-Kristian Arntzen
parent 08135f7746
commit 71328b9be7
1 changed files with 7 additions and 0 deletions

View File

@ -626,6 +626,13 @@ static HRESULT d3d12_resource_create(struct d3d12_device *device,
bool d3d12_heap_needs_host_barrier_for_write(struct d3d12_heap *heap)
{
if (!heap)
{
/* This is a reserved resource and we have no guarantee
* it's not mapped to something with readback. */
return true;
}
switch (heap->desc.Properties.Type)
{
case D3D12_HEAP_TYPE_DEFAULT: