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

3526 Commits

Author SHA1 Message Date
Robin Kertels
021ffe7350 [d3d9] Regenerate auto mip gen textures in UpdateTexture
.. instead of copying them
2021-02-14 23:55:00 +00:00
Robin Kertels
338f6dfb0e [d3d9] Track dirty regions for UpdateTexture 2021-02-14 23:55:00 +00:00
Philip Rebohle
a0cf5926d8
[dxvk] Add parameter to prepareImage to ignore clears
Otherwise we may flush clears while clearing a render target,
which is silly and undoes the layout optimizations.
2021-02-14 04:22:52 +01:00
Philip Rebohle
2b401725dc [dxvk] Do not transition non-shared images at the end of the command buffer
Currently, if the frontend flushes the command list, we always transition
render targets to their default layout. This may lead to some arbitrary
GPU performance issues if the transitions are not free.

Instead, keep all images that are only used internally in their attachment
layout across command list boundaries, until they are unbound.
2021-02-14 04:00:02 +01:00
Philip Rebohle
bce80b523f [d3d11] Mark images as shared if necessary 2021-02-14 04:00:02 +01:00
Philip Rebohle
4f184b3424 [d3d9] Mark images as shared if necessary 2021-02-14 04:00:02 +01:00
Philip Rebohle
6564895a32 [dxvk] Add shared flag to images
Indicates that images can be accessed by more than one context
internally, or through the interop interfaces without explicit
image layout transitions.
2021-02-14 04:00:02 +01:00
Philip Rebohle
6efc2588f8 [dxvk] Remove checkFramebufferBarrier
No longer serves any practical purpose.
2021-02-14 04:00:02 +01:00
Philip Rebohle
95676bf1e6 [dxvk] Always prepare images not bound to the current FB when clearing
Fixes a potential bug when clearing a render target after the
last render pass using it gets suspended.

