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

4905 Commits

Author SHA1 Message Date
Philip Rebohle
a8f9fdb21d [dxvk] Rearrange descriptor sets
This allows us not to unnecessarily dirty the FS UBO set when
changing tetxure bindings, leading to a cleaner separation.
2023-01-15 15:36:05 +01:00
Philip Rebohle
4a30933359 [dxvk] Add UBO set property to descriptor info
Used to explicitly propagate storage buffer bindings
to the respective UBO set.
2023-01-15 15:36:05 +01:00
Philip Rebohle
6f194b0e7b [d3d11] Bind UAV counter buffers as views 2023-01-15 15:36:05 +01:00
Philip Rebohle
82f500250f [hud] Bind data buffers as views 2023-01-15 15:36:05 +01:00
Philip Rebohle
c347bd4d8b [dxvk] Allow creating buffer views with undefined format 2023-01-15 15:36:05 +01:00
Philip Rebohle
92de3f3f5f [d3d11] Add missing context locks 2023-01-14 18:40:41 +01:00
Philip Rebohle
1c2df54bdf [dxvk] Improve logging in case of memory errors 2023-01-14 03:39:55 +01:00
Philip Rebohle
2922b780c1 [dxvk] Properly handle bufferImageGranularity for images
Fixes validation errors about dedicated allocations being
bigger than the image's memory requirement on Nvidia.
2023-01-14 03:39:55 +01:00
Robin Kertels
97a91c816f [d3d9] Disable instancing for non-indexed draws 2023-01-13 21:58:41 +00:00
Philip Rebohle
3a84838ac4 [hud] Display approximate progress when compiling shaders 2023-01-13 16:43:27 +01:00
Philip Rebohle
c978e62ec8 [dxvk] Implement better priority system for background shader compiles
Reduces the number of workers that perform background optimization,
which may reduce the performance impact when encountering a large
number of new pipelines at once.
2023-01-13 16:43:27 +01:00
Blisto91
cc9266edaa [util] Add config for Alien Rage
Reporting a GTX 295 puts us into the highest behind the scenes graphics settings preset bucket and prevents the shadow issue with `FloatingPointRenderTargets` set to false in the lower preset bucket.
NvapiHack needs to be disabled on Linux since the game pings it in the Windows system folder and want's the VendorId to match your GPU. Else the issue will still happen on Nvidia Linux
2023-01-13 14:15:54 +01:00
Philip Rebohle
070a340115 [dxvk] Remove path to look up optimized pipeline in cache
For some reason this sometimes takes several milliseconds, which
leads to noticeable stutter. Linking a pipeline is more consistent.
2023-01-13 11:40:01 +01:00
Philip Rebohle
a22d70e184 [dxvk] Remove unused compileComputePipeline function 2023-01-12 17:35:05 +01:00
Philip Rebohle
e5157a5360 [dxvk] Add pre-rasterization pipeline libraries to the state cache
This allows compiling tessellation or geometry shader pipelines
early while still using the pipeline library path.

Also removes compute shaders. Since API-provided compute shaders
are always compiled early, supporting them is no longer needed.
2023-01-11 11:48:16 +01:00
Philip Rebohle
28ae85b7ab [dxvk] Enable creating full pre-rasterization pipeline libraries 2023-01-11 11:48:16 +01:00
Philip Rebohle
17529101d5 [dxvk] Allow creating pipeline libraries with more than one shader 2023-01-11 11:48:16 +01:00
Philip Rebohle
f9ff96d727 [dxvk] Implement checks for pre-raster pipeline library compatibility 2023-01-11 11:48:16 +01:00
Philip Rebohle
b916dc04e5 [dxbc] Fill in patch vertex count info 2023-01-11 11:48:16 +01:00
Philip Rebohle
5e42230b95 [dxvk] Add patch vertex count to shader info struct 2023-01-11 11:48:16 +01:00
Philip Rebohle
f76a7c285c [dxvk] Rework DxvkShaderPipelineLibrary to work with multiple shaders 2023-01-11 11:48:16 +01:00
Philip Rebohle
8011a40843 Revert "[dxbc] Handle dead code in shader binaries"
Apparently this regressed something, but the reporter who asked
for this fix in the first place did not specify what, so let's
just revert this and break the whole thing again until we get
something to actually work with.

This reverts commit 5115d80d51.
2023-01-10 20:37:22 +01:00
Philip Rebohle
8052347a22 [dxvk] Keep more empty system memory chunks alive 2023-01-10 03:42:37 +01:00
Philip Rebohle
0342a25e61 [d3d9,dxso] Add d3d9.forceSampleRateShading option 2023-01-09 18:35:02 +01:00
Philip Rebohle
e426ec09a1 [d3d11,dxbc] Add d3d11.forceSampleRateShading option 2023-01-09 18:35:02 +01:00
Philip Rebohle
06fb93daf0 [dxvk] Only create state cache file on demand
If no pipelines are ever written to it, we should not create
the cache file in the first place.
2023-01-09 18:31:18 +01:00
Philip Rebohle
6a4fe06ac6 [dxvk] Fix incorrect flags for null fs pipeline layout 2023-01-09 18:31:18 +01:00
Joshua Ashton
5206d97710 [dxgi] Workaround UE4 DX11 + HDR crashes
Unreal Engine 4 titles use AGS/NVAPI to try and enable
HDR globally.
They can key this off IDXGIOutput::GetDesc1's ColorSpace
being HDR10.
Many of these UE4 games statically link against AGS.

