1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-14 00:48:44 +01:00
Commit Graph

3750 Commits

Author SHA1 Message Date
Robin Kertels
804eca9cad [d3d9] Respect shader defined constants for HWVP/PS buffer binding range 2021-11-30 01:57:22 +00:00
Robin Kertels
ce1c66d7dc [dxso] Omit relative constant range check when possible
We can just rely on robustness2 when it's supported.
2021-11-30 01:57:22 +00:00
Robin Kertels
0061139652 [d3d9] Copy shader defined constants into SWVP UBO
Co-authored-by: Christopher Egert <cme3000@gmail.com>
Co-authored-by: Georg Lehmann <dadschoorse@gmail.com>
2021-11-30 01:57:22 +00:00
Robin Kertels
39039f9ac8 [dxso+d3d9] Clean up texture slots 2021-11-30 01:57:22 +00:00
Paul Gofman
b672c07a93 [d3d9] Send WM_ACTIVATEAPP messsage on WM_SIZE. 2021-11-30 01:48:24 +00:00
Philip Rebohle
1abd205216
[d3d11] Compute image data layout for unmapped textures
We sometimes need this information when uploading image data. Fixes #2380.
2021-11-29 16:55:35 +01:00
Philip Rebohle
b6cd6aaecc
[d3d11] Fix depth aspect not being applied to some D16_UNORM views 2021-11-29 15:39:41 +01:00
Georg Lehmann
97f03127e9 [dxso] Remove empty dxso_helpers.h 2021-11-25 21:50:59 +00:00
Georg Lehmann
c2a66c043a [dxvk] Remove empty dxvk_main 2021-11-25 21:50:59 +00:00
Georg Lehmann
12249fd330 [dxso] Fix constant buffer debug names 2021-11-11 23:54:05 +00:00
Joshua Ashton
4c0eee89e4 [d3d9] Use clamped LOD for creating new views 2021-11-11 23:53:38 +00:00
Joshua Ashton
c22dcdbaa3 [d3d9] Clamp LOD in calls to SetLOD
MSDN says this is clamped and returns the clamped value.

Closes: #1869
2021-11-11 23:52:35 +00:00
Joshua Ashton
5d4b7db9e6 [d3d9] Fix = alignent in CreateView 2021-11-11 23:51:59 +00:00
Philip Rebohle
2abe2132a6
[dxvk] Implement framebuffer cache
Reduces the number of object allocations per frame.
2021-11-09 18:09:50 +01:00
Philip Rebohle
a987b729a7
[dxvk] Introduce DxvkFramebufferKey
Can be used to cache framebuffer objects.
2021-11-09 17:49:22 +01:00
Philip Rebohle
2527ea45b9
[dxvk] Refactor framebuffer creation 2021-11-09 16:37:33 +01:00
Philip Rebohle
f1aad6cb7b
[dxvk] Remove frame buffer from context state 2021-11-09 16:37:33 +01:00
Philip Rebohle
5b725205ef
[dxvk] Introduce DxvkFramebufferInfo
Stores all info that is currently held by the DxvkFramebuffer class,
but is not heap-allocated and will not create an actual framebuffer
object.
2021-11-09 16:37:31 +01:00
Philip Rebohle
1fd037cf29
[dxvk] Fix load aspect mask in render pass creation 2021-11-05 16:09:05 +01:00
Philip Rebohle
4c88335f66
[util] Shrink Nvidia HVV heap for Final Fantasy XIV
Fixes #2210.
2021-11-03 13:27:39 +01:00
Philip Rebohle
778aee0372
[dxvk] Rework Nvidia HVV option 2021-11-02 00:52:25 +01:00
Joshua Ashton
8912c7adb0 [d3d9] Fix long driver/device names not being null terminated
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-22 02:58:53 +00:00
Joshua Ashton
409a6f5c3f [d3d11] Use atomics for NVX handles
Primarily to make DXVK native happy, but also much cleaner.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-22 03:15:03 +02:00
Georg Lehmann
b163503f7c [dxso] Respect SM2+ sampler source swizzle. 2021-10-20 17:43:52 +00:00
Robin Kertels
79a20c463f [util] Enable apitrace mode for Crysis 3 Remastered 2021-10-18 18:23:58 +02:00
Robin Kertels
7f89fe1406 [d3d9+utils] Remove swvp hack 2021-10-15 10:54:18 +01:00
Robin Kertels
530f87f158 [d3d9+dxso] Rely on robustness for unset HW VS & PS constants 2021-10-15 10:54:18 +01:00
Robin Kertels
869f75895c [d3d9+dxso] Switch constant buffer order 2021-10-15 10:54:18 +01:00
Robin Kertels
791d533a1d [d3d9+dxso] Rely on robustness for unset SWVP constants 2021-10-15 10:54:18 +01:00
Robin Kertels
01f633289b [d3d9] Use mapped slice when locking POOL_DEFAULT textures
Fixes an issue where the game would end up using the wrong
buffer slice if it previously mapped the same texture with DISCARD.

