Commit Graph

4393 Commits

Author SHA1 Message Date
Philip Rebohle a731f5daae [d3d11] Use new DxvkShader constructor for video shaders 2022-04-18 13:20:16 +02:00
Philip Rebohle 69817a84dc [d3d11] Use new DxvkShaderCreateInfo struct to retrieve shader info 2022-04-18 13:20:16 +02:00
Philip Rebohle 427f51eda7 [d3d9] Use new DxvkShader constructor for format conversion 2022-04-18 13:20:16 +02:00
Philip Rebohle 98ec79f6fa [d3d9] Use new DxvkShader constructor for SWVP emulation 2022-04-18 13:20:16 +02:00
Philip Rebohle ab95b61e44 [d3d9] Use new DxvkShader constructor for fixed-function shaders 2022-04-18 13:20:16 +02:00
Philip Rebohle 10bab0c182 [dxso] Use new DxvkShader constructor 2022-04-18 13:20:16 +02:00
Philip Rebohle 8993560cde [dxbc] Use new DxvkShader constructor 2022-04-18 13:20:16 +02:00
Philip Rebohle 81d88a484d [dxvk] Use new DxvkShader constructor for HUD shaders 2022-04-18 13:20:16 +02:00
Philip Rebohle 62e706a6bb [dxvk] Use new DxvkShader constructor for swap chain shaders 2022-04-18 13:20:16 +02:00
Philip Rebohle d0b52f3ac5 [dxvk] Use new DxvkShaderCreateInfo struct to retrieve shader info 2022-04-18 13:20:16 +02:00
Philip Rebohle b0db58f098 [dxvk] Introduce new way to create DxvkShader objects 2022-04-18 13:20:16 +02:00
Philip Rebohle 736f743ae4
[spirv] Implement faster in-memory compression for shaders
Seems to be anything up to 3x as fast to decode than the previous code,
with the compression ratio being slightly worse. Encoding seems faster
as well.
2022-04-11 02:55:12 +02:00
Blisto91 727ba89670 [util] remove allowLockFlagReadonly from conf 2022-04-09 19:44:50 +02:00
Blisto91 2e68b33abd [util] correct enableDebugUtils conf to default False 2022-04-09 19:44:50 +02:00
Blisto91 3672375bc1 [util] Use cached constant buffers for Armored Warfare 2022-04-09 15:19:49 +02:00
Robin Kertels 42c66c410e [d3d9] Calculate slice alignment when uploading straight from the mapping buffer 2022-04-06 18:52:58 +00:00
Paul Gofman 957a305ca8 [d3d9] Ignore multiple app activation window messages. 2022-04-06 18:51:50 +00:00
Paul Gofman b0ed9e30ce [d3d9] Filter window messages when processing WM_ACTIVATEAPP. 2022-04-06 18:51:50 +00:00
Robin Kertels ce87bec412 [util] Force sampler type spec const for Star Wars TFU2
The game tries to binda  2D texture to a slot that is declared
as a 3D texture in the shader. This causes one particle effect
to be completely black because DXVK does not bind the texture
2022-04-05 22:37:04 +00:00
Philip Rebohle 95a3413949
[util] Fix typo in app profiles
Accidentally broke everything.
2022-03-31 18:01:52 +02:00
Philip Rebohle e07157fe72
[d3d11] Only apply anisotropy override to linear samplers
Mirrors D3D9, more or less.
2022-03-30 14:37:33 +02:00
Philip Rebohle e7e7fa231c
[dxvk] GPU query reset path
Require VK_EXT_host_query_reset instead. This fallback path is
untested nowadays and too slow to be useful.
2022-03-30 13:32:18 +02:00
Robin Kertels 6a80b51dc3 [meta] Move apitrace guide over to dxvk repo 2022-03-29 21:33:08 +00:00
Georg Lehmann f0ccd8fe2e [util] Limit Limbo to 60 fps
Fixes: #2564
2022-03-28 21:39:28 +02:00
Derek Lesho d11f0ac77b [d3d11] Always export correct shared handle type from ::GetSharedHandle and ::CreateSharedHandle
Before we just assumed that the calls here would match the corresponding flag value (D3D11_RESOURCE_MISC_SHARED -> ::GetSharedHandle, D3D11_RESOURCE_MISC_SHARED_NTHANDLE -> ::CreateSharedHandle), but it turns out that its possible to set both flags and use both methods.  Now we always tell Vulkan to export a KMT handle if D3D11_RESOURCE_MISC_SHARED is present, and use openKmtHandle to get an NT handle when needed.
2022-03-28 21:38:42 +02:00
Philip Rebohle 1c3736da8c
[dxvk] Filter out unnecessary access flags when recording barriers
Rationale is as follows:
- srcAccess never needs to contain read flags, since any memory being
  read must have been made visible before by a write operation
- dstAccess is only relevant if srcAccess contains a write, because
  reads alone cannot modify memory and thus do not require making the
  same memory available again. An exception are layout transitions.

