1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-12 22:08:59 +01:00
Commit Graph

4920 Commits

Author SHA1 Message Date
Philip Rebohle
fc7e934854
[util] Always inline Rc::decRef and Rc::incRef
GCC feels the need to generate functions with two instructions for some
reason. Doesn't meaningfully change performance, but makes profiling a
lot easier in some instances.
2022-08-03 15:15:11 +02:00
Joshua Ashton
ac2d3e952d [util] Set m_size in small_vector::resize
Turns out this has been broken since it was added, meaning
isViewCompatible has always returned false putting us down slow paths
for UAV clears + copies for the past two years.
2022-08-02 23:54:23 +02:00
Philip Rebohle
c1cb4d9d18
[dxvk] Add feature check for external semaphores 2022-08-02 14:37:31 +02:00
Rosen Penev
08424ccb2e
[d3d9] Add missing vector header
Fixes compilation under MSYS2's clang backend.
2022-08-02 13:10:12 +02:00
Joshua Ashton
715493cd75 [d3d10] Mark D3D10ShaderReflection classes as final
Fixes warnings about calling delete on non-final inherited objects.
2022-08-02 13:09:34 +02:00
Philip Rebohle
5256d5e2f6
[dxvk] Fix minor edge cases when parsing floats in config file 2022-08-01 20:24:31 +02:00
Philip Rebohle
727fd7ac33
[d3d11] Add option to control sampler LOD bias 2022-08-01 13:15:09 +02:00
Philip Rebohle
9671055538
[util] Support parsing floating point arguments 2022-08-01 12:05:43 +02:00
pchome
8db2eb51fa [d3d9] fix ordinal values in the DEF file 2022-07-31 14:57:58 +01:00
Philip Rebohle
54f989b2e6 [dxso] Introduce getSpecConstantBufferSlot 2022-07-31 02:10:37 +01:00
Philip Rebohle
a2ef99b95c [d3d9] Generalize D3D9ConstantBuffer constructor 2022-07-31 02:10:37 +01:00
Philip Rebohle
00eaec1619
[dxvk] Use normalized state to look up optimized graphics pipelines
We can't normalize all state at the time it is bound, e.g. disabling
unused blend state before render targets are known. By looking up
pipelines using normalized state we ensure that our VkPipelines are
actually unique.

