Philip Rebohle
f10be7bc85
[dxvk] Add binding methods that take rvalue references
...
The goal here is to replace the old methods entirely.
2022-08-04 13:43:32 +02:00
Georg Lehmann
8e37949a71
[util] Use raw tzcnt for BitMask iterator
...
Dereferencing an end iterator is UB, so we don't have to care about the 0
case.
2022-08-03 22:34:21 +02:00
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
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
Philip Rebohle
5fe04eb6ac
[dxvk] Fix weird indentation
...
how did this happen
2022-07-26 02:40:30 +02:00
Blisto91
b06140af47
[util] set maxFrameLatency to 1 for YS Origin
2022-07-25 16:20:28 +02:00
Philip Rebohle
08da6d8ca4
[dxbc] Bound-check mip level for resinfo instruction
2022-07-25 15:58:55 +02:00
Krzysztof Dobrowolski
abf5ed154f
[dxvk] Add Direct3D9ForceHybridEnumeration empty export function.
2022-07-25 12:04:27 +00:00
Philip Rebohle
b67d5c8c1d
[util] Correctly mark flag register as clobbered
2022-07-24 17:30:54 +02:00
Philip Rebohle
41ec5d2c52
[dxvk] Avoid bsf instruction
...
It's very slow compared to tzcnt on some CPUs, and we have a working fallback.
2022-07-24 15:24:00 +02:00
Philip Rebohle
9cd0473544
[util] Set ignoreGraphicsBarriers option for Stray
2022-07-23 21:21:22 +02:00
Philip Rebohle
9d8484f2e9
[dxvk] Use synchronization2 functions for timestamp queries
...
Again not really making use of the new stage flags, but might as well
call the function. Oversight from earlier changes.
2022-07-23 15:32:59 +02:00
Blisto91
cb291f29a1
[util] enable alphaTestWiggleRoom for Ninja Blade
2022-07-23 13:02:53 +00:00
Blisto91
f2d4455cdf
[util] enable dialog mode for NFS 3 modern patch
2022-07-22 19:47:44 +02:00
Derek Lesho
8fefb099d7
[d3d11] Add support for shared ID3D11Fence resources
2022-07-21 23:39:31 +02:00
Derek Lesho
a3548f8043
[dxvk] Add shared handle access to DxvkFence
2022-07-21 23:39:31 +02:00
Derek Lesho
a8e573b9b8
[dxvk] Enable VK_KHR_external_semaphore_win32 if available
2022-07-21 23:39:31 +02:00
Philip Rebohle
dcd2c4847b
[d3d11] Implement ID3D11Fence
...
No interop support just yet.
Co-authored-by: Derek Lesho <dlesho@codeweavers.com>
2022-07-21 02:15:16 +02:00
Philip Rebohle
05a827703b
[dxvk] Add fence support to command list
...
Co-authored-by: Derek Lesho <dlesho@codeweavers.com>
2022-07-21 02:14:59 +02:00
Philip Rebohle
4167e1b887
[dxvk] Refactor queue submission info
...
Co-authored-by: Derek Lesho <dlesho@codeweavers.com>
2022-07-21 02:14:59 +02:00
Philip Rebohle
446ec07f3b
[dxvk] Add DxvkFence
...
Co-authored-by: Derek Lesho <dlesho@codeweavers.com>
2022-07-21 02:14:59 +02:00
Philip Rebohle
a40724aaf8
[dxvk] Add timeline semaphore entry points
...
Co-authored-by: Derek Lesho <dlesho@codeweavers.com>
2022-07-21 02:14:53 +02:00
Philip Rebohle
ec813e036c
[dxbc] Fix UAV write test
...
We broke this during the null descriptor refactor. Also make it so that
we don't generate conditionals when there's nothing to test.
2022-07-20 22:56:32 +02:00
Philip Rebohle
779f8b39cd
[spirv] Track currently active block ID
2022-07-20 22:38:03 +02:00
Philip Rebohle
a178c57aea
[dxvk] Remove barrier argument from render target transition functions
...
We're always using the same barrier set anyway.
2022-07-20 16:57:27 +02:00
Philip Rebohle
16eae7adde
[dxvk] Allow resetting the state cache using the DXVK_STATE_CACHE env var
2022-07-20 13:58:50 +02:00
Kassin Dornelles
75d0b1af96
[util] Remove Resident Evil 6 workaround
...
It's actually making things worse, so better use the default path
2022-07-20 12:00:13 +02:00
Philip Rebohle
2d93760002
[dxvk] Clarify feature enablement
...
And fall back to robustImageAccess if robustImageAccess2 is not supported.
Not what we want, but better than nothing.
2022-07-19 19:08:58 +02:00
Philip Rebohle
fc796abede
[dxvk] Bump engine version reported to the Vulkan driver
...
Might help with Fossilize stuff.
2022-07-19 15:27:18 +02:00
Philip Rebohle
0ba741b7d2
[dxvk] Use copy_commands2 functions for buffer <-> image copies
2022-07-19 15:16:54 +02:00
Philip Rebohle
23846ad577
[dxvk] Use copy_commands2 functions for image copies
2022-07-19 15:16:54 +02:00
Philip Rebohle
dc1d82deff
[dxvk] Use copy_commands2 functions for buffer copies
2022-07-19 15:16:54 +02:00
Philip Rebohle
f39d49772d
[dxvk] Use copy_commands2 functions for image resolves
...
Same idea as with blits, don't expose VkImageResolve2.
2022-07-19 14:10:47 +02:00
Philip Rebohle
ff81323228
[dxvk] Use copy_commands2 functions for image blits
...
Don't expose VkImageBlit2 to client APIs since we can't easily
support pNext chains, so just convert the struct internally.
2022-07-19 13:53:28 +02:00
Philip Rebohle
563b1d7801
[dxvk] Add entry points for copy_commands2
2022-07-19 13:49:01 +02:00
Philip Rebohle
330ff8fa48
[dxvk] Use synchronization2 functions for queue submissions
2022-07-19 02:27:31 +02:00
Philip Rebohle
0c79882e84
[dxvk] Use synchronization2 functions for events
2022-07-19 02:27:31 +02:00
Philip Rebohle
adb906b18c
[dxvk] Use synchronization2 functions for barriers
...
We don't really use the new stage/access flags yet, and I'm not sure
whether we will move to them since the benefits seem rather limited.
However, using the functions means we can bypass a lot of internal
translation inside some Vulkan drivers.
2022-07-19 02:27:31 +02:00
Philip Rebohle
0d65142136
[dxvk] Add entry points for new synchronization API
2022-07-18 22:49:49 +02:00
Philip Rebohle
17205f5353
[dxvk] Fix formatting in barrier function
2022-07-18 22:49:47 +02:00
Blisto91
e28b268351
[util] Enable disableMsaa option for Mary Skelter 2
2022-07-18 22:17:13 +02:00
Philip Rebohle
e6df48fa3e
[dxvk] Fix a derp
2022-07-18 14:53:29 +02:00
Philip Rebohle
a76b5693f3
[dxvk] Clean up remaining object creation code
2022-07-18 14:52:12 +02:00
Philip Rebohle
9ebeb8e502
[dxvk] Clean up instance creation code a bit
2022-07-18 14:51:40 +02:00
Philip Rebohle
a1ace8ef21
[dxvk] Clean up misc. code
2022-07-18 14:51:26 +02:00
Philip Rebohle
37f31ae1e7
[dxvk] Clean up more code around object creation in meta passes
2022-07-18 14:50:29 +02:00
Philip Rebohle
fc461d0e27
[dxvk] Clean up some swapchain creation code
2022-07-18 14:49:28 +02:00
Philip Rebohle
04f43f0d2c
[dxvk] Clean up sampler creation code
2022-07-18 14:36:08 +02:00
Philip Rebohle
6276d5503c
[ðxvk] Clean up some device creation code
2022-07-18 14:31:09 +02:00
Philip Rebohle
d29d403c67
[dxvk] Clean up buffer and buffer view creation code
2022-07-18 14:21:23 +02:00
Philip Rebohle
0b11995dea
[dxvk] Clean up image and image view creation code
...
Someone was dunk while setting pNext to VK_NULL_HANDLE instead of nullptr.
2022-07-18 14:19:06 +02:00
Philip Rebohle
8d1b9eca5d
[dxvk] Fix blending with A8 render targets
2022-07-17 17:06:42 +02:00
Philip Rebohle
f15466a2c5
[dxvk] Remove remaining built-in specialization constants
2022-07-17 17:06:42 +02:00