Also, for some reason we were checking for <1 instead of <0.
2021-02-14 04:00:02 +01:00
Christopher Egert
594d09ae3a [util] Spoof a nvidia card for DIRT 5 2021-02-14 03:54:14 +01:00
Philip Rebohle
0c18a86090
[dxvk] Fix render target clears if attachments are not tightly packed
We do actually need to use the color target indices here rather than
the attachment index, since the repacking happens inside DxvkRenderPass.
Clear values still need to be tightly packed.
2021-02-12 03:13:11 +01:00
Philip Rebohle
436820d233
[dxvk] Add method to query color attachment index from attachment index 2021-02-12 03:13:11 +01:00
Philip Rebohle
0956050db6
[dxvk] Fix actual render target layout transitions for 3D images
Also, only emit transitions if the layouts differ.
2021-02-12 03:13:11 +01:00
Philip Rebohle
bd87c12138
[dxvk] Make suspend parameter of spillRenderPass not optional 2021-02-12 03:13:11 +01:00
Philip Rebohle
aa0296b7ca
[dxvk] Suspend render pass for most image operations
We can big brain this and only explicitly transition the render targets
that are used within the copy operation, if any, and leave the rest intact.
2021-02-12 03:13:11 +01:00
Philip Rebohle
96dfac7fea
[dxvk] Suspend render pass for certain render target clears 2021-02-12 03:13:11 +01:00
Philip Rebohle
d7db413cac
[dxvk] Introduce prepareImage
This transitions any framebuffer attachment that is currently in
the wrong layout back to its default layout before it is used by
functions that expec it to be in the default layout.
2021-02-12 03:13:10 +01:00
Philip Rebohle
fe43abbf32
[dxvk] Suspend render pass for buffer copies and render pass barriers
No images are directly involved in these, so we can save some layout
transitions.
2021-02-12 03:13:10 +01:00
Philip Rebohle
ba698430cb
[dxvk] Suspend render pass when updating framebuffer
Saves barriers in case some of the previously bound framebuffer
arre reused in the new one.
2021-02-12 03:13:10 +01:00
Philip Rebohle
d3b2db5978
[dxvk] Loosen render pass barriers
Still use ALL_COMMANDS_BIT at the end to avoid potential WAR hazards
for things like vertex buffers.
2021-02-12 03:13:10 +01:00
Philip Rebohle
29afaea338
[dxvk] Track current render target image layouts
This can be used to optimize away some barriers and layout transitions.
2021-02-12 03:13:10 +01:00
Philip Rebohle
2787ba8450
[d3d11] Fix D3D11 bind flags and DXGI usage for swap chain images 2021-02-12 03:12:48 +01:00
Philip Rebohle
c98c5f5d17
[d3d11] Add internal DXGI usage flags to textures
We need this for swap chain images.
2021-02-12 03:12:48 +01:00
Philip Rebohle
a60916f7ee
[dxvk] Improve device ordering
Make sure that integrated GPUs are preferred over CPU
implementations on systems that have no dedicated GPU.
2021-02-11 14:58:11 +01:00
Philip Rebohle
bcadc04932
[dxvk] Validate vertex attribute alignment 2021-02-08 14:55:18 +01:00
Philip Rebohle
a045cac281
[d3d11] Fix vertex input alignment for small formats
Fixes #1922.
2021-02-08 14:28:55 +01:00
Joshua Ashton
fcaab6aa46
[d3d9] Expose adapter/backbuffer formats properly
Matches native behaviour in my testing.
2021-02-06 08:57:32 +00:00
Joshua Ashton
58d6f018bb
[d3d9] Allow A2R10G10B10 backbuffer format in Windowed 2021-02-06 08:43:37 +00:00
Joshua Ashton
ff9d451a4e
[util] Force saner SWVP limits for TrackMania Forever
Closes: #1910
2021-02-06 08:28:03 +00:00
Joshua Ashton
bba3f9f3db
[util] Defer surface creation for Nioh 2
Fixes black screen on startup.
2021-02-06 07:48:52 +00:00
Joshua Ashton
9bee3e1cb9
[util] Add config for Dark Messiah of Might & Magic
Same problem as other early Source titles, infinitely makes resources at startup to measute VRAM.
2021-01-30 04:36:26 +00:00
Philip Rebohle
01a511aa99
[dxvk,dxgi,d3d9] Fix shader spec constant IDs
These changed after changing the render target output swizzle stuff.
2021-01-29 16:46:01 +01:00
Philip Rebohle
2d670ec3db
[dxbc] Enable capabilities for float control modes
Fixes some validation errors (but seriously, why does everything
have to be a capability in SPIR-V?)
2021-01-29 16:29:39 +01:00
Philip Rebohle
c1073455bf
[spirv] Add hasCapability method 2021-01-29 16:29:26 +01:00
Philip Rebohle
3a993d0c5c
[dxvk] Use only one spec constant for fragment shader output component mapping
Let's trust the driver to be able to constant-fold bitfieldExtract operations.
2021-01-29 16:17:07 +01:00
Philip Rebohle
307f43ff1e [d3d11] Introduce option to disable float controls
And disable for SotTR since it introduces rendering issues.
2021-01-28 20:32:38 +01:00
Philip Rebohle
8de9dc9378
[d3d11] Enable d3d11.invariantPosition by default 2021-01-28 20:09:47 +01:00
Philip Rebohle
1478011822
[dxbc] Enable NaN fixup by default on older RADV versions
And get rid of a whole bunch of game-specific workarounds.
2021-01-28 19:37:10 +01:00
Philip Rebohle
f5fa7a9099
[dxbc] Set float control bits as necessary 2021-01-28 19:37:10 +01:00
Philip Rebohle
849fb329ec
[dxvk] Enable VK_KHR_shader_float_controls if supported 2021-01-28 19:37:10 +01:00
dom
7d7c057d46 [util] Enable dxgi.customVendorId for Hitman 3 2021-01-28 14:07:52 +01:00
Philip Rebohle
a17ec95f21
[utils] Enable d3d9.deferSurfaceCreation for Atelier Ryza 2 2021-01-26 12:06:20 +01:00
Philip Rebohle
b8bc36559d
[d3d11] Optimize index buffer binding with offset
Do not rebind the buffer if only the offset changes. Instead,
adjust StartIndexLocation in indexed draw calls. For indirect
draws, this will be disabled on the fly.

This may save a whole bunch of work in the backend, and reduces
the number of commands being sent to the CS thread in the first
place, which is why this optimization is not being done in the
backend itself but rather on the client API side.
2021-01-24 15:18:38 +01:00
Philip Rebohle
f869881f55
[util] Enable TGSM barrier workaround for more F1 games
F1 2020 is reportedly broken as well.
2021-01-16 15:28:30 +01:00
Joshua Ashton
742b52bbb5 [d3d11] Fix device child refs properly 2021-01-15 23:47:48 +01:00
Philip Rebohle
499f15011f
[util] Enable TGSM barrier workaround for F1 2018
Game has the same bug as F1 2019. Fixes #1897.
2021-01-15 13:15:01 +01:00
Philip Rebohle
3caf5269f2
[dxvk] Add regular barrier after graphics queue depth image upload
We still need a barrier for the layout transition.
2021-01-12 13:25:00 +01:00
Philip Rebohle
b19293430a
[dxvk] Execute depth/stencil image upload on graphics queue
Silences a validation error.
2021-01-12 12:14:53 +01:00
Philip Rebohle
8163eb4185
[meta] Do not use built-in arguments
Breaks ancient meson versions. Should fix #1893.
2021-01-12 00:54:16 +01:00
Joshua Ashton
0eec95843f
[d3d9] Fix warnings with query caching 2021-01-08 13:49:38 +00:00