This is a problem as when UE4 tries to enable HDR via AGS,
it does not check if AGSContext, and the display info etc
are nullptr unlike the rest of the code using AGS.
So we need to special-case UE4 titles to disable reporting a HDR
when they are in DX11 mode.

The simplest way to do this is to key off the fact that all
UE4 titles have an executable ending with "-Win64-Shipping".

We check if d3d12.dll is present, to determine what path in
UE4 we are on, as there are some games that ship both and support HDR.
(eg. The Dark Pictures: House of Ashes, 1281590)
Luckily for us, they only load d3d12.dll on the D3D12 render path
so we can key off that to force disable HDR only in D3D11.
2023-01-09 12:54:28 +00:00
Blisto91
3ed0a4fd43 [util] Set Secret World Legends launcher to SM 2 2023-01-08 10:47:04 +01:00
Beyley Thomas
c11a63f5e5 [wsi] Add GLFW backend 2023-01-08 10:36:25 +01:00
Hunter Kvalevog
3491895960 [dxvk] Remove SDL dummy window
SDL >= 2.0.9 permits passing a nullptr window to
SDL_Vulkan_GetInstanceExtensions, so there's no
point in going though the work of creating a
window just to call this function.
2023-01-07 22:43:32 +00:00
Philip Rebohle
196fefec4c [dxvk] Enable dynamic multisample state if supported by the device
Eliminates stutter in situations where sample rate shading is used with MSAA.
2023-01-06 23:48:31 +01:00
Philip Rebohle
f269cde749 [dxvk] Enable device features for dynamic multisample state 2023-01-06 23:48:31 +01:00
Philip Rebohle
389634f9b9 [d3d11] Fix D3D11Texture2D reference counting 2023-01-06 22:52:29 +01:00
Philip Rebohle
5115d80d51 [dxbc] Handle dead code in shader binaries
We should not emit any code when not inside a function.

Fixes #3154.
2023-01-06 20:49:13 +01:00
Joshua Ashton
c10b53ed3e [dxgi] Add dxgi.enableHDR option 2023-01-06 17:27:38 +01:00
Joshua Ashton
3375cdf1fa [dxgi] Initialize DxgiOptions before DxgiMonitorInfo
Needed to we can access DxgiOptions inside of DxgiMonitorInfo for the dxgi.enableHDR property coming up in a future commit.
2023-01-06 17:27:38 +01:00
Joshua Ashton
f25475d05e [dxgi] Normalize display metadata to something rational
Sometimes we can't get an EDID if things aren't plumbed fully, or some displays just have broken EDIDs.

This accounts for both of those cases by using some dummy data if we are missing information.

Fixes value reporting to match Windows on common displays such as LG OLEDs.
2023-01-06 17:27:38 +01:00
Joshua Ashton
f453d6ee2a [dxgi] Implement DXGIOutput::GetDesc1's ColorSpace
Adds the ability to punt the global colorspace into HDR from SetColorSpace1.

We have no way of checking the actual Windows colorspace as the
only public method for this *is* DXGI which we are re-implementing.
So we just pick our color space based on the DXVK_HDR env var
and the punting from SetColorSpace1.

We might expand on this in future, but this is good enough for an
initial implementation.
2023-01-06 17:27:38 +01:00
Robin Kertels
f94b42f23f [d3d9] Dont use GenerateDrawInfo in DrawPrimitiveUp
This is confusing because it looks like a race condition
at first glance.
2022-12-30 19:29:34 +00:00
Philip Rebohle
12901b52f1 [dxvk] Split barriers with very large VkDependencyInfo structures
Works around an AMD driver bug. Fixes #3138.
2022-12-20 03:10:44 +01:00
Philip Rebohle
f4f4f3647f [d3d11] Do not create storage image views with swizzle
This happens when a game uses A8_UNORM UAVs. Vulkan doesn't allow this,
and it's not meaningful for stores anyway, we'd need shader emulation.
2022-12-20 02:20:11 +01:00
Joshua Ashton
c7be18cb26 [d3d11] Implement SetHDRMetadata 2022-12-19 22:15:18 +01:00
Joshua Ashton
e5418a956a [vulkan] Add setHdrMetadata method to Presenter 2022-12-19 22:15:18 +01:00
Joshua Ashton
731bf84edd [dxvk] Enable VK_EXT_hdr_metadata 2022-12-19 22:15:18 +01:00
Joshua Ashton
4335eccae9 [dxvk] Enable VK_EXT_swapchain_colorspace 2022-12-19 22:15:18 +01:00
Joshua Ashton
33acf58ac7 [d3d11] Implement CheckColorSpaceSupport and SetColorSpace 2022-12-19 22:15:18 +01:00
Joshua Ashton
50054d4675 [vulkan] Add supportsColorSpace method to Presenter 2022-12-19 22:15:18 +01:00
Joshua Ashton
fd661d587e [vulkan] Simplify args to Presenter GetSupported* methods 2022-12-19 22:15:18 +01:00
Robin Kertels
18b0ef697c [dxvk] Rework SetEventOnCompletion
* Create the waiter thread on demand
* Don't wake up the waiter thread every 10ms
  when no events are queued
* Wait on caller thread when hEvent = null
2022-12-16 17:37:19 +01:00