Fixes #2329
2021-10-15 10:46:40 +01:00
Philip Rebohle
3e64e1b3f5
[dxvk] Explicitly stop state cache worker threads on device destruction
Otherwise, the workers may access objects that are being destroyed an
app thread.
2021-10-08 00:54:59 +02:00
Paul Gofman
24eb875f02 [dxgi] Return success from DxgiSwapChain::Present1() if window is destroyed 2021-10-07 20:34:37 +02:00
oltolm
1ef4e60b69 [dxvk] fix barrier tracking code 2021-10-06 02:59:31 +02:00
Philip Rebohle
ec18532ed4
[dxvk] Use new barrier tracking for images 2021-10-01 15:52:41 +02:00
Philip Rebohle
30bc137f9c
[dxvk] Use new barrier tracking for buffers 2021-10-01 15:52:41 +02:00
Philip Rebohle
195b7d7155
[dxvk] Add fast versioned hash table for barrier tracking 2021-10-01 15:52:41 +02:00
Philip Rebohle
714ca48271
[dxvk] Work around device creation failure with CUDA interop extensions 2021-10-01 15:43:19 +02:00
Philip Rebohle
b36fa75d1d
[dxvk] Disable CUDA interop extensions on 32-bit builds 2021-10-01 15:32:40 +02:00
Philip Rebohle
8225891751
[dxvk] Fix copy-paste mistake when enabling bufferDeviceAddress feature 2021-10-01 15:32:40 +02:00
Philip Rebohle
aa4b7c9f92
[dxvk] Rework 32-bit check 2021-10-01 14:18:42 +02:00
Philip Rebohle
7193962381
[d3d11] Enable VK_KHR_buffer_device_address if necessary
Just enabling the extension doesn't necessarily do anything.
2021-10-01 14:12:17 +02:00
Philip Rebohle
1fefdf2ab6
[dxvk] Add VK_KHR_buffer_device_address extension info 2021-10-01 14:12:17 +02:00
Robin Kertels
c8341e4be3 [d3d9] Fix lenient clears 2021-09-28 21:14:02 +01:00
Robin Kertels
c4449faf5a [d3d9] Don't clamp clears to the size of RT 0 2021-09-27 21:57:15 +01:00
Robin Kertels
29ee1a74e6 Revert "[d3d9] Avoid depth degenerate viewports"
This reverts commit 78d22cc7a5.
2021-09-27 14:55:49 +01:00
Robin Kertels
d799b44d91 [dxso] Ensure pow base is >= 0 in LIT 2021-09-26 22:33:01 +01:00
Robin Kertels
2735988fa2 [d3d11] Only use cube arrays for regular cubemap views when enabled 2021-09-26 23:17:16 +02:00
Adam Moss
86148ec070
[d3d11,dxvk] Implement DXVK pieces required for DX11 DLSS support
Notably, fairly generic functions to create/launch/destroy Cuda kernels,
and methods to fetch GPU virtual addresses and handles for DX11 resources.

