1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-30 04:24:11 +01:00
Commit Graph

2356 Commits

Author SHA1 Message Date
Philip Rebohle
f6dbf5bbf0
[dxvk] Increase staging buffer size to 32 MiB
Since the chunk size was also doubled to 128 MiB and we want
staging buffers to get their own allocations.
2019-07-04 20:39:27 +02:00
Philip Rebohle
3b1376b2fe
[dxvk] Increase memory chunk size to 128 MiB
Nvidia drivers apparently don't like smaller chunks very much.
May increase overall memory consumption and fragmentation.
2019-07-04 16:11:13 +02:00
Philip Rebohle
3b128179ab
[dxvk] Print VK_EXT_memory_budget stats on allocation failure
Based on PR #1112, but using a cleaner method to check
support for the VK_EXT_memory_budget extension.

Suggested-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
2019-07-03 11:11:12 +02:00
Philip Rebohle
ac9610f377
[dxvk] Add VK_EXT_memory_budget as a passive extension 2019-07-03 11:02:13 +02:00
Philip Rebohle
f21c02caef
[dxvk] Add support for passive device extensions
These extensions only affect physical device functionality and
do not have to be enabled during device creation.
2019-07-03 10:59:48 +02:00
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
Joshua Ashton
c381e8a29e [util] Add correct type suffixes to Sha1Hash dword function to silence compiler warning 2019-07-01 02:46:54 +02:00
Philip Rebohle
67122d9246
[d3d11] Enable initial image uploads over SDMA 2019-06-29 01:53:43 +02:00
Philip Rebohle
9d902418c0
[d3d11] Enable initial buffer uploads over SDMA 2019-06-29 01:53:43 +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
770ec2c4db
[dxvk] Get rid of array in present vertex shader 2019-06-29 01:34:16 +02:00
Philip Rebohle
42e61020e4
[d3d11] Remove unused SetRenderTargets method 2019-06-27 15:54:42 +02:00
Philip Rebohle
2148619f3c
[d3d11] Spill render pass when restoring context state as needed 2019-06-27 15:54:42 +02:00
Philip Rebohle
a704e6d27e
[d3d11] Fix UAV binding in OMSetRenderTargets{,AndUnorderedAccessViews}
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.
2019-06-27 15:54:42 +02:00
Joshua Ashton
194db57a4d [spirv] Expose MatrixStride decoration for members 2019-06-27 10:49:49 +02:00
Joshua Ashton
80808d743b [spirv] Add generic memberDecorate 2019-06-27 10:49:49 +02:00
Joshua Ashton
1b8c54eb84 [spirv] Expose opMatrixTimesMatrix, opMatrixTimesVector and opVectorTimesMatrix 2019-06-27 10:49:49 +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
5728d10587
[d3d11] Copy initial texture data to mapped buffer, if available
Otherwise, if an application maps the image right after creating it,
we might end up reading garbage data or overriding the image data.
2019-06-25 14:22:47 +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
Andrew Eikum
326eb0bf80 [dxgi] Don't fail leaving fullscreen if window is already destroyed
Unreal Engine 4 games destroy the window, then call
SetFullscreenMode(FALSE). If this call fails, they pop up an error
dialog. Wine tests show that this call should succeed.
2019-06-21 17:27:34 +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
a41bd8c4a0
[d3d11] Further optimize constant buffer binding
Saves a few CPU cycles on the more common SetConstantBuffers method,
compared to SetConstantBuffers1.
2019-06-20 22:49:19 +02:00