vkd3d: Ignore DiscardResource for committed resources.
Not required for correctness. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This commit is contained in:
parent
7139b4de83
commit
d38544e0a2
|
@ -8283,6 +8283,13 @@ static void STDMETHODCALLTYPE d3d12_command_list_DiscardResource(d3d12_command_l
|
|||
return;
|
||||
}
|
||||
|
||||
/* Only care about resources which could alias memory with something else.
|
||||
* We only need to transition committed resources once,
|
||||
* and render targets tend to be that.
|
||||
* There are no particular performance benefits in using DiscardResource as far as I know ... */
|
||||
if (!d3d12_resource_may_alias_other_resources(texture))
|
||||
return;
|
||||
|
||||
/* Assume that pRegion == NULL means that we should discard
|
||||
* the entire resource. This does not seem to be documented. */
|
||||
resource_subresource_count = d3d12_resource_get_sub_resource_count(texture);
|
||||
|
|
Loading…
Reference in New Issue