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

2632 Commits

Author SHA1 Message Date
Philip Rebohle
09c813c934
[dxvk] Use packed rasterizer state 2019-10-07 22:01:47 +02:00
Philip Rebohle
a5ab88d8f2
[dxvk] Use packed input layout state
Also move attribute and binding descriptions to the end
so that comparisons are more likely to fail early.
2019-10-07 22:01:47 +02:00
Philip Rebohle
c0ae4e38eb
[dxvk] Use packed input assembly state 2019-10-07 22:01:47 +02:00
Philip Rebohle
8d09aa12da
[dxvk] Move DxvkGraphicsPipelineStateInfo to new file
We're going to put a lot of code here, so try to keep things clean.
2019-10-07 22:01:47 +02:00
Philip Rebohle
9dad44a6b1
[dxvk] Prepare for pipeline state changes and bump cache format to v7
One of the changes includes hard-coding certain constants into the old
pipeline state structs, since changing the constants would invalidate
any old state cache and making the conversion pointless.
2019-10-07 22:01:47 +02:00
Philip Rebohle
32dff89b2d
[dxvk] Don't use alignas(16) for DxvkMetaClearArgs members
Instead, pad members explicitly. This is necessary because GCC
makes incorrect assumptions about stack alignment on 32-bit.
2019-10-07 22:01:47 +02:00
Joshua Ashton
ca634ec484 [dxvk] Add missing {} to border color list
Fixes a warning when compiling with Clang
2019-10-06 00:28:19 +02:00
Joshua Ashton
e8ee7a0790 [util] Fix Sha1 dword extraction
Previously we were getting incorrect values here.

