Commit Graph

254 Commits

Author SHA1 Message Date
Robin Kertels a81c653b42 [d3d9] Fix synchronization after readback 2022-02-22 21:49:28 +00:00
Robin Kertels 29d8812709 [d3d9] Don't set NeedsReadback for POOL_SYSMEM textures
... or in SetRenderTarget because we always do readback for render targets.
2022-02-21 13:43:04 +00:00
Robin Kertels b163a99bde [d3d9] Clean up texture locking
We had two code paths that largely did the same.
2022-02-21 00:08:41 +00:00
Robin Kertels dde83717f1 [d3d9] Rename WrittenByGPU to NeedsReadback 2022-02-21 00:08:41 +00:00
Robin Kertels 40444c1f50 [d3d9] Unify texture uploads 2022-02-21 00:08:41 +00:00
Robin Kertels 97ae14b6a0 [d3d9] Synchronize only to given sequence number in WaitForResources 2022-02-20 03:29:31 +00:00
Robin Kertels 917a8d00a2 [d3d9] Track last staging resource usage with a sequence number 2022-02-20 03:29:31 +00:00
Robin Kertels c12cd1952c [d3d9] Handle different mip chain lengths in UpdateTexture 2022-02-20 03:29:04 +00:00
Philip Rebohle 4d9b464f7c
[d3d9] Use new waitForResource method 2022-02-14 03:15:47 +01:00
Philip Rebohle a03c038f03
[d3d9] Exit early in ProcessVertices if the vertex count is 0
We don't want to pass a zero-sized copy to the backend.
2022-02-13 02:08:19 +01:00
Philip Rebohle d96c5a1076
[dxvk] Store DXVK device inside DxvkCsThread object 2022-02-13 02:07:48 +01:00
Philip Rebohle 37f3d9208b
[dxvk] Introduce sequence numbers for CS submissions 2022-02-11 18:17:34 +01:00
Robin Kertels b220c8989b [d3d9] Only enable FETCH4 for single channel formats 2022-01-28 21:34:18 +00:00
Georg Lehmann f5744284eb [d3d9] Dirty FF vertex shader if any D3D9VertexDeclFlags change.
The vertex shader depends on all of these in some way.
2022-01-10 22:06:15 +00:00
Christopher Egert b1a6cbad7f [d3d9] Update FFVS when D3DFVF_PSIZE is specified.
This fixes #2387
2022-01-10 20:05:41 +00:00
Robin Kertels 6c17b8801c [d3d9] Add strict option to float emulation setting 2021-12-05 16:49:19 +00:00
Robin Kertels 804eca9cad [d3d9] Respect shader defined constants for HWVP/PS buffer binding range 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
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
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
Georg Lehmann 827c7a892c [util] Replace countof with std::size 2021-09-10 11:58:46 +01: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
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
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 6103e3c800 [d3d9] Use BitMask helper 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
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 a1f0bb99ee
[d3d9] Cleanup D3D9DeviceEx members 2021-08-11 01:38:34 +01:00
Joshua Ashton 5e48035e99
[d3d9] Only bind textures if they are used by the shader 2021-08-11 01:08:13 +01:00
Joshua Ashton c0c1565cba [d3d9, dxso] Alias color and depth samplers and improve tracking
Takes me from 340 -> 460fps in A Hat in Time's main menu when CPU bound.
2021-08-10 23:46:03 +00:00
Joshua Ashton 85468a5526 [d3d9] Add extra brackets to fetch4 filter check 2021-08-09 22:54:19 +00:00
Joshua Ashton 674f008e23 [d3d9] Use m_activeTexture mask for SRGB check 2021-08-09 22:54:19 +00:00
Joshua Ashton 1823a098a1 [d3d9] Clean up SetStateSamplerState 2021-08-09 22:54:19 +00:00