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

3589 Commits

Author SHA1 Message Date
Philip Rebohle
e46bf78f31
[dxvk] Implement discardImageView
Built on top of the deferred clear logic.
2021-02-21 01:56:52 +01:00
Philip Rebohle
0ba3e693c9
[dxbc] Clean up some texture handling code 2021-02-20 23:39:15 +01:00
Joshua Ashton
80049c360e [dxvk] Fix resource tracking in attachment transitions
Fixes a crash in Portal 2 on DXVK native in which an old depth stencil is used after free after a device reset.
2021-02-20 19:34:49 +01:00
Joshua Ashton
e9c91daba7
[dxvk] Fix out of bounds read when uploading HUD texture
The width + height does not add up to the size of the global array.
2021-02-20 14:37:00 +01:00
Philip Rebohle
5fc83a6075
[dxvk] Add missing trackImage to changeImageLayout 2021-02-20 14:35:57 +01:00
Philip Rebohle
1a1cc32b11
[dxvk] Store VkImage in barrier set rather than DxvkImage*
Avoids some accidental ref counting.
2021-02-20 14:35:22 +01:00
Philip Rebohle
d66ecf4a94
[meta] Release 1.8 2021-02-19 05:29:50 +01:00
Joshua Ashton
59816a71b9
Revert "[d3d9] Don't minimise in WM_ACTIVATEAPP"
Not needed as this was an FSHack bug.

This reverts commit d87200c4d9.
2021-02-19 03:14:56 +00:00
Nicholas Fraser
cd49d03ee9 [build] Add optional build-id
Build-ids are required for doing certain kinds of performance tracing.
For example build-ids let Linux perf find the correct objects and
transfer them to other machines via "perf archive".

This adds an option to add -Wl,--build-id to the linker. It can be
enabled by passing -Dbuild_id=true to meson or --build-id to
package-release.sh.

Signed-off-by: Nicholas Fraser <nfraser@codeweavers.com>
2021-02-18 17:52:55 +01:00
Philip Rebohle
fe5e215dfc [dxgi] Support multiple outputs per adapter 2021-02-18 14:19:55 +01:00
Joshua Ashton
d87200c4d9
[d3d9] Don't minimise in WM_ACTIVATEAPP
Sometimes mode-setting jank can occur and technically we'd need to re-set the mode on the next present if the game gets actually minimised.
2021-02-15 17:29:45 +00:00
Philip Rebohle
df76a5252a
[dxvk] Use default layout for depth-stencil image descriptors
Apparently the image layout matching rules were relaxed at some point,
so just using DEPTH_STENCIL_READ_ONLY_OPTIMAL for descriptors is legal
even if the image is in DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL or
DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL in the current render pass.
2021-02-15 17:00:35 +01:00
Robin Kertels
ec5c324643 [d3d9] Mark generated mip maps as dirty 2021-02-14 23:55:00 +00:00
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