The u suffix is no longer necessary, which was originally there to work around a MSVC compiler warning which now doesn't happen under the new code 🤷‍♀
2019-10-06 00:28:19 +02:00
Joshua Ashton
19fa1c405c [d3d10] Remove unused copies of device ptr in D3D10 wrappers
Silences a warning when building with Clang, and removes duplicate unused data.
2019-10-06 00:28:19 +02:00
Joshua Ashton
6d0757520b [dxgi] Initialize size of DEVMODEW structure
The documentation says we should do this.
2019-10-06 00:28:19 +02:00
Philip Rebohle
1117daec24 [dxvk] Don't redundantly clear unused vertex strides to zero
We're already doing this when setting the input layout, and we
don't touch the strides in other parts of the code. May save
a handful of CPU cycles.
2019-10-05 16:52:26 +02:00
Philip Rebohle
70ef456911
[meta] Release 1.4.2 2019-10-04 21:07:36 +02:00
Philip Rebohle
02b79fb738
[util] Report Nvidia GPUs for Modern Warfare Remastered 2019-10-04 18:35:36 +02:00
Philip Rebohle
50349d1bfe
[d3d11] Add missing break; in CreateSurface
Found by a frog. Initial testing did not check return values.
2019-10-02 12:06:51 +02:00
Philip Rebohle
85581bdace
[util] Move GetAdapterLUID out of DXGI internals 2019-10-02 08:42:22 +02:00
Philip Rebohle
8f00af556e
[d3d11] Implement CreateSurface for D3D11DXGIDevice
Documentation for this method is really poor so we'll just try to
make pretty much everything work. Fixes various wine tests.
2019-10-02 02:29:06 +02:00
Philip Rebohle
1366fce0f8
[dxgi] Generate adapter LUIDs if Vulkan does not provide them
Needed because winevulkan does not provide adapter LUIDs.
Fixes various wine test failures, and will be required to
get D3D12 (vkd3d) to work on top of our DXGI implementation.
2019-10-02 01:07:18 +02:00
Philip Rebohle
73b9846c4f
[dxgi] Fix some IDXGIAdapter return codes
Fixes various wine test failures.
2019-10-02 00:33:06 +02:00
Philip Rebohle
d90d450618
[dxgi] Handle invalid arguments passed to Present1
fixes a wine test failure.
2019-10-02 00:19:41 +02:00
Philip Rebohle
f58c1c2d1d
[dxgi] Fix SetFullscreenState behaviour with invalid usage
Fixes various wine test failures.
2019-10-02 00:01:26 +02:00
Philip Rebohle
60ff2b8977
[dxgi] Fix GetContainingOutput and GetFullscreenState output pointer
We're supposed to keep a reference to the output around and return
that for fullscreen swap chains. Fixes various wine test failures.
2019-10-02 00:00:37 +02:00
Philip Rebohle
8d8f4b9200
[d3d11] Add support for DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE
Trivial since we treat back buffers as regular D3D textures.
Fixes a wine test failure.
2019-10-01 23:37:54 +02:00
Philip Rebohle
aa35cdbb18
[d3d11] Fix return code on swap chain creation failure
Fixes a wine test failure.
2019-10-01 23:37:54 +02:00
Philip Rebohle
0f15c60192
[d3d11] Use private reference to D3D11 device in D3D11SwapChain
Fixes a wine test failure.
2019-10-01 22:26:07 +02:00
Philip Rebohle
0436e6ddce
[dxgi] Fix some return codes in DxgiSwapChain
Fixes some wine test failures.
2019-10-01 22:25:37 +02:00
Philip Rebohle
0d1048fa87
[d3d11] Fix error handling in SetMaximumFrameLatency
Fixes a wine test failure.
2019-10-01 22:12:23 +02:00
Philip Rebohle
2cb9d34f8f
[dxgi] Fix QueryVideoMemoryInfo return values
Fixes a wine test failure.
2019-10-01 22:12:19 +02:00
Philip Rebohle
1e00f8046c
[dxgi] Fix CheckInterfaceSupport UMD version writeback
Fixes a wine test failure.
2019-10-01 22:12:16 +02:00
Philip Rebohle
cd82669a85
[dxgi] Fix GetDisplayModeList1 output for DXGI_FORMAT_UNKNOWN
Fixes a wine test failure.
2019-10-01 22:12:09 +02:00
Philip Rebohle
f5515075f2
[dxgi] Fix GetDisplayModeList behaviour with a zero mode count
Allocate at least one array element so that we don't accidentally
treat the mode list like it was NULL. Fixes a wine test failure.
2019-10-01 22:12:08 +02:00
Philip Rebohle
2f4e4abcac
[dxgi] Fix CheckInterfaceSupport for IDXGIDevice
On Windows, this succeeds and reports the D3D9 driver version to the
application.
2019-10-01 15:06:50 +02:00
Philip Rebohle
ab51aac6d7 [dxvk] Implement context-local lookup cache for pipeline objects
On hit, looking up a pipeline becomes an extremly cheap O(1) operation,
avoiding a mutex lock and an expensive std::unordered_map lookup. This
works because we don't ever destroy pipeline objects.
2019-09-30 03:42:20 +02:00
Philip Rebohle
35a8cedbc2 [dxvk] Move shader set hash/eq functions into respective structs
Makes it easier to use them outside the pipeline manager.
2019-09-30 03:42:20 +02:00
Philip Rebohle
ba5f319809 [dxvk] Use new shader lookup hash in pipeline manager 2019-09-30 02:09:09 +02:00
Philip Rebohle
5115a42b08 [dxvk] Expose key-based lookup hash in DxvkShader 2019-09-30 02:08:09 +02:00
Philip Rebohle
54ff7bf769 [dxvk] Add methods to retrieve shaders from pipeline 2019-09-30 01:54:49 +02:00
Philip Rebohle
59d4e8a36a [dxbc] Fix NaN handling in not-equal comparison
Ne and Dne are unordered in DXBC. Avoid FUnordNotEqual to
avoid potential issues with drivers and debugging tools.
2019-09-30 00:19:47 +02:00
Philip Rebohle
d128d776ad
[dxvk] Re-introduce state check for updateFramebuffer
Turns out we broke batching render target clears earlier.
2019-09-28 03:29:52 +02:00
Philip Rebohle
6b5d01c934
[meta] Release 1.4.1 2019-09-27 23:03:23 +02:00
Philip Rebohle
2e6da26ff0
[dxvk] Spoof Nvidia GPU for HITMAN 2
This game requires a functioning AGS implementation when it detects
an AMD GPU and complains about missing D3D11 support otherwise.
2019-09-26 19:27:19 +02:00
Philip Rebohle
a920a7275b
[dxvk] Eliminate some redundant state checks 2019-09-26 14:25:56 +02:00
Philip Rebohle
7cdc402a58
[dxvk] Introduce finalizeDraw
May improve code gen by reducing function call overhead, in a
similar way as the duplicated checks in commitGraphicsState do.
2019-09-26 01:31:51 +02:00
Philip Rebohle
187748e4d3
[d3d11] Add a comment explaining ID3D11Predicate/ID3D11Query hack 2019-09-25 22:18:08 +02:00
Philip Rebohle
53fe3423e2
[d3d11] Fix GetPredication 2019-09-25 20:55:43 +02:00
Philip Rebohle
b6cf518962
Revert "[dxbc] Always decorate SV_POSITION as invariant"
This reverts commit 5ee790a4a3.

Breaks Shadow of the Tomb Raider on Nvidia for unknown reasons.
2019-09-24 23:01:36 +02:00
Philip Rebohle
5ee790a4a3
[dxbc] Always decorate SV_POSITION as invariant
Apparently fixes Z-Fighting in Saints Row IV on Nvidia.
2019-09-24 22:19:43 +02:00
Philip Rebohle
51f1d7725c
[dxvk] Store context flags as a 32-bit integer
Might improve code generation for 32-bit builds. We currently
have 31 flags and don't expect any new ones to be added.
2019-09-23 23:34:04 +02:00
Philip Rebohle
8f6df2b7fb
[d3d10] Add some null pointer checks when dealing with resources
Also, fix some more awkward formatting.
2019-09-23 21:59:02 +02:00
Philip Rebohle
cb60211ce0
[d3d10] Fix some awkward formatting 2019-09-23 21:47:30 +02:00
Philip Rebohle
f498e742ec
[d3d11] Handle D3D_PRIMITIVE_TOPOLOGY_UNDEFINED correctly
Luckily, all known cases where games use UNDEFINED topology fail
validation elsewhere due to missing vertex shaders, but we should
handle this correctly anyway.
2019-09-23 15:20:53 +02:00