And resolve some include madness. Necessary because D3D11Shader::GetDevice
needs to know the full definition of D3D11Device, but D3D11Device needs
to know the full definition of the other shader-related classes.
Unlike for compute shaders, we're supposed to replace all UAV bindings
when binding render targets. We also should spill the render pass when
disabling UAV rendering to avoid read-after-write hazards.
Fixes a potential synchronization bug encountered in Devil May Cry 5.
Matches Windows behaviour and fixes a crash in Yakuza Kiwami 2,
which calls Release() on RTVs and DSVs until the public reference
count reaches zero. Close#1053.
Otherwise we pass an invalid offset and length to the backend,
which leads to invalid descriptor set updates in Vulkan.
The D3D11 runtime does not report corrected constant offset
and count parameters to the applicaion in *GetConstantBuffers1.
Reported-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Introduces an OpenGL-style bind point for the argument buffer, which
means we can avoid a lot of unnecessary reference tracking in games
that do a lot of indirect draw calls.
Reduces CPU overhead in Assassin's Creed Odyssey.
Spilling the render pass should make shader storage buffer/image writes
visible due to how external subpass dependencies are defined. For UAV
rendering, we need to do this when changing the UAVs, even if the render
targets themselves do not change.
Since we are doing this for UAVs already, we should be
doing this for all view classes in order to account for
the minor differences between all of them.