Philip Rebohle
f2d461ab5b
[d3d11] Prevent log spam from repeated Get/SetResourceMinLOD calls
2019-09-16 12:41:44 +02:00
Philip Rebohle
3e17ccfaaa
[d3d11] Implement missing D3D11_FEATURE_D3D9_OPTIONS feature query
2019-09-16 02:21:46 +02:00
Philip Rebohle
c852b6de34
[d3d11] Optimize viewport updates if there is only one single viewport
2019-09-13 14:38:51 +02:00
Philip Rebohle
160b684d5a
[d3d11] Add range check for scissors and make failing it unlikely
2019-09-13 11:49:00 +02:00
Philip Rebohle
b8888ffe6a
[d3d11] Don't create linearly tiled compressed images
...
Quantum Break uses this for texture uploads, which causes unnecessary
GPU synchronization and queue submissions when doing texture uploads.
2019-09-07 20:16:16 +02:00
Philip Rebohle
b0552751ad
[d3d11] Fix incorrect AddRef -> Release
...
Spotted by @jp7677
2019-08-29 21:24:47 +02:00
Philip Rebohle
30d19cd0f2
[d3d11] Rename some hazard tracking methods for clarity
2019-08-29 19:10:53 +02:00
Philip Rebohle
6be124e2cd
[d3d11] Check for conflicts withing RTV and UAV lists upon binding them
2019-08-29 19:10:53 +02:00
Philip Rebohle
e07ef1ec40
[d3d11] Resolve pipeline hazards when binding render targets
2019-08-29 19:10:53 +02:00
Philip Rebohle
a36f056572
[d3d11] Resolve pipeline hazards when binding compute shader UAVs
2019-08-29 19:10:53 +02:00
Philip Rebohle
c8c781c88b
[d3d11] Add check whether a viewed resource has a given bind flag
2019-08-29 19:10:50 +02:00
Philip Rebohle
afc8e4c29d
[d3d11] Filter redundant OMSetRenderTargets calls
...
Since rebinding render targets is a rather expensive
operation, we should avoid doing so whenever possible.
Affects Resident Evil 2 and Devil May Cry 5.
2019-08-26 23:59:08 +02:00
Philip Rebohle
4789790087
[d3d11] Remove outdated comment
...
We actually handle this properly now.
2019-08-26 23:43:47 +02:00
Philip Rebohle
5756e5c921
[d3d11] Check for shader resource view hazards
...
Fixes incorrect behaviour in games that try to use a currently bound
UAV or render target as a shader resource at the same time.
Fixes visual artifacts in Shining Resonance Refrain on AMD hardware.
2019-08-26 23:43:47 +02:00
Philip Rebohle
137589d755
[d3d11] Add state to track potentially hazardous bound SRVs
2019-08-26 23:29:01 +02:00
Philip Rebohle
4064dd3737
[d3d11] Add bound compute shader UAV mask
...
Will be used for efficient hazard tracking.
2019-08-26 23:29:01 +02:00
Philip Rebohle
8208cedfa9
[d3d11] Add common view info struct to all view types
...
Will be used for hazard detection.
2019-08-26 23:29:01 +02:00
Philip Rebohle
5ae5053a2a
[d3d11] Remove templated SetUnorderedAccessViews
...
Not needed because the CS and OM paths are separate anyway.
2019-08-26 23:29:01 +02:00
Philip Rebohle
08e3500beb
[d3d11] Don't use .at()
2019-08-26 23:29:01 +02:00
Philip Rebohle
4cce07ccd9
[d3d11] Update resources mapped on deferred contexts in Map()
...
Apparently it is legal to use mapped buffers on deferred contexts
in D3D11, so we have to execute our update code immediately.
Fixes #1160 .
2019-08-10 11:11:44 +02:00
Philip Rebohle
bd40b05720
[d3d11] Recreate swap chain immediately after synchronous present fails
...
Fully restores pre-1.3 behaviour in case async present is disabled.
Apparently this is necessary to avoid hangs on Nvidia for some reason.
2019-08-06 09:11:04 +02:00
Philip Rebohle
bc0537df37
[d3d11] Remove d3d11.asyncPresent option
2019-08-04 21:49:55 +02:00
Philip Rebohle
6b2f4f93cc
[d3d11] Fix incorrect tracking of mapped image subresources
...
When returnig DXGI_ERROR_WAS_STILL_DRAWING, we should not mark
the subresource as mapped, and instead ignore subsequent calls
to Unmap.
2019-08-03 19:11:19 +02:00
Philip Rebohle
140a2c1017
Revert "[d3d11] Return error when mapping an already mapped image"
...
This reverts commit 1cc531eaf8002cef3e9707cdc3398f45909e38d2.
Even though an FFXIV apitrace clearly indicates that mapping an
already mapped subresource returns E_OUTOFMEMORY in that game,
this doesn't always seem to be correct behaviour.
Fixes #1148 , #1149 .
2019-08-03 19:08:22 +02:00
Philip Rebohle
00cf2a20a3
[d3d11] Don't allow the creation of buffers with a size of zero
2019-07-21 20:47:42 +02:00
Philip Rebohle
92d6f26130
[d3d11] Always enable depth-stencil attachment usage for depth-stencil images
...
Allows us to use framebuffer copies even if the game itself does not
intend to render to the image.
Improves performance in Final Fantasy XIV on RADV.
2019-07-18 17:26:02 +02:00
Philip Rebohle
f16ba4794b
[d3d11] Use unlikely() for some query code
...
This is a somewhat hot path in some games, so why not.
2019-07-17 20:35:00 +02:00
Philip Rebohle
c4b56b9d8d
[d3d11] Use private temporary references for queries
...
Like the previous commit, just with queries.
2019-07-17 20:16:19 +02:00
Philip Rebohle
7225674088
[d3d11] Use private temporary references for state objects
...
We really shouldn't be altering the application-visible ref
count when sending these objects to the CS thread.
2019-07-17 20:01:57 +02:00
Philip Rebohle
af8e1a3d47
[d3d11] Simplify ApplyPrimitiveTopology code
2019-07-17 15:54:59 +02:00
Philip Rebohle
3f30fbd098
[d3d11] Simplify BindIndexBuffer code
2019-07-17 14:41:00 +02:00
Philip Rebohle
b6c395c013
[dxvk] Don't track command count in CS chunks
...
We weren't using this at all, and it's not necessary
to check whether the chunk is empty either.
2019-07-17 12:52:25 +02:00
Philip Rebohle
11b7fc8914
[d3d11] Catch invalid ClearUnorderedAccessViewFloat calls
...
This method cannot be called on integer UAVs.
2019-07-17 11:47:42 +02:00
Philip Rebohle
b20ceec727
[d3d11] Handle integer formats in ClearRenderTargetView correctly
...
We're supposed to apply the same color conversion as in ClearView.
2019-07-17 11:47:42 +02:00
Philip Rebohle
ad8fdcac07
[dxvk] Don't mark queries as stalling if DONOTFLUSH is set
2019-07-16 01:19:02 +02:00
Philip Rebohle
03c6df56c1
[d3d11] Initialize subresourceLayers in the inner loop
...
Not doing so causes Dirt Rally to fail uploading some textures
properly for some extremely weird reason.
2019-07-13 23:39:58 +02:00
Philip Rebohle
7b34b8515b
[d3d11] Enable shaderDemoteToHelperInvocation feature
2019-07-11 19:33:17 +02:00
Robin Kertels
47f7333c18
[d3d11] Fix RSGetViewports and RSGetScissorRects behaviour
...
Fixes #1116 .
2019-07-08 13:14:42 +02:00
Philip Rebohle
15072afa1f
[d3d11] Use new signals as frame synchronization events
2019-07-08 00:16:03 +02:00
Philip Rebohle
c631953ab6
[d3d11] Don't immediately synchronize after present
...
This will actually enable asynchronous presentation.
Improves performance in Quake Champions.
2019-07-05 21:20:09 +02:00
Philip Rebohle
77db8158c8
[dxvk] Add option to toggle asynchronous presentation
2019-07-05 21:20:09 +02:00
Philip Rebohle
ed5c43a14d
[dxvk] Implement asynchronous presentation
...
Off-loads the vkQueuePresentKHR call to the queue submission thread
to avoid synchronization with that thread on a present call.
2019-07-05 15:11:59 +02:00
Philip Rebohle
1cc531eaf8
[d3d11] Return error when mapping an already mapped image
...
Final Fantasy XIV does this. Should avoid some unnecessary work.
2019-07-05 10:25:06 +02:00
Philip Rebohle
2f64f5b4e7
[dxvk] Check whether CS thread is busy before synchronizing with it
...
Reduces unnecessary locking overhead, which may be relevant if this
function gets called frequently by GetData or WaitForResource.
2019-07-04 21:37:17 +02:00
Philip Rebohle
67122d9246
[d3d11] Enable initial image uploads over SDMA
2019-06-29 01:53:43 +02:00
Philip Rebohle
9d902418c0
[d3d11] Enable initial buffer uploads over SDMA
2019-06-29 01:53:43 +02:00
Philip Rebohle
191bba660b
[dxvk] Provide way to access queue properties from device
2019-06-29 01:53:32 +02:00
Philip Rebohle
770ec2c4db
[dxvk] Get rid of array in present vertex shader
2019-06-29 01:34:16 +02:00
Philip Rebohle
42e61020e4
[d3d11] Remove unused SetRenderTargets method
2019-06-27 15:54:42 +02:00
Philip Rebohle
2148619f3c
[d3d11] Spill render pass when restoring context state as needed
2019-06-27 15:54:42 +02:00