Based on my testing this only affects a small number of pipelines in
most games (anywhere from 0 to a couple dozen), with some outliers
like The Witcher 1, where a third of the pipelines are redundant due
to stale render state.
2022-07-31 02:53:20 +02:00
Philip Rebohle
db786cda6c
[dxvk] Remove old code to process specialization constants
We barely use spec constants anymore, so a much simpler solution will do.
2022-07-31 02:53:20 +02:00
Philip Rebohle
b2969f628f
[dxvk] Introduce DxvkGraphicsPipelineDynamicState 2022-07-31 02:53:20 +02:00
Philip Rebohle
63420c0cd7
[dxvk] Introduce DxvkGraphicsPipelineShaderState
And factor out a bunch of related code.
2022-07-31 02:53:20 +02:00
Philip Rebohle
30fa9df868
[dxvk] Introduce DxvkGraphicsPipelineSpecConstantState 2022-07-31 02:53:20 +02:00
Philip Rebohle
32c2d91961
[dxvk] Make DxvkShaderModuleCreateInfo usable with lookup tables 2022-07-31 02:53:20 +02:00
Philip Rebohle
9cb0d6d610
[dxvk] Make fragment shader state usable with lookup tables 2022-07-31 02:53:20 +02:00
Philip Rebohle
97ab6a313b
[dxvk] Make pre-rasterization state usable with lookup tables 2022-07-31 02:53:20 +02:00
Philip Rebohle
0a15146746
[dxvk] Use unordered map to look up base pipelines
No reason to use a linear list here. The object is always locked
when we access this list, so we don't need the lock-free one here.
2022-07-31 02:53:20 +02:00
Philip Rebohle
0eaad2eb5b [dxso] Don't create shader object for redundant PS permutations 2022-07-30 22:15:41 +01:00
Joshua Ashton
76ddd2a35a [build] Use current_source_dir instead of source_root
source_root is deprecated and doesn't work if we are used in a subproject
2022-07-30 21:28:09 +02:00
Joshua Ashton
297759be4e [build] Initial reworkings for non-Windows platform support in Meson 2022-07-30 21:28:09 +02:00
Philip Rebohle
8d72b8e820
[dxvk] Reject pipelines that set unused spec constants 2022-07-30 21:24:15 +02:00
Philip Rebohle
54f9eaf13c
[dxvk] Don't spam log messages when pipeline state validation fails 2022-07-30 21:17:21 +02:00
Philip Rebohle
4d8b75c8fb
[d3d9] Fix spec constant derp 2022-07-30 20:38:58 +02:00
Philip Rebohle
10e6d0ef8a
[dxvk] Don't redundantly reset spec constant values
No longer needed.
2022-07-30 20:38:04 +02:00
Philip Rebohle
ec7de66419 [util] Use transcodeString in tows and fromws helpers 2022-07-30 20:30:32 +02:00
Philip Rebohle
1c08725acd [util] Use transcodeString in createDirectory function 2022-07-30 20:30:32 +02:00
Philip Rebohle
65070bd765 [util] Use transcodeString in setThreadName function 2022-07-30 20:30:32 +02:00
Philip Rebohle
bb3c0b9707 [dxgi] Use transcodeString to convert adapter name 2022-07-30 20:30:32 +02:00
Philip Rebohle
200df73ba7 [util] Implement utility functions for string conversion 2022-07-30 20:30:32 +02:00
Robin Kertels
bad7d4690b [d3d9] Handle very large Up draws 2022-07-30 20:29:31 +02:00
Philip Rebohle
2782afaf8a
[dxvk] Inline pushConstants method
No reason not to.
2022-07-30 17:52:55 +02:00
Philip Rebohle
94ca65d587
[dxvk] Ignore spec constants that are not used by the current pipeline
May reduce the number of pipeline permutations.
2022-07-30 17:42:46 +02:00
Philip Rebohle
47794b661e
[dxvk] Only pass requried spec constants when compiling compute pipelines 2022-07-30 16:00:28 +02:00
Philip Rebohle
b90f8819c6
[dxvk] Only pass required spec constants when compiling graphics pipelines 2022-07-30 15:54:38 +02:00
Philip Rebohle
80a58f000a
[dxvk] Generate bit mask of used spec constants in DxvkShader
This way we can more accurately track which constants are used, and not
pass any unnecessary data at compile time. We can extend this in the
future to also skip unused constants for pipeline lookups.

Also, any spec constant with the ID of MaxNumSpecConstants will be treated
as a spec constant selector. If the shader uses this constant, it is assumed
that it does not access any other spec constants if the value of this constant
is 0. This will allow shaders with spec constants to be used with pipeline
libraries.
2022-07-30 15:46:47 +02:00
Joshua Ashton
753aede1fc [d3d9] Correct comment about ProjectionType 2022-07-30 12:34:18 +00:00
Joshua Ashton
1d1f0c7e7e [d3d9] Document D3D9SpecConstantId 2022-07-30 12:30:33 +00:00
Robin Kertels
ea76bfd019 [d3d9] Unmap unused resources 2022-07-29 13:14:33 +01:00
Robin Kertels
b4f432f1de [util] Implement LRU list 2022-07-29 13:14:33 +01:00
Robin Kertels
6ca6554452 [d3d9] Use memory mapped files for textures 2022-07-29 13:14:33 +01:00
Robin Kertels
d598fd3156 [d3d9] Add HUD item for unmappable memory 2022-07-29 13:14:33 +01:00
Robin Kertels
c3dbb6429f [d3d9] Implement memory allocator for memory mapped files 2022-07-29 13:14:33 +01:00
Robin Kertels
08ad6583ea [d3d9] Only set upload bit for managed textures
Otherwise D3DPOOL_DEFAULT can hit the draw time late
upload path.
2022-07-29 13:14:33 +01:00
Robin Kertels
ba4d95c5fc [d3d9] Remove direct upload path
And remove some tracking that will no longer be necessary.
2022-07-29 13:14:33 +01:00
Robin Kertels
45c1d7911e [d3d9] Remove evictManagedOnUnlock
This is annoying to maintain and hopefully won't be necessary anymore.
2022-07-29 13:14:33 +01:00
Robin Kertels
116feca6af [d3d9] Handle unbound textures in fixed function shaders 2022-07-28 14:56:28 +00:00
Philip Rebohle
6c5f73ac26
[dxvk] Reintroduce VkPhysicalDeviceIDProperties
We need this to get the device LUID. Wine does not fill in the
LUID properties in VkPhysicalDeviceVulkan11Properties right now.

Fixes DLSS not working, as well as other potential issues.
2022-07-26 22:38:33 +02:00