Doesn't really change performance in anything as far as I can tell, but
we avoid some unnecessary UBO cache flushes in compute-heavy scenarios.
2022-03-28 10:45:29 +02:00
Philip Rebohle ebdaf90fdc
[util] Enable d3d9.deferSurfaceCreation for Atelier Sophie 2
2022 and K-T are still using D3D9 for video stuff.
2022-03-28 04:37:02 +02:00
Philip Rebohle a72463c5af
[meta] Release 1.10.1 2022-03-26 12:44:25 +01:00
Philip Rebohle b4efaa4ef0
[util] Enable cached constant buffers for Frostpunk
Massively improves CPU-bound performance.
2022-03-26 12:44:25 +01:00
Robin Kertels 4e34c29c56 [d3d9] Disable culling when the app passes an invalid value 2022-03-25 17:13:12 +01:00
Philip Rebohle 991a11617a
[util] Enable d3d9.deferSurfaceCreation for Stranger of Paradise FFO
Reportedly required for VRR to work. Game still doesn't work here.
2022-03-25 16:36:17 +01:00
Philip Rebohle 0db26a0456
[dxbc] Actually do the skip range check thing properly
Turns out the first attempt only worked because my test case didn't
do any dynamically indexed stores at all, but broke everything else.
Oops.
2022-03-24 12:53:29 +01:00
Philip Rebohle 3ecd13cec2
[dxbc] Only emit temp array range check for dynamically indexed stores
Generates less code and makes things slightly more readable.
2022-03-24 12:47:40 +01:00
Philip Rebohle c590736fec
[dxbc] Generate smallest possible vectors for local arrays
FXC is buggy and always emits vec4 in the array declaration,
so we'll have to analyze the used components ourselves.
2022-03-24 12:47:40 +01:00
Robin Kertels b2f22d5719 [d3d9] UpdateTexture: Handle automatic mip gen properly 2022-03-24 02:31:42 +00:00
Philip Rebohle 119c1ececb
[util] Set frame latency to 1 for God of War
Frame pacing is horrible otherwise, as of the 1.0.9 update.
2022-03-24 03:05:29 +01:00
Philip Rebohle 6b8e8afd5b
[dxvk] Zero-initialize newly allocated buffer slices on creation
Fixes random flicker in God of War. Since patch 1.0.9, the game's lighting
system relies on MAP_DISCARD returning a zero-initialized memory slices for
its constant buffers, or some lights would get skipped in various compute
passes. Changing the memset to e.g. write 0xFF instead of 0 shows this issue.
2022-03-24 02:46:25 +01:00
Philip Rebohle e440fa26ab
[dxbc] Handle fallthrough around default properly 2022-03-23 15:32:45 +01:00
Philip Rebohle 8823e4bb3d
[dxgi] Work around swapchain use-after-free bugs
Affects Divinity: Original Sin Enhanced Edition. Requires Wine hack to
delay memory deallocation to not crash during resolution changes.
2022-03-23 15:09:39 +01:00
Philip Rebohle 586948df1e
[d3d11] Get strong reference to swap chain in swap chain back buffers 2022-03-22 19:48:13 +01:00
Philip Rebohle 42edb62df8
[d3d11] Use smart pointer for swap chain back buffer 2022-03-22 19:28:49 +01:00
Philip Rebohle b015cf0bb2
[dxbc] Support switch-case fallthrough
Apparently this is a thing in Shader Model 4, although FXC cannot emit it.
2022-03-22 17:32:43 +01:00
Philip Rebohle 0d54f7161c
[util] Enable cached dynamic resources for AC3 and AC4
Without it, AC3 chugs along at 40 FPS on my 5950X.
2022-03-19 20:12:20 +01:00
Oleg Kuznetsov b36ca2c758 [d3d9] Fix Visual Studio build to resolve 'operator !=' is ambiguous error for RECT 2022-03-17 11:35:19 +01:00
Oleg Kuznetsov 5156994440 [dxvk] Add a config option to enable debug utils in addition to DXVK_PERF_EVENTS=1 2022-03-17 11:35:19 +01:00
Joshua Ashton cf1cee04b8 [d3d11] Register annotation interfaces with D3D9
Some apps try use the D3DPERF_ functions for debug markers/annotations.

This utilizes the DXVK_RegisterAnnotation hidden functions to share the interfaces.

Co-authored-by: Oleg Kuznetsov <okouznetsov@nvidia.com>
2022-03-17 11:35:19 +01:00
Joshua Ashton 937a60c882 [d3d9] Add hidden exports for registering annotations
Adds DXVK_RegisterAnnotation at ordinal 28257 and DXVK_UnRegisterAnnotation at ordinal 28258.
2022-03-17 11:35:19 +01:00
Joshua Ashton 787a979514 [d3d9] Implement D3D9UserDefinedAnnotation 2022-03-17 11:35:19 +01:00
Joshua Ashton 47b1ab52ce [d3d9] Implement D3D9GlobalAnnotationList 2022-03-17 11:35:19 +01:00
Joshua Ashton 5d54d79865 [d3d11] Use IDXVKUserDefinedAnnotation 2022-03-17 11:35:19 +01:00