Commit Graph

2822 Commits

Author SHA1 Message Date
Philip Rebohle 0e44bc3068
[meta] Release 1.4.6 2019-12-03 14:52:22 +01:00
Joshua Ashton c47095a8dc
[meta] Update Vulkan headers 2019-12-03 00:53:16 +01:00
Philip Rebohle 27ea176295
[d3d11] Remove d3d11.strictDivision option 2019-11-30 20:39:32 +01:00
Philip Rebohle 3230cec3f3
[util] Enable d3d11.enableRtOutputNanFixup for FFXIV
And disable strict division. The previous workaround broke radial blur.
2019-11-30 20:39:32 +01:00
Philip Rebohle 3b030d9569
[dxbc] Implement workaround to replace NaN render target outputs by zero 2019-11-30 20:39:32 +01:00
Philip Rebohle 2e51e28849
[spirv] Implement opIsNan 2019-11-30 20:39:28 +01:00
Luis Cáceres abff2afeaf [dxvk] Fix multiple inclusion of dxvk_platform_exts.h
This fixes build failures when using `--unity on` meson parameter
2019-11-28 17:43:08 +01:00
Philip Rebohle 5fe8d823a0
[dxvk] Disable VK_EXT_conditional_rendering
We're currently not using it, and it prevents sharing RenderDoc captures
between different AMD drivers.
2019-11-28 15:41:02 +01:00
Philip Rebohle 4c0e4fba0c
[dxvk] Don't return a value from updateShaderResources
We're checking the bind point all the time anyway, so the previous
design was inconsistent.
2019-11-28 15:25:12 +01:00
Philip Rebohle 2aa1ff414c
[dxvk] Bind descriptor sets at descriptor update time
Gets rid of one 'if' per draw/dispatch and two functions.
2019-11-28 15:17:42 +01:00
Philip Rebohle 49e7df96ec
[dxbc] Emit a spec constant for uniform buffers
This partially reverts commit fd547b666e.

For some reason, not doing so breaks Overwatch (because of course it does).
2019-11-28 00:55:38 +01:00
Philip Rebohle 00a064e32b
[dxvk] Don't clear bind mask for unbound UBOs and samplers
These don't need special treatment, so we really don't need to
recompile the pipeline if they are not bound.
2019-11-28 00:55:36 +01:00
Joshua Ashton 15ef79be42 [meta] Recommend using new validation layers
VK_LAYER_LUNARG_standard_validation is deprecated and not available in the latest Vulkan SDK, recommend the new VK_LAYER_KHRONOS_validation instead.
2019-11-27 18:30:40 +01:00
Philip Rebohle 32ac8a8d51
[util] Make Fence and Win32Fence final
Otherwise, Josh will keep complaining about this until the end of time.
2019-11-27 12:31:17 +01:00
Philip Rebohle c9c6b1886b
[d3d11] Synchronize presentation when destroying swap chain
Otherwise, we might destroy the presenter before the CS thread
actually issues the present operation, and the waitForIdle has
not the desired effect.
2019-11-26 23:51:31 +01:00
Philip Rebohle 9ccad0d197
[dxvk] Use waitForIdle when destroying DXVK device
Otherwise, we might call vkDeviceWaitIdle before all command buffers
have been submitted to the Vulkan queue. Found by inspection.
2019-11-26 22:06:13 +01:00
Philip Rebohle b2eeecd624
[meta] Update default config file 2019-11-26 17:27:05 +01:00
Philip Rebohle 7446d3c58a
[dxgi] Don't allow changing the FRAME_LATENCY_WAITABLE_OBJECT flag 2019-11-26 16:54:52 +01:00
Philip Rebohle 9785fba66e
[dxgi] Implement IDXGISwapChain2::GetFrameLatencyWaitableObject 2019-11-26 16:54:52 +01:00
Philip Rebohle 65cc8c2b31
[d3d11] Create frame latency event for swap chain
Needed in order to support the DXGI 1.3 frame latency API.
2019-11-26 16:54:52 +01:00
Philip Rebohle 6ebf3e1656
[util] Implement fence capable of signaling win32 events 2019-11-26 16:11:46 +01:00
Philip Rebohle ef37b5fed6
[dxgi] Implement IDXGISwapChain2::SetFrameLatency 2019-11-26 16:11:46 +01:00
Philip Rebohle 2d1fb52b2f
[util] Reimplement Signal
The new implementation is more akin to D3D12 fences or timeline
semaphores, and should make implementing similar concepts easier.
2019-11-26 16:11:46 +01:00
Philip Rebohle 69bad7bf8c
[d3d11] Move frame latency handling into D3D11SwapChain 2019-11-26 16:11:46 +01:00
Philip Rebohle a0651392c4
[dxvk] Fix include awfulness 2019-11-26 16:10:58 +01:00
Philip Rebohle e648d59a10
[util] Fix winelib build
Fixes #1256.
2019-11-26 16:09:35 +01:00
Joshua Ashton bf14371f9e [util] Wide character conversion changes
Replaces tows with an easier helper that fits in nicer with fixed-size arrays in DXGI, etc.

