Philip Rebohle
cb806a5d56
[dxvk] Free memory if vkMapMemory fails
...
Otherwise, we leak the allocated memory chunk and make the
problem even worse than it already is.
2019-07-02 01:26:54 +02:00
Joshua Ashton
1dadba3cce
[dxvk] Give null values to empty DxvkGraphicsPipelineInstances
...
Silences an MSVC warning.
2019-07-01 02:46:54 +02:00
Philip Rebohle
d5c0a8c842
[dxvk] Upload HUD font texture via SDMA
2019-06-29 01:53:43 +02:00
Philip Rebohle
c7c90830c4
[dxvk] Implement image uploads on SDMA
2019-06-29 01:53:32 +02:00
Philip Rebohle
eb71c62b33
[dxvk] Implement buffer uploads on SDMA
2019-06-29 01:53:32 +02:00
Philip Rebohle
0a40e2c868
[dxvk] Support queue ownership transfer barriers
2019-06-29 01:53:32 +02:00
Philip Rebohle
f85b9088d4
[dxvk] Explicitly specify the command buffer for copy commands
2019-06-29 01:53:32 +02:00
Philip Rebohle
be24ca6099
[dxvk] Rename and add SDMA barrier sets
2019-06-29 01:53:32 +02:00
Philip Rebohle
4f3dcf2bc8
[dxvk] Add SDMA command buffer
...
This new command buffer will be submitted to the transfer queue,
if available, otherwise it will be the first buffer submitted
to the graphics queue.
2019-06-29 01:53:32 +02:00
Philip Rebohle
4e0de6bc20
[dxvk] Refactor queue submission
2019-06-29 01:53:32 +02:00
Philip Rebohle
545cd52020
[dxvk] Create transfer queue command pool if available
2019-06-29 01:53:32 +02:00
Philip Rebohle
d8163c4446
[dxvk] Don't pass queue handles to DxvkCommandList
...
Instead, pull them from the device as needed. This coupling would
only make sense if we required one command list per queue family.
2019-06-29 01:53:32 +02:00
Philip Rebohle
d2d11bf995
[dxvk] Add option to enable or disable the transfer queue
2019-06-29 01:53:32 +02:00
Philip Rebohle
191bba660b
[dxvk] Provide way to access queue properties from device
2019-06-29 01:53:32 +02:00
Philip Rebohle
1c39765b86
[dxvk] Rework queue family selection
...
This allows us to support multiple queues more easily.
2019-06-29 01:53:32 +02:00
Philip Rebohle
110fc8f833
[dxvk] Properly clear used command buffer flags
...
Fixes an issue where we would always submit the init buffer, even
if it is empty.
2019-06-29 01:53:29 +02:00
Philip Rebohle
afe2b487a6
[dxvk] Avoid redundant vertex and index buffer tracking
...
Same optimization as for regular resources. Mostly reduces load
on the cleanup thread.
2019-06-27 01:51:15 +02:00
Philip Rebohle
c3ebf4658c
[dxvk] Reorder command list reset operations by importance
2019-06-27 00:02:43 +02:00
Philip Rebohle
7491c06389
[meta] Release 1.2.3
2019-06-26 17:33:57 +02:00
Philip Rebohle
4d4db6c683
[dxvk] Use void pointers for packImageData
...
Makes this function a bit less annoying to use.
2019-06-25 14:17:03 +02:00
Philip Rebohle
3293bd21d1
[dxvk] Avoid updating binding mask on hot path in updateShaderResources
...
Assuming that everything is bound by default allows us to save a few
CPU cycles per descriptor to update as long as that assumption holds
true, while adding only a small constant cost for the update operation.
2019-06-23 23:43:25 +02:00
Philip Rebohle
b7769759f2
[dxvk] Implement comparison and setting multiple bits for DxvkBindingSet
2019-06-23 23:41:56 +02:00
Philip Rebohle
5e3336d79b
[dxvk] Clean up updateShaderResources a bit
2019-06-23 23:21:47 +02:00
Philip Rebohle
81e7a8d1f6
[dxvk] Avoid redundant resource tracking
...
Only tracks a shader resource if the resource bound to the slot
has actually changed, or if we began recording a new command
buffer. Reduces the number of atomic operations in some games.
2019-06-23 18:55:49 +02:00
Philip Rebohle
924ca9eaec
[dxvk] Add more generic version of DxvkBindingMask
2019-06-23 18:45:34 +02:00
Philip Rebohle
f58242c58d
[dxvk] Fix poor API design around defining resource slots
2019-06-23 15:49:29 +02:00
Philip Rebohle
62372f5d47
[dxvk] Release staging buffer memory for HUD context
...
We really don't want to waste 32MB of system RAM because of
one single texture update all the time.
2019-06-21 16:43:22 +02:00
Philip Rebohle
34cdba1df5
[dxvk] Add method to explicitly release staging buffer memory
2019-06-21 16:43:22 +02:00
Philip Rebohle
1c9bc235d0
[dxvk] Remove old staging buffer code
2019-06-21 16:43:22 +02:00
Philip Rebohle
8c1a56af89
[dxvk] Remove old staging buffer allocator from DxvkCommandList
2019-06-21 16:43:22 +02:00
Philip Rebohle
24c282378e
[dxvk] Use new staging buffer allocator in DxvkContext
2019-06-21 16:43:22 +02:00
Philip Rebohle
970deb452e
[dxvk] Implement new staging buffer allocator
2019-06-21 16:43:19 +02:00
Philip Rebohle
138dde6c3d
[dxvk] Prefer VRAM allocation over dedicated sysmem allocation
...
May in some cases improve performance when under memory pressure:
If a dedicated allocation is preferred, but the alloaction fails,
try to allocate memory from an already allocated chunk instead
of falling back to system memory right away.
2019-06-20 10:34:54 +02:00
Philip Rebohle
0a35ae6fca
[dxvk] Log memory utilization per heap on memory allocation failures
2019-06-19 14:47:09 +02:00
Philip Rebohle
fd1b5c8eb9
[dxvk] Add method to permanently change image layout
2019-06-15 16:45:59 +02:00
Philip Rebohle
dc3e5e5949
[meta] Release 1.2.2
2019-06-15 12:58:31 +02:00
Philip Rebohle
a715937db1
[dxvk] Always pass through fully enabled color write masks
...
May improve performance when rendering to RGB-only or Alpha-only
images, which seems to be especially common in D3D9.
2019-06-14 14:27:21 +02:00
Philip Rebohle
3dbccb1b61
[dxvk] Revert buffer re-binding optimization
...
While this optimization can significantly reduce CPU overhead, this
breaks World of Warcraft for some reason. Fixes #1086 .
2019-06-06 17:22:17 +02:00
Philip Rebohle
3de87b41a0
[dxvk] Add likely/unlikely around critical CS chunk append code
2019-06-05 22:57:51 +02:00
Philip Rebohle
461a2bec36
[dxvk] Only update buffer object in buffer slices if necessary
...
Saves CPU cycles when rebinding the same vertex, index and
constant buffers with different offsets.
2019-06-05 20:32:12 +02:00
Philip Rebohle
f501ebce97
[dxvk] Avoid redundant descriptor set updates when binding buffers
...
Reduces unnecessary overhead when binding a different range of the
same buffer, e.g. through D3D11 VSSetConstantBuffers1.
2019-06-03 20:17:15 +02:00
Philip Rebohle
42c9fad017
[dxvk] Fix binding indices for vertex attribute divisor
...
Also, only emit a divisor description if the divisor isn't 1.
2019-06-02 10:59:34 +02:00
Philip Rebohle
a82dbf6200
[dxvk] Add new helper function to compute mip level extent
...
We're going to need this outside the DxvkImage class as well.
2019-05-20 14:27:00 +02:00
Philip Rebohle
cdc5e93dac
[meta] Release 1.2.1
2019-05-19 14:43:33 +02:00
Philip Rebohle
b3f61936d2
[dxvk] Don't align pushg constant data to 64 bytes
...
Causes binaries compiled with GCC 6.3 to crash on device creation.
2019-05-15 03:07:05 +02:00
Philip Rebohle
9c93ca451d
[dxvk] Apply view swizzles to image clears
...
Fixes tone mapping in Yakuza Kiwami 2, which uses an A8_UNORM
render target and clears the alpha component to 1.
2019-05-14 21:21:29 +02:00
Philip Rebohle
0b61901424
[dxvk] Add method to swizzle clear color values
2019-05-14 21:21:14 +02:00
Philip Rebohle
3efec8960c
[dxvk] Pass clear value to clearRenderTarget by value
2019-05-14 21:19:56 +02:00
Philip Rebohle
26602b296f
[meta] Release 1.2
2019-05-13 20:40:11 +02:00
Philip Rebohle
7d6f78182b
[dxvk] Don't use ALL_COMMANDS_BIT to notify events
2019-05-09 18:07:49 +02:00