Philip Rebohle
79fcaa9fba
[d3d9] Remove unused variable from D3D9DeviceEx::Clear
...
Fixes a compiler warning.
2020-01-09 18:06:58 +00:00
Philip Rebohle
cd00719122
[dxvk] Tweak number of pipeline compiler threads
...
Gives some 6-core and 8-core CPUs a bit more breathing room, while
also supporting up to 32 workers instead of just 16 to leverage
the new high core count Ryzen CPUs.
2020-01-09 18:04:25 +01:00
Joshua Ashton
47555f1dda
[d3d9] Add GetSurfaceExtent helper
2020-01-09 03:29:58 +00:00
Joshua Ashton
cd58b147a1
[d3d9] Respect mip != 0 for Clear fastpath
2020-01-09 03:24:50 +00:00
Joshua Ashton
ebcab68822
[d3d9] Respect specific mip size for implicit viewport in SetRenderTarget
...
Closes #1295
2020-01-09 03:19:37 +00:00
Joshua Ashton
3cfc16ea34
[d3d11] Move shader stage and buffer slot calc to inside lambda
...
Take advantage of the fact that template permutations transfer into lambdas inside of them.
Removes some unnecessary captures.
2020-01-08 23:09:53 +01:00
Joshua Ashton
b738c4220b
[d3d9] Scale depth bias value based on current format's r
value
2020-01-08 19:38:18 +00:00
Joshua Ashton
2d7f4b1a2c
[d3d9] Set depth bias values separately, optimize redundant rasterizer state changes
2020-01-08 19:38:18 +00:00
Philip Rebohle
b376417f20
[dxvk] Fix loading vkAcquireFullScreenExclusiveModeEXT etc.
...
We're not using those functions, but these are device functions, not
instance functions. vkGetPhysicalDeviceSurfacePresentModes2EXT appears
to be an instance function.
Found while investigating #1324 .
2020-01-08 04:10:10 +01:00
Philip Rebohle
8b9c03ce76
[util] Improve Spinlock implementation
...
Addresses two potential issues:
- Our spinlocks are almost never contested, however the code generated
is not ideal without the likely/unlikely hints.
- In the unlike event that a spinlock is in fact contested, we'd yield
immediately, even though most of the time we'd only have to wait for
a few hundred cycles at most.
Replacing our spinlocks with std::mutex is not an option due to much
higher locking overhead in the uncontested case; doing so reduces
performance significantly for the buffer slice and pipeline locks.
2020-01-07 17:28:33 +01:00
Joshua Ashton
9541aef0b8
[d3d9] Ensure D3DDISPLAYMODEEX we use to call the Ex funcs has its size set correctly
2020-01-06 04:14:02 +00:00
Joshua Ashton
61b6f8f297
[d3d9] Hook up GetAdapterDisplayMode to resp. adapter func
...
Fixes fullscreen at < native res in Vampire: The Masquerade Bloodlines 1/2
2020-01-06 04:07:02 +00:00
Joshua Ashton
91574993df
[d3d9] Return current display mode in GetAdapterDisplayModeEx rather than last mode
...
Fixes fullscreen at < native res in Vampire: The Masquerade Bloodlines 1/2
2020-01-06 04:06:45 +00:00
Joshua Ashton
845ab2b5af
[d3d9] Don't re-set dialogbox mode on swapchain Reset
...
There's no reason to do this now that we have no error path in SetDialogBoxMode...
2020-01-04 21:12:53 +00:00
Joshua Ashton
d53b3adaea
[d3d9] Remove incorrect error returns SetDialogBoxMode
...
The Microsoft docs for this are incorrect based on my tests of all the described edge-cases.
https://docs.microsoft.com/en-us/windows/win32/api/d3d9/nf-d3d9-idirect3ddevice9-setdialogboxmode
2020-01-04 21:10:26 +00:00
Philip Rebohle
ae01bd8bd4
[dxgi] Ignore sync interval if PRESENT_TEST is used
...
Otherwise, the following sequence leads to the Vulkan
swap chain being recreated once per frame:
swapchain->Present(0, DXGI_PRESENT_TEST);
swapchain->Present(1, 0);
Found while investigating #1314 .
2020-01-04 11:18:51 +01:00
Philip Rebohle
3db00a0f40
[d3d11] Increment transfer command counter when initializing UAV counter
...
Otherwise, we won't clear the counter before it is being used if there are
no other transfer commands recorded to the initializer command buffer.
2020-01-03 13:44:23 +01:00
Joshua Ashton
0343938c2e
[util] Enable d3d9.forceSamplerTypeSpecConstants for Halo [CE]
...
The game uses incorrect sampler types in the shaders for glass rendering which breaks it on native + us if we don't spec-constantly chose the sampler type automagically.
2020-01-01 20:58:42 +00:00
Joshua Ashton
c024b89171
[dxso] Implement d3d9.forceSamplerTypeSpecConstants
...
This option makes us always use a spec constant to determine sampler type (instead of just in PS 1.x)
which works around a game bug in Halo CE where it gives cube textures to 2d/volume samplers
2020-01-01 20:56:05 +00:00
Philip Rebohle
694d6c7f77
[util] Improve ticket lock implementation
...
Atomic fetch-and-add on unlock is not needed since no other thread can
modify the serving counter after the calling thread acquired the lock.
May slightly improve performance in games relying on ID3D10Multithread.
2020-01-01 13:59:46 +01:00
Joshua Ashton
ff129abaf0
[d3d9] Fix crash when trying to present with a currently invalid presenter
...
Closes #1304
2019-12-28 01:27:18 +00:00
Joshua Ashton
0993f6f25d
[dxso] Negate reflection in TexM3x3VSpec
2019-12-25 18:43:51 +00:00
Joshua Ashton
66fee8ff51
[dxso] Normalize eyeRay and normal before reflection in TexM3x3Spec
2019-12-25 18:36:34 +00:00
Joshua Ashton
e0b83b13b5
[dxso] Only track co-issue parent opcode rather than the full context
...
Tracking the full instruction ctx is slow and unnecessary
2019-12-25 18:00:46 +00:00
Joshua Ashton
724fe78ba1
[dxso] Don't emit a co-issue for CNDs parented to a CND
...
Closes #1309
2019-12-25 17:43:35 +00:00
Joshua Ashton
b4f2094c02
[d3d9] Enable bounds testing for D3DPOOL_SYSTEMMEM buffers
...
Improves performance in Halo CE.
2019-12-22 19:05:22 +00:00
Joshua Ashton
d39ff9020e
[dxso] Perform saturate after bitshift modifier
2019-12-22 18:14:46 +00:00
Joshua Ashton
3ff9c4cc43
[dxso] Track and prioritize co-issued CNDs above their parent ops
2019-12-22 17:46:57 +00:00
Joshua Ashton
4d6fbacd3a
[dxso] Keep track of the current instruction index in a decoding context
2019-12-22 17:44:30 +00:00
Joshua Ashton
abf74299e9
[dxso] Parse co-issue instruction modifier
2019-12-22 17:44:04 +00:00
Joshua Ashton
fb4d794412
[d3d9] Use VK_FORMAT_D24_UNORM_S8_UINT for D3DFMT_DF24
...
May improve performance in some instances
2019-12-22 01:46:50 +00:00
Joshua Ashton
05de0b20a0
[d3d9] Use VK_FORMAT_D24_UNORM_S8_UINT for D3DFMT_D24X8
...
May improve performance in some instances
2019-12-22 01:43:36 +00:00
Joshua Ashton
90ce37c8c9
[d3d9] Make ChangeReportedMemory actually atomic
...
Massive edge case that will never happen, but better to be safe than sorry.
Reduces the atomic ops too.
2019-12-20 18:07:35 +00:00
Joshua Ashton
fae99907da
[util] Add get to bitset
2019-12-18 23:18:01 +00:00
Joshua Ashton
5cc0fd5c25
[d3d9] Simplify SetViewport
...
pViewport == nullptr is illegal
2019-12-18 23:18:01 +00:00
Joshua Ashton
bab56433cb
[d3d9] Avoid rebinding scissor rects if the same one is re-set
2019-12-18 23:18:01 +00:00
Joshua Ashton
288a9dd547
[d3d9] Avoid rebinding viewports if the same one is re-set
2019-12-18 23:18:01 +00:00
Joshua Ashton
9ec0541b93
[d3d9] Still rebind viewport/scissor when setting the same RT
...
Closes #1290
2019-12-18 23:18:01 +00:00
Joshua Ashton
7b0723520a
[d3d9] Add operator overloads for RECT
2019-12-18 23:18:01 +00:00
Joshua Ashton
777cd4cd64
[d3d9] Add operator overloads for D3DVIEWPORT9
2019-12-18 23:01:16 +00:00
Alessandro Toia
3c8fdc2863
Report gpu vendor as Nvidia for Star Wars Battlefront II
2019-12-18 17:38:24 +01:00
Philip Rebohle
31948cae8c
[spirv] Allow specifying the SPIR-V version explicitly
...
We're going to use some SPIR-V 1.4 features for D3D11 if supported,
but 1.4 is not supported by all implementations.
2019-12-18 17:36:46 +01:00
Joshua Ashton
78e4816fc0
[d3d9] Avoid unnecessary state block constant bits when not SWVPing
2019-12-18 14:48:01 +01:00
Joshua Ashton
312905e8a3
[d3d9] Use new bitset helper + tzcnt for stateblocks
2019-12-18 14:48:01 +01:00
Joshua Ashton
b99b1d153a
[util] Add bitset helper
2019-12-18 14:48:01 +01:00
Joshua Ashton
784abe5cf4
[d3d9] Move auto depth stencil creation to after swapchain creation
...
If the app specifies w == 0 and/or h == 0 then this will be filled in by then in the presentation params.
Impacts #1278
2019-12-18 00:09:55 +00:00
Joshua Ashton
009e772fe8
[d3d9] Remove initial device reset outside of constructor
...
Allows us to funnel hresults from that to the response of CreateDevice
2019-12-17 23:59:37 +00:00
Joshua Ashton
3b119c0be6
[d3d9] Log unavailable backbuffer format if encountered when resetting swapchain
2019-12-17 22:36:27 +00:00
Joshua Ashton
3abd30bb96
[d3d9] Fix return value for invalid backbuffer formats
...
This got changed when I saw that the auto depth stencil when set to an unavailable returns D3DERR_NOTAVAILABLE.
Turns out if the backbuffer is unavailable it returns D3DERR_INVALIDCALL...
Consistent...
Closes #1278
2019-12-17 22:36:27 +00:00
Philip Rebohle
a265af74ed
[hud] Respect dxvk.hud configuration option again
...
This was accidentally dropped during the HUD refactor. Fixes #1279 .
2019-12-17 04:40:06 +01:00
Joshua Ashton
e527b963c4
[util] Handle undefined ratios in simplest ratio helper
...
Fixes division by zero error
Closes #1280
2019-12-17 03:16:56 +00:00
Joshua Ashton
91b5105db5
[d3d9] Move capture struct and enum to stateblock header
...
Makes more sense for it to be here.
2019-12-17 03:16:50 +00:00
Philip Rebohle
3cdae3ae1d
[meta] Release 1.5
2019-12-16 14:41:29 +01:00
Philip Rebohle
9be0bf95ca
[util] Defer D3D9 surface creation for Atelier Ryza
2019-12-16 14:41:29 +01:00
Joshie
54ed8f0bb0
[d3d9] Implement Direct3D9 Frontend ( #1275 )
...
Co-authored-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Co-authored-by: Robin Kertels <robin.kertels@gmail.com>
Co-authored-by: pchome <pchome@users.noreply.github.com>
Co-authored-by: Christopher Egert <cme3000@gmail.com>
Co-authored-by: Derek Lesho <dereklesho52@Gmail.com>
Co-authored-by: Luis Cáceres <lacaceres97@gmail.com>
Co-authored-by: Nelson Chen <crazysim@gmail.com>
Co-authored-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Co-authored-by: Riesi <riesi@opentrash.com>
Co-authored-by: gbMichelle <gbmichelle.dev@gmail.com>
2019-12-16 04:28:01 +01:00
Philip Rebohle
566fb84abd
[hud] Allocate vertex buffer in host-visible device memory if possible
2019-12-16 00:24:19 +01:00
Philip Rebohle
c6fb8fa5e8
[hud] Clean up HUD rendering
...
- Avoids rebinding the vertex buffer on every single draw.
- Avoids push constants. We could use MultiDrawIndirect in the future.
- Slightly reduces the vertex buffer size.
2019-12-16 00:03:21 +01:00
Philip Rebohle
13d2479ecf
[hud] Don't create uniform buffer
...
No longer used.
2019-12-15 23:17:23 +01:00
Philip Rebohle
9c6ff95bb6
[hud] Don't use vertex shader for scaling
...
Instead, do it on the CPU.
2019-12-15 23:13:59 +01:00
Philip Rebohle
aa40decc23
[d3d11] Don't present if the presenter has no swap chain.
...
Also fixes DXGI_PRESENT_TEST handling for zero-sized windows.
2019-12-15 11:38:57 +01:00
Philip Rebohle
2d0c9127f3
[vulkan] Don't create a swap chain if the window size is 0
...
This can actually happen on win32, and creating a zero-sized swap
chain is illegal.
2019-12-15 11:32:43 +01:00
Philip Rebohle
ae7189f9a4
[d3d11] Update HUD on CS thread
...
Otherwise, we may end up reading some bollocks since the CS thread
might not have finished processing the entire frame yet.
2019-12-13 15:02:45 +01:00
Philip Rebohle
2689204d74
[hud] Enable manual sRGB conversion for non-sRGB swap chains
...
We still blend in the wrong color space, but text should be a bit
more readable in some games now.
2019-12-13 14:03:00 +01:00
Philip Rebohle
08d5b4e0e7
[hud] Don't average the draw call count
...
Turns out this was a bad idea.
2019-12-13 13:14:23 +01:00
Philip Rebohle
ef99078fc4
[hud] Reduce update frequency of draw call display
2019-12-13 13:05:49 +01:00
Philip Rebohle
2c4879b58c
[hud] Reduce update frequency of queue submission display
...
Shows the maximum number of submissions encountered per frame
in the given time frame.
2019-12-13 13:01:44 +01:00
Philip Rebohle
3febca6863
[hud] Add colorful labels
2019-12-13 12:34:01 +01:00
Philip Rebohle
5da27a92f5
[hud] Fix letter spacing
2019-12-13 12:17:15 +01:00
Philip Rebohle
7a18cb1227
[dxvk] Remove unused memory stat counters
2019-12-13 12:08:36 +01:00
Philip Rebohle
ed69da0fff
[hud] Remove legacy code
2019-12-13 11:58:09 +01:00
Philip Rebohle
3415376984
[hud] Implement compiler activity display as a HUD item
2019-12-13 11:54:51 +01:00
Philip Rebohle
5d8ae8f988
[hud] Implement GPU load display as a HUD item
2019-12-13 11:54:51 +01:00
Philip Rebohle
936f22d2aa
[hud] Implement memory stats display as a HUD item
2019-12-13 11:54:50 +01:00
Philip Rebohle
3aff573bd4
[hud] Implement pipeline stat display as a HUD item
2019-12-13 11:54:26 +01:00
Philip Rebohle
3de8499697
[hud] Implement draw call stats display as a HUD item
2019-12-13 11:54:13 +01:00
Philip Rebohle
0f2610010b
[hud] Implement queue submission counter as a HUD item
2019-12-13 11:54:13 +01:00
Philip Rebohle
07a4504a9f
[hud] Implement frame time graph as a HUD item
2019-12-13 11:54:13 +01:00
Philip Rebohle
2d5f44a7ff
[hud] Implement FPS display as a HUD item
2019-12-13 11:54:13 +01:00
Philip Rebohle
0da5aac357
[hud] Implement Vulkan device info as a HUD item
2019-12-13 11:54:13 +01:00
Philip Rebohle
e4bc5c2aee
[hud] Implement client API info as a HUD item
2019-12-13 11:54:13 +01:00
Philip Rebohle
1c079a96e5
[hud] Implement DXVK version info as a HUD item
2019-12-13 11:54:13 +01:00
Philip Rebohle
6931f03120
[hud] Add new HUD item abstraction
...
Allows for a cleaner and more flexible implementation of new HUD elements.
The old implementation was not intended to support quite as many elements
as it does, and now there is some need for API-specific HUD elements.
2019-12-13 11:54:13 +01:00
Philip Rebohle
4346f82209
[hud] Don't pass DXVK context around in HUD modules
2019-12-13 11:54:13 +01:00
Philip Rebohle
8e587af0da
[dxvk] Add method to retrieve per-heap memory stats
2019-12-13 11:54:13 +01:00
Philip Rebohle
4fcf28f4dc
[util] Spoof Nvidia cards for Crysis 3
...
The game for some reason runs significantly slower in CPU-bound scenarios
when it recognizes an AMD GPU. On the other hand, there seems to be a small
performance hit on an actual Nvidia GPU (GTX 670) in GPU-bound scenarios when
doing this, but on most setups the tradeoff should be worth it.
2019-12-11 23:01:27 +01:00
Philip Rebohle
b9258c0c49
[dxvk] Separate gfx resource hazard checking and barrier emission
...
Otherwise, when performing three draws with the same storage buffers or
storage images bound, we don't emit a barrier between the 2nd and 3rd
draw since the tracking information gets cleared by the second draw.
Fixes #1262 .
2019-12-11 13:45:57 +01:00
Joshua Ashton
f5dd509429
[spirv] Implement constbReplicant
2019-12-11 03:18:39 +01:00
Joshua Ashton
8b6dd0544e
[spirv] Implement constvec4b32
2019-12-11 03:18:39 +01:00
Joshua Ashton
028c6198e4
[spirv] Implement opReflect
2019-12-11 03:18:39 +01:00
Joshua Ashton
3ce678b17d
[spirv] Implement opExp
2019-12-11 03:18:39 +01:00
Joshua Ashton
fdbfb2c92d
[spirv] Implement opInverse, opNormalize and opLength
2019-12-11 03:18:39 +01:00
Joshua Ashton
edf0661994
[spirv] Implement opTranspose
2019-12-11 03:18:39 +01:00
Joshua Ashton
e144c17363
[spirv] Implement constfReplicant helper
2019-12-11 03:18:39 +01:00
Joshua Ashton
7a956ef8c8
[dxvk] Expose ability to retrieve type from DxvkShaderKey
2019-12-11 03:18:39 +01:00
Joshua Ashton
7c8d03b3e1
[dxvk] Add helper to get size of memory/image in bytes
2019-12-11 03:18:39 +01:00
Philip Rebohle
3063d7fc7c
[dxvk] Improve DxvkImageView::handle()
...
Should fix a silly compiler warning and improves code gen, which
is important since this is *the* most frequently called function
in the backend.
2019-12-11 03:18:39 +01:00
Joshua Ashton
d5d6ae4fe1
[dxvk] Add support for implicit samplers
2019-12-11 03:18:39 +01:00
Joshua Ashton
3fa8691033
[util] Implement simplest ratio helper
2019-12-11 03:18:39 +01:00
Joshua Ashton
16dd1249b7
[util] Add alignDown helper
2019-12-11 03:18:39 +01:00
Joshua Ashton
57b2c02528
[util] Implement lzcnt
2019-12-11 03:18:39 +01:00
Joshua Ashton
aef12f7ee3
[util] Add countof helper
2019-12-11 03:18:39 +01:00
Joshua Ashton
d4cad9055c
[util] Implement a clamped version of ComObject, for D3D9
...
Satisfies a quirk in D3D9, solving an issue in SWTFU.
2019-12-11 03:18:39 +01:00
Joshua Ashton
511ed27733
[util] Add GetPrivateRefCount helper
2019-12-11 03:18:39 +01:00
Joshua Ashton
9280818a57
[util] Implement fclamp for fp special cases
2019-12-11 03:18:39 +01:00
Joshua Ashton
ec197b49f9
[util] Implement some basic vector and matrix math utils
2019-12-11 03:18:39 +01:00
Joshua Ashton
d44707e349
[util] Mark clamp & align as constexpr
2019-12-11 03:18:39 +01:00
Joshua Ashton
a3f74b5eda
[util] Implement bit cast.
2019-12-11 03:18:39 +01:00
Philip Rebohle
fc91fe1d34
[dxgi] Add fake implementation of DxgiFactory::EnumWarpAdapter
...
Apparently FIFA 19 needs this.
2019-12-09 23:27:56 +01:00
Philip Rebohle
945a64252d
[d3d11] Determine exclusive fullscreen mode based on swap chain flags
2019-12-05 13:11:06 +01:00
Philip Rebohle
575a267f07
[vulkan] Support exclusive fullscreen control in presenter
2019-12-05 13:10:11 +01:00
Philip Rebohle
9c26fad40e
[vulkan] Add feature bit for exclusive fullscreen control
2019-12-05 13:05:54 +01:00
Philip Rebohle
dc13f48318
[dxvk] Enable VK_EXT_full_screen_exclusive if available
...
Also pulls in VK_KHR_get_surface_capabilities2 as a dependency.
2019-12-05 13:05:51 +01:00
Philip Rebohle
07c2de62be
[d3d11] Silence some errors about invalid API usage on deferred contexts
...
Halo MCC apparently spams calls to GetData on deferred contexts, which
is obviously illegal.
2019-12-04 20:18:51 +01:00
Philip Rebohle
1ae7d4b302
Revert "[dxvk] Don't clear bind mask for unbound UBOs and samplers"
...
For some bizarre reason, this crashes Star Citizen. The reason might be
that we create multiple pipelines with identical pipelines when using a
state cache, which used to crash some drivers in the past.
Fixes #1266 .
This reverts commit 00a064e32b
.
2019-12-04 12:24:25 +01:00
Philip Rebohle
0e44bc3068
[meta] Release 1.4.6
2019-12-03 14:52:22 +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
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
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
Philip Rebohle
a6483e02fe
[d3d11] Submit stalling event queries before flushing
...
Otherwise, instead of preventing syncs, this would actually
have the opposite effect.
2019-11-14 22:57:30 +01:00
Philip Rebohle
3457e312b0
[dxvk] Always align index buffer slices to 256 Bytes
...
To be on the safe side.
2019-11-14 14:32:01 +01:00
Philip Rebohle
420d95e396
[dxvk] Store shader capability information in separate set of flags
2019-11-12 18:05:03 +01:00
Philip Rebohle
1ca235d186
[util] Disable strict DC mode for MGSV again
...
Not necessary since the resubmitted contexts don't contain mapped buffers.
2019-11-12 00:59:33 +01:00
Philip Rebohle
4f7e7979e3
[util] Add app profile for Metal Gear Solid 5
2019-11-11 23:31:14 +01:00
Philip Rebohle
cc18730967
[dxvk] Enable option to disable OpenVR integration
2019-11-11 23:30:35 +01:00
Philip Rebohle
9f66351b82
[dxvk] Move extension provider list to DxvkInstance
2019-11-11 23:30:07 +01:00
Philip Rebohle
6948d18f5f
[dxvk] Always align vertex buffer slices to 256 bytes
...
Works around an unknown geometry rendering isssue in Warhammer Chaosbane.
Should probably be investigated at some point.
2019-11-10 22:37:11 +01:00
Philip Rebohle
31baf3529a
[d3d11] Fix uninitialized DSV flags
...
Fixes #1242 .
2019-11-10 15:02:21 +01:00
Philip Rebohle
4b199ef60d
[dxvk] Remove option to disable transfer queue
2019-11-08 11:29:22 +01:00
Philip Rebohle
a74449c367
[dxvk] Remove ability to query instance from adapter
...
Adapters don't hold a reference to the instance.
2019-11-08 11:28:08 +01:00
Philip Rebohle
77574d9970
[d3d11] Don't query DXVK instance from adapter
2019-11-08 11:25:58 +01:00
Philip Rebohle
b2317cad4d
[dxvk] Pass DXVK instance to DXVK device directly, not through the adapter
2019-11-08 11:17:02 +01:00
Philip Rebohle
212f5ba1f3
[dxgi] Query DXVK instance from DXGI factory, not the adapter
2019-11-08 11:06:15 +01:00
Philip Rebohle
ed8af3ccc4
[dxvk] Document wonky DxvkAdapter ref count behaviour
2019-11-07 21:08:20 +01:00
Philip Rebohle
a0dba6bbf9
[d3d11] Hold reference to DxvkInstance
...
Hack to keep the instance alive which owns the adapters. Should
fix #1240 for now, but we should fix this properly later on.
2019-11-07 20:21:27 +01:00
Philip Rebohle
b18c50d5ab
[dxvk] Use static variables for extension provider instances
...
Also, remove redundant interface documentation.
2019-11-07 01:35:10 +01:00
Joshua Ashton
dbf2407fd3
[dxvk] Implement extension provider system
...
This change introduces a new system for providing extra instance/device extensions.
This consolidates platform-specific and vr-related to its' own thing for potential future cross-platform/native Linux work.
2019-11-07 01:24:52 +01:00
Joshua Ashton
27898ebbfc
[build] Simplify and correct errors in options handling
...
Fix some typos...
D3D10 is dependent on D3D11 therefore DXGI is always dependent on D3D11
2019-11-07 01:24:52 +01:00
Joshua Ashton
4ad99feb73
[build] Demote no frontends/tests to a warning
2019-11-07 01:24:52 +01:00
Philip Rebohle
1d961b7dc3
[d3d11] 'a' is not a very good name for a variable
2019-11-04 13:46:18 +01:00
Philip Rebohle
77a0cb2b19
[d3d11] Don't synchronize with CS thread on present
...
Instead, submit from the CS thread in order to prevent out-of-order
submissions. Improves minimum FPS in Final Fantasy XIV by 5-10%.
2019-11-02 17:53:17 +01:00
Philip Rebohle
e6c3f0479d
[dxvk] Let device know that async presentation is enabled
2019-11-02 17:53:17 +01:00
Philip Rebohle
d96c22be05
[d3d11] Do not synchronize with CS thread in GetData
...
Instead, use a counter to determine whether there are any
pending operation for the query on the CS thread.
2019-11-02 17:53:17 +01:00
Philip Rebohle
0924bb469c
[d3d11] Move query state tracking to immediate context implementation
2019-11-02 17:53:17 +01:00
Philip Rebohle
be5dc234c1
[d3d11] Move common Begin/End implementation to immediate context
2019-11-02 13:48:03 +01:00
Philip Rebohle
63dbca82e7
[d3d11] Track used queries in deferred contexts and command lists
2019-11-02 13:48:03 +01:00
Philip Rebohle
0671007437
[d3d11] Only execute Begin for scoped queries
2019-11-02 13:48:03 +01:00
Philip Rebohle
1459f0e852
[util] Fix != and == operator for private/public COM pointers
2019-11-02 13:48:00 +01:00
Philip Rebohle
1780c549e5
[d3d11] Only add storage buffer usage flag to constant buffers if needed
...
Otherwise, the backend optimization for dynamic uniform buffers will not
kick in.
2019-10-30 10:58:05 +01:00
Philip Rebohle
e95bc3256f
[d3d11] Move handling of constantBufferRangeCheck option to D3D11Options
2019-10-30 10:57:36 +01:00
Philip Rebohle
9e084e63ca
[d3d11] Remove useless members from D3D11DeferredContextMapEntry
2019-10-30 00:44:17 +01:00
Philip Rebohle
9e69a610cb
[dxgi] Use 64-bit integers for refresh rate matching math
...
Otherwise, there may be integer overflows for certain parameter values.
2019-10-29 08:42:53 +01:00
Philip Rebohle
c4e5323e0e
[dxbc] Remove old constant buffer range check
2019-10-28 17:52:50 +01:00
Philip Rebohle
fd547b666e
[dxbc] Don't emit a spec constant for uniform buffers
2019-10-28 15:44:02 +01:00
Philip Rebohle
3d213efe53
[dxbc] Use SSBOs for dynamically indexed constant buffers if needed
...
SSBOs are tightly bound-checked on all Nvidia GPUs, so this allows for
a more accurate workaround for games relying on OOB access behaviour.
2019-10-28 15:42:46 +01:00
Philip Rebohle
68760f5b20
[dxbc] Parse dynamically indexed flag for constant buffers
2019-10-28 14:15:44 +01:00
Philip Rebohle
7db98a1aa4
[meta] Release 1.4.4
2019-10-27 17:56:31 +01:00
Alexandr
dacf1ab4d6
[util] Enable constant buffer range check for Saints Row games
...
Fixes character flickering on Nvidia.
2019-10-27 11:55:48 +01:00