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
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
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
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
Robin Kertels
47f7333c18
[d3d11] Fix RSGetViewports and RSGetScissorRects behaviour
...
Fixes #1116 .
2019-07-08 13:14:42 +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
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
586d0de7bb
[d3d11] Fix default blend factor
2019-06-13 04:15:23 +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
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
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
58d838b915
[d3d11] Avoid emitting redundant vertex and index buffer updates
2019-06-03 00:18:54 +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
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
3168626f4b
[d3d11] Support mapping multiple image subresources at the same time
...
Fixes #1066 .
2019-05-20 19:27:11 +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
a1feaa6748
[dxvk] Add aspect mask parameter to clearImageView
2019-05-09 09:10:06 +02:00
Philip Rebohle
644f33a82b
[dxvk] Optimize unbound vertex buffer handling
...
We can actually just set the stride to 0 when binding a null
buffer, so that we can avoid all the runtime tracking.
2019-05-08 00:52:30 +02:00
Philip Rebohle
7687db0303
[dxvk] Remove extra pipeline state
...
This can be expressed with specialization constants now.
2019-05-06 00:18:59 +02:00
Philip Rebohle
492b7db07b
[d3d11] Support count buffer in Set|BindDrawBuffers
2019-05-06 00:08:58 +02:00
Philip Rebohle
1cd8749234
[d3d11] Add stub implementation of D3D11DeviceContextExt
2019-05-06 00:08:58 +02:00
Philip Rebohle
bacb1f7c60
[dxvk] Implement indirct draw commands with indirect count
2019-05-06 00:08:57 +02:00
Philip Rebohle
f733d082f4
[d3d11] Implement D3D11DeviceContext::SwapDeviceContextState
2019-05-04 15:57:57 +02:00
Philip Rebohle
f503ba4c8b
[d3d11] Fix counter value offset in DrawAuto
...
According to the newly released D3D11.3 functional specification,
we're supposed to subtract the offset of the slot 0 vertex buffer
binding from the counter value.
2019-05-02 16:03:52 +02:00
Philip Rebohle
f76fd8fa5d
[d3d11] Minor CPU savings
2019-05-01 03:00:23 +02:00
Philip Rebohle
9fc09c843d
[d3d11] Set up unused extra state for the backend correctly
2019-05-01 01:57:34 +02:00
Danylo Piliaiev
4dd68987d6
[d3d11] Check if uav's counter slice is defined in CopyStructureCount
...
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
2019-04-30 12:34:27 +02:00
Philip Rebohle
4eff83bdee
[d3d11] Disable Predication support
...
Doesn't work at all in the few games that use it.
2019-04-25 11:55:40 +02:00
Philip Rebohle
95bfac84f1
[dxvk] Support image sub-regions for resolve operations
...
Required for legacy graphics APIs.
2019-04-19 11:41:12 +02:00
Philip Rebohle
b44cad4d32
[dxbc] Replace computeResourceSlotId by light-weight alternatives
...
Slightly reduces overhead of D3D11 binding methods.
2019-04-18 10:06:15 +02:00
Philip Rebohle
295d583c1d
[d3d11] Lazily allocate predicate on SetPredication
...
Many games use CreatePredicate to create occlusion queries without
actually using predication, and we don't want to pay any runtime
cost for this when predicates aren't actually being used.
2019-04-02 04:07:05 +02:00
Philip Rebohle
61adaa941d
[d3d11] Implement fast path for binding full constant buffers
...
Saves a few CPU cycles in the most common case where
we don't have to perform any sort of range check.
2019-03-28 14:09:08 +01:00
Philip Rebohle
8f580efa25
[d3d11] Correctly handle out-of-bounds constant buffer ranges
...
Otherwise we pass an invalid offset and length to the backend,
which leads to invalid descriptor set updates in Vulkan.
The D3D11 runtime does not report corrected constant offset
and count parameters to the applicaion in *GetConstantBuffers1.
Reported-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
2019-03-28 13:45:41 +01:00
Philip Rebohle
3a3d7fb378
[d3d11] Properly implement SetPredication
2019-03-28 10:02:11 +01:00
Philip Rebohle
fc3515c16f
[d3d11] Implement depth-stencil uploads in UpdateSubresource1
2019-03-26 18:11:42 +01:00
Philip Rebohle
412d79c8c1
[d3d11] Use new query implementation
2019-03-14 21:16:41 +01:00
Philip Rebohle
2d39be4e72
[d3d11] Check image block alignment in UpdateSubresource1
...
Fixes validation errors in World of Warcraft, which for some reason
tries to update individual pixels of block-compressed textures.
See #964 .
2019-03-14 01:11:39 +01:00
Joshua Ashton
5ea8648cd9
[d3d11, d3d10, dxgi] Handle null ppvObject in QueryInterface. ( #909 )
...
When a null ppvObject is passed into a QueryInterface on any IUnknown, a E_POINTER should be returned as the result (and it should not crash.)
This matches native d3d11/d3d10/dxgi behaviour and the documentation found here https://docs.microsoft.com/en-us/windows/desktop/api/unknwn/nf-unknwn-iunknown-queryinterface(q_) for IUnknown.
2019-02-10 08:01:01 +01:00