Note: Requires some corresponding dxvk-nvapi changes for DLSS to
be initialized successfully.
2021-09-24 15:10:07 +02:00
Philip Rebohle
3a712b766e
[dxvk] Introduce accessMemory for barrier tracking 2021-09-24 15:07:59 +02:00
Philip Rebohle
b79ce7af8a
[meta] Release 1.9.2 2021-09-20 15:07:25 +02:00
Philip Rebohle
9eb83c187c [util] Make bool and tristate options case-insensitive 2021-09-19 19:21:49 +02:00
Philip Rebohle
dd7ffbc803
[d3d11] Also validate draw buffer for DispatchIndirect
Oversight.
2021-09-12 16:18:25 +02:00
Philip Rebohle
de7fb51e64
[d3d11] Validate indirect draw buffer size
Otherwise, if the draw parameter offset is out of bounds, we
may hang the GPU.

Fixes #2286.
2021-09-12 01:23:04 +02:00
Georg Lehmann
827c7a892c [util] Replace countof with std::size 2021-09-10 11:58:46 +01:00
Philip Rebohle
5f9d5f1053
[dxvk] Fix IgnoreWriteAfterWritw check for indirect dispatches 2021-09-10 02:50:52 +02:00
Philip Rebohle
2f01df82d2
[dxbc] Fix invalid NonReadable/NonWritable decorations 2021-09-09 19:35:51 +02:00
Philip Rebohle
5db76784bd
[dxbc] Accurately determine access flags for UAVs 2021-09-09 15:53:02 +02:00
Philip Rebohle
c9f7ccc7f9
[dxvk] Fix hazard detection for shader resources 2021-09-09 14:58:04 +02:00
Philip Rebohle
67391a7bb0
[d3d11] Introduce d3d11.ignoreGraphicsBarriers option 2021-09-09 14:28:25 +02:00
Philip Rebohle
5109000747
[dxvk] Add IgnoreGraphicsBarriers flag 2021-09-09 14:28:25 +02:00
Philip Rebohle
fe68b43335
[dxvk] Deduplicate buffer and image slices in barrier array
Fixes some major performance issues when dealing with many
consecutive dispatch calls.
2021-09-09 14:24:55 +02:00
Vincent Grande
f0e9700f34
[d3d10] Add missing include 2021-09-03 12:54:50 +02:00
Philip Rebohle
c0a7143d1b
[vulkan] Fix missing include
Fixes #2269.
2021-09-02 16:34:55 +02:00
pingubot
69588b02fe
Update config.cpp (#2256) 2021-08-27 13:10:24 +02:00
Georg Lehmann
b498040f7d [d3d9] Disable explicit front buffer for Fantasy Grounds 2021-08-26 09:26:10 +01:00
tayarani
2786bbda64
Fix DxvkShaderConstData garbage pointer for default constructor 2021-08-25 02:20:26 +02:00
Mahdi Tayarani
ae881981f9 Fix raw() accessor on the Flags class
The current implementation has a bug where it casts the underlying
int type to a uint32_t. The is incorrect for enums like DxvkShaderFlag
which are based on uint64_t.
2021-08-24 22:23:20 +02:00
Georg Lehmann
4b50d24231 [util] Force 60 fps for Sine Mora EX 2021-08-24 19:42:55 +02:00
Georg Lehmann
ed70f9a07c [d3d9] Support unsupported formats in LockRect 2021-08-23 17:38:50 +01:00
Georg Lehmann
82d40f5bba [d3d9] Return a pointer in GetUnsupportedFormatInfo 2021-08-23 17:38:50 +01:00
Philip Rebohle
fa4f40a0e6
[dxvk] Remove transform feedback self-dependency from render passes
Fixes a whole bunch of validaton errors since this was technically invalid.
2021-08-23 17:35:58 +02:00
Philip Rebohle
2f5c7562c2
[dxvk] Track transform feedback counter hazards properly
If we avoid needlessly pausing and resuming transform feedback with the
same counters, we can use existing barrier tracking to insert counter
barriers without requiring an invalid render pass self-dependency.
2021-08-23 17:35:58 +02:00
Georg Lehmann
04474b761b [d3d9] Brain-dead gamma ramp validation 2021-08-23 15:41:59 +01:00
Georg Lehmann
3fc1f2cecb [util] Fix MSVC build 2021-08-23 15:41:31 +01:00
Philip Rebohle
50c6974f3a [dxso] Fix gradient instructions for cube maps
We need 3 components in that case. Based on MSDN documentation, texldd
does not support 3D textures so there's no need to worry about those.

Fixes validation errors in Payday.
2021-08-23 13:50:54 +01:00
Alejandro Bringas Martinez
d48b33bf95 Fix poor performance in Homefront The Revolution
in certain places when displaying "wide open" and at long range it has a very poor performance of 35-45fps, but with this option it goes up to a stable 60fps on my GTX1060 6Gb
2021-08-19 13:40:05 +02:00
Georg Lehmann
41d0fcff95 [d3d9] Disable projection for PS 1.4 2021-08-19 01:47:42 -07:00
Robin Kertels
956b23c9e9 [d3d9] Use correct pitch to calculate buffer offset 2021-08-18 13:31:00 -07:00
Robin Kertels
97e91b6c0f [d3d9] Respect pitch alignment in GetFrontBufferData 2021-08-18 13:31:00 -07:00
Joshua Ashton
3718cee9eb [d3d9] Clean up texture type tracking
Additionally stops leaky pipelines on PS 1.x shaders from partial mask updates.
2021-08-17 07:02:56 -07:00
Joshua Ashton
64852f05c3 [d3d9] Track fixed function sampler bitfields
Cleans some stuff up a little bit and makes FF draws faster when this gets incorrectly invalidated.
2021-08-17 07:02:56 -07:00
Joshua Ashton
c6a4c41d20 [d3d9] Batch texture unbinding 2021-08-17 07:02:56 -07:00
Joshua Ashton
a346949304
[d3d9] Remove needless locks in SetTexture and SetSamplerState 2021-08-16 19:09:16 +01:00
Georg Lehmann
789e19d2ac [dxbc] Use BitMask helper 2021-08-16 08:49:46 -07:00
Georg Lehmann
b13260c689 [d3d11] Use BitMask helper 2021-08-16 08:49:46 -07:00
Georg Lehmann
6103e3c800 [d3d9] Use BitMask helper 2021-08-16 08:49:46 -07:00
Georg Lehmann
b037fc8882 [dxvk] Use BitMask helper 2021-08-16 08:49:46 -07:00
Philip Rebohle
ffc351f2f5 [util] Introduce BitMask helper 2021-08-16 08:49:46 -07:00
Joshua Ashton
64f417d6e6 [util] Add bsf helper
For when we know we aren't going to put in a mask of 0, we can use this and get better codegen.
2021-08-16 08:49:46 -07:00
Joshua Ashton
b09b912797
[d3d9] Fix unbinding textures
Closes: #2236
2021-08-16 15:33:49 +01:00
Georg Lehmann
a75cf2f39d [d3d9] Fix parital DS clears with full RT clear 2021-08-15 19:00:47 +00:00
Georg Lehmann
a2330b89d2 [dxso] Implement TexDepth 2021-08-12 02:17:16 +00:00
Joshua Ashton
7acbd0f4e1
[d3d9] Expose D3DPMISCCAPS_CLIPTLVERTS
Matches what we actually do and fixes a Wine test
2021-08-11 12:44:28 +01:00
Joshua Ashton
a6156856e5 [d3d9] Don't check for NULL pViewport
This cannot be NULL.
2021-08-11 11:44:09 +00:00
Joshua Ashton
78d22cc7a5 [d3d9] Avoid depth degenerate viewports 2021-08-11 11:44:09 +00:00
Joshua Ashton
5f4f4d57df
[d3d9] Fix initial mapping of images written by GPU 2021-08-11 12:14:17 +01:00
Joshua Ashton
679d703efc [d3d9] Fix upload race with default image mapping
Fixes a Wine test
2021-08-11 11:53:17 +02:00
Robin Kertels
60a7047550 [d3d9] Fix D3DLOCK_READONLY handling with evictManagedOnUnlock 2021-08-11 07:35:39 +00:00
Joshua Ashton
2c8099adf1
[d3d9] Use Texture2D for CommonTexture resolution
Using the generic texture type was a nice idea in theory, but some compilers did not give it a vtable as it was abstract, resulting in a crash here.
2021-08-11 04:25:29 +01:00
Joshua Ashton
ab7fc42f2f
[d3d9] Fix stateblock refcounting 2021-08-11 01:38:50 +01:00