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
Philip Rebohle
a704e6d27e
[d3d11] Fix UAV binding in OMSetRenderTargets{,AndUnorderedAccessViews}
...
Unlike for compute shaders, we're supposed to replace all UAV bindings
when binding render targets. We also should spill the render pass when
disabling UAV rendering to avoid read-after-write hazards.
Fixes a potential synchronization bug encountered in Devil May Cry 5.
2019-06-27 15:54:42 +02:00
Philip Rebohle
5728d10587
[d3d11] Copy initial texture data to mapped buffer, if available
...
Otherwise, if an application maps the image right after creating it,
we might end up reading garbage data or overriding the image data.
2019-06-25 14:22:47 +02:00
Philip Rebohle
4d4db6c683
[dxvk] Use void pointers for packImageData
...
Makes this function a bit less annoying to use.
2019-06-25 14:17:03 +02:00
Philip Rebohle
a41bd8c4a0
[d3d11] Further optimize constant buffer binding
...
Saves a few CPU cycles on the more common SetConstantBuffers method,
compared to SetConstantBuffers1.
2019-06-20 22:49:19 +02:00
Philip Rebohle
3141467c37
[d3d11] Template all functions that take ShaderStage as an argument
...
Basically what D9VK does. Doesn't seem to affect performance, but why not.
2019-06-20 22:09:02 +02:00
Philip Rebohle
684355dfca
[d3d11] Fix GetData parameter validation
...
We're supposed to return an error if a null pointer is
passed along with a non-zero DataSize. Fixes more wine
test failures.
2019-06-16 19:24:44 +02:00
Philip Rebohle
43389d8ef4
[d3d11] Implement timestamp disjoint queries
2019-06-16 17:14:39 +02:00
Philip Rebohle
1c718402f8
[d3d11] Use an array for query and event objects
...
We're going to need multiple queries to implement certain query types.
2019-06-16 17:14:24 +02:00
Philip Rebohle
c8a429b9e1
[d3d11] Fix CheckMultisampleQualityLevels return code
...
We're supposed to return E_FAIL for unsupported sample counts,
and not zero-initialize the returned quality level count if the
format is invalid. Fixes wine test failures.
2019-06-14 13:37:01 +02:00
Philip Rebohle
5a66da8ef8
[dxvk] Fix various issues in GetFormatSupportFlags
...
- Support DXGI_FORMAT_UNKNOWN for buffer resources
- Report D3D11_FORMAT_SUPPORT_CPU_LOCKABLE for all supported formats
- Report support for linear-only image formats properly
- Return E_FAIL in case the format is not supported
Fixes a crash in Planet Coaster (#1091 ).
2019-06-13 16:32:41 +02:00
Philip Rebohle
1bc0b51262
[d3d11] Implement IDXGISurface2 for ID3D11Texture1D
2019-06-13 04:37:35 +02:00
Philip Rebohle
586d0de7bb
[d3d11] Fix default blend factor
2019-06-13 04:15:23 +02:00
Philip Rebohle
089d47e02e
[d3d11] Fix WSize computation for UAV creation
2019-06-13 04:01:15 +02:00
Philip Rebohle
f02a5a7453
[d3d11] Don't create SRVs and UAVs with a size of 0
...
This is illegal and triggers invalid Vulkan usage.
2019-06-13 03:47:10 +02:00
Philip Rebohle
4ffddd1e40
[d3d11] Skip GenerateMips if mip gen flag is not set on resource
2019-06-13 03:31:31 +02:00
Philip Rebohle
ce03384ba9
[d3d11] Validate bind flags for D3D11_RESOURCE_MISC_GENERATE_MIPS
2019-06-13 03:31:31 +02:00
Philip Rebohle
63d8d9c3db
[d3d11] Validate buffer descriptions
2019-06-13 03:31:26 +02:00
Philip Rebohle
6a76577f15
[d3d11] Fix behaviour with a viewport count of zero
2019-06-13 02:22:07 +02:00
Philip Rebohle
5ff9c33855
[d3d11] Fix incorrect behaviour when a scissor rect is not specified
2019-06-13 02:16:12 +02:00
Philip Rebohle
78071c750d
[d3d11] Fix crash when setting too many viewports
2019-06-13 01:54:55 +02:00
Philip Rebohle
acab2bd8ce
[d3d11] Fix crash in GetMaximumFrameLatency with a nullptr argument
2019-06-11 16:36:43 +02:00
Philip Rebohle
7e66dc61b9
[d3d11] Avoid buffer ref count changes when only changing offsets
...
Saves a few CPU cycles in the somewhat common situation where the
currently bound vertex, index or constant buffer is re-bound with
a different offset.
2019-06-04 17:53:54 +02:00
Philip Rebohle
e4e82007b1
[d3d11] Fix inconsistencies in Map/Unmap on immediate/deferred contexts
...
Should save a few CPU cycles, and also fixes incorrect behaviour when an
application passes null pointers to Map on a deferred context.
2019-06-03 15:31:13 +02:00
Philip Rebohle
58d838b915
[d3d11] Avoid emitting redundant vertex and index buffer updates
2019-06-03 00:18:54 +02:00
Philip Rebohle
818704d413
[d3d11] Add some likely/unlikely around CS flushes
2019-06-02 20:29:22 +02:00
Philip Rebohle
6cbd611190
[d3d11] Don't clear DSV aspects that are marked as read-only
...
Saint's Row 4 appears to be doing this. Ref #24 .
2019-06-02 16:34:50 +02:00
Philip Rebohle
c59a8e6e48
[d3d11] Initialize depth images to zero rather than one
...
Matches Windows behaviour.
2019-06-02 16:33:54 +02:00
Philip Rebohle
40d4922682
[d3d11] Fix initial swap chain image count
...
Reported-by: Joshua Ashton <joshua@froggi.es>
2019-06-02 15:00:15 +02:00
Philip Rebohle
1e0fe36cae
[d3d11] Respect COPY_FLAG_NO_OVERWRITE when updating constant buffers
...
Heavy Rain uses this to update constan buffers on deferred contexts.
2019-05-25 14:42:32 +02:00
Philip Rebohle
754cf6da30
[d3d11] Validate subresource index in MapImage
...
Fixes crashes when passing an invalid subresource index.
2019-05-20 19:27:27 +02:00
Philip Rebohle
3168626f4b
[d3d11] Support mapping multiple image subresources at the same time
...
Fixes #1066 .
2019-05-20 19:27:11 +02:00
Philip Rebohle
9004fde78d
[d3d11] Remove useless 'virtual' keyword
2019-05-19 14:38:48 +02:00
Philip Rebohle
e1610f81dc
Revert "[d3d11] Use STDMETHODCALLTYPE for private virtual method"
...
For some reason, this produces broken binaries for some Gentoo
users. Fixes #1067 .
This reverts commit e5fa55cbb5
.
2019-05-19 13:22:04 +02:00
Philip Rebohle
8e9e7963a2
[d3d11] Update mapped buffers of staging textures immediately
...
Improves performance in Lords of the Fallen and The Surge.
Closes #1049 .
Co-authored-by: Robin <robin.kertels@outlook.com>
2019-05-17 12:44:36 +02:00
Philip Rebohle
e5fa55cbb5
[d3d11] Use STDMETHODCALLTYPE for private virtual method
...
Improves code generation on some compilers.
2019-05-15 22:01:19 +02:00
pchome
32e1afc7a1
[build] Add options to disable dxgi/d3d* build
2019-05-15 21:44:39 +02:00
Philip Rebohle
8cae607db0
[d3d11] Add static method implementing D3D11CreateDeviceAndSwapChain
...
ReShade requires this as it hooks both D3D11CreateDevice and *AndSwapChain,
which means that we can't call D3D11CreateDevice without entering infinite
recursion. Fixes #1057 .
Suggested-by: Riesi <riesi@opentrash.com>
2019-05-15 16:46:48 +02:00