Prefer UTF8 in tows/fromws.
2019-11-26 01:53:49 +01:00
Joshua Ashton 7e3142b2ed [d3d11] Hook up platform-specific clock
See 89dfa2bc22
2019-11-26 01:52:58 +01:00
Joshua Ashton c39c3e8dcc [dxvk] Hook up platform-specific clock
See 89dfa2bc22
2019-11-26 01:52:58 +01:00
Joshua Ashton 38f945bf0b [util] Add platform-specific clock implementation
MinGW calls to GetSystemTimeAsFileTime via gettimeofday for std::chrono::high_resolution_clock::now,
This is horribly slow and inaccurate.

There are also issues if MinGW is not built with libstdc++ at the same time that can cause the precision to be bad enough to cause massive hangs.
This effectively works around that as well.

Relevant: ValveSoftware/Proton#3198
2019-11-26 01:52:58 +01:00
Philip Rebohle 25a1e0d355
[d3d11] Actually fix subresources discarded by DiscardView1 2019-11-24 00:34:15 +01:00
Philip Rebohle 53fca5143f
[d3d11] Ignore D3D11_COPY_DISCARD
Various truck simulations are broken and set this on every
CopySubresourceRegion call, which, if we were to implement
DiscardBuffer for non-mappable resources again, would break
them. This flag seemingly has no effect on native D3D11.
2019-11-24 00:08:06 +01:00
Philip Rebohle a7c21a617c
[d3d11] Overhaul DiscardResource and DiscardView implementations
For host-visible resources, these behave like MAP_DISCARD.
Euro Truck Simulator 2 and friends relies on this (see #1250).
2019-11-23 23:57:07 +01:00
Philip Rebohle 1211bb5e5f
[dxvk] Sort buffer slices before returning them to the buffer
Buffer slices often get shuffled over time due to timing and thread
synchronization, which makes it less and less likely for the dynamic
uniform buffer binding optimization to be effective. Sorting the
slices beforehand addresses the issue and may help CPU performance.
2019-11-23 00:42:54 +01:00
Philip Rebohle 596001c37e
[dxvk] Enable shader-based depth-stencil copies for AMDVLK
Turns out to be slightly faster in practice.
2019-11-22 02:12:02 +01:00
Philip Rebohle 9e965546fc
[meta] Release 1.4.5 2019-11-19 23:36:01 +01:00
Philip Rebohle 6b3d60ab25
[dxvk] Enable asynchronous presentation on all hardware
...and remove the dxvk.asyncPresent option.
2019-11-19 23:34:24 +01:00
Philip Rebohle ceddbaf7c4
[dxvk] Fix synchronization around vkDeviceWaitIdle
From the spec:
	"Host access to all VkQueue objects created
	from device must be externally synchronized"

We were not doing that, which could cause hangs and
all sorts of issues when recreating the swap chain
on Nvidia GPUs.
2019-11-19 23:34:14 +01:00
Philip Rebohle 4fff2343c1
[dxvk] Fix handling of undefined shader inputs
If the previous stage or the input layout does not define an input,
D3D11 will read zeroes wheras the result is undefined in Vulkan.

Fixes performance degradation and rendering issue in Final Fantasy XV
with the "Geomapping" (terrain tessellation) option enabled.
2019-11-19 15:34:29 +01:00
Philip Rebohle a1f55330ee
[dxvk] Implement pass to eliminate undefined shader input variables 2019-11-19 15:26:32 +01:00
Philip Rebohle 5a2fd7c71b
[spirv] Add method to retrieve literal string from instruction 2019-11-19 12:49:07 +01:00
Philip Rebohle 8252d1ccd5
[spirv] Add method to erase data from code buffer 2019-11-19 12:17:11 +01:00
Philip Rebohle 9f88249b91
[spirv] Add method to allocate new ID from code buffer. 2019-11-19 12:12:05 +01:00
Philip Rebohle 014798161c
[dxvk] Avoid some unnecessary barriers around render target clears 2019-11-18 19:36:19 +01:00
Philip Rebohle c7718e5952
[d3d11] Zero-initialize UAV counters
Fixes a hang in Dirt Rally on RADV.
2019-11-18 18:40:39 +01:00
Philip Rebohle cee7db1c57
[dxvk] Always align texel buffers to at least 16 bytes
Since we don't know the view format in advance, and some
drivers require single-texel alignment.
2019-11-18 13:45:35 +01:00
Philip Rebohle 73a5b33375
[d3d11] Also fix reset counter memory order for deferred context queries 2019-11-15 19:48:41 +01:00
Philip Rebohle e787077554
[util] Remove traces of the allowMapFlagNoWait option 2019-11-15 19:45:40 +01:00
Philip Rebohle c24dad75dc
[d3d11] Remove allowMapFlagNoWait option 2019-11-15 11:09:11 +01:00
Philip Rebohle dbc14fe65c
[d3d11] Fix memory order for query reset counter
Probably doesn't change anything, but let's fix it anyway.
2019-11-14 23:43:58 +01:00