Commit Graph

2205 Commits

Author SHA1 Message Date
Philip Rebohle 492b7db07b
[d3d11] Support count buffer in Set|BindDrawBuffers 2019-05-06 00:08:58 +02:00
Philip Rebohle 117b7b1ba1
[d3d11] Implement MultiDrawIndirect extension 2019-05-06 00:08:58 +02:00
Philip Rebohle 9e57b03e64
[d3d11] Implement barrier control extension 2019-05-06 00:08:58 +02:00
Philip Rebohle 04bef3c67a
[d3d11] Add stub implementation of D3D11DeviceExt 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 edbbdef787
[d3d11] Add interfaces to support D3D11 extensions 2019-05-06 00:08:57 +02:00
Philip Rebohle 8a3044a342
[dxvk] Implement depth bounds test in backend 2019-05-06 00:08:57 +02:00
Philip Rebohle 5ad212d279
[dxvk] Introduce new pipeline state to enable depth bounds test 2019-05-06 00:08:57 +02:00
Philip Rebohle bacb1f7c60
[dxvk] Implement indirct draw commands with indirect count 2019-05-06 00:08:57 +02:00
Philip Rebohle 13359d68d7
[dxvk] Enable VK_KHR_draw_indirect_count if available
Useful to implement a corresponding D3D11 extension.
2019-05-06 00:08:57 +02:00
Philip Rebohle 66b6b50af6
[dxvk] Fix stale vertex attribute divisor
Not resetting this may result in unnecessary state cache misses.
2019-05-05 23:18:13 +02:00
Philip Rebohle b35f3c14df
[dxvk] Off-load command buffer submission to separate thread
Reduces load on the CS thread a bit, which may yield a small
performance improvement.
2019-05-05 16:49:17 +02:00
Robin 4c0c66892a [d3d11] Fix MSVC 2017 compilation 2019-05-04 22:14:28 +02:00
Philip Rebohle 37f9a7ffff
[meta] Release 1.1.1 2019-05-04 15:59:18 +02:00
Philip Rebohle f733d082f4
[d3d11] Implement D3D11DeviceContext::SwapDeviceContextState 2019-05-04 15:57:57 +02:00
Philip Rebohle 82c6a5eb1a
[d3d11] Implement D3D11Device::CreateDeviceContextState 2019-05-04 15:57:57 +02:00
Philip Rebohle c1929ccb6f
[d3d11] Add class to implement D3DDeviceContextState 2019-05-04 15:57:55 +02:00
Philip Rebohle 81229d66cc
[d3d10] Explicitly define GUID for ID3D10StateBlock
Fixes linker errors when building against winelib.
2019-05-03 20:32:52 +02:00
Philip Rebohle 53aa27336b
[dxvk] Disable depthWriteEnable if depth attachment has read-only layout
Fixes water rendering in SpellForce 3.
2019-05-03 14:38:21 +02:00
Philip Rebohle 6eeb3b6da9
[dxvk] Add helper function to get info about depth-stencil image layouts 2019-05-03 14:37:59 +02:00
Philip Rebohle 81821414b0
[d3d10] Implement state blocks
Improves compatibility to Wine's Direct2D implementation.
2019-05-03 13:08:57 +02:00
Joshua Ashton 7aecd46f93 [spirv] Implement proj sample variants 2019-05-03 08:34:16 +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 343818cf1c
[d3d11] Always enable shaderStorageImageWriteWithoutFormat
We compile some compute shaders that need it in FL10/FL9 games.
2019-05-02 08:08:45 +02:00
Philip Rebohle e6eef1d1ec
[d3d11] Minor Map/Unmap optimizations
Avoid unnecessary LockContext call when unmapping a buffer.
This may actually improve performance if the context has
multithreaded protection enabled (e.g. D3D10).
2019-05-01 03:01:36 +02:00
Philip Rebohle f76fd8fa5d
[d3d11] Minor CPU savings 2019-05-01 03:00:23 +02:00
Philip Rebohle 7e1b0ef8e6
[dxvk] Bump state cache format to version 4
Accomodates for the alpha test changes in D3D11.
2019-05-01 01:57:34 +02:00
Philip Rebohle 93bd923c17
[d3d11] Set up extra state for the HUD renderer 2019-05-01 01:57:34 +02:00
Philip Rebohle 9fc09c843d
[d3d11] Set up unused extra state for the backend correctly 2019-05-01 01:57:34 +02:00
Philip Rebohle fc52c1720d
[dxvk] Remove old spec constant code 2019-05-01 01:57:34 +02:00
Philip Rebohle 5714f18d15
[dxvk] Use new specialization constant code for graphics pipelines 2019-05-01 01:57:34 +02:00
Philip Rebohle c3f7dfd197
[dxvk] Use new specialization constant code for compute pipelines 2019-05-01 01:57:34 +02:00
Philip Rebohle 433c707888
[dxvk] Add new structure to generate specialization constant info
We should avoid passing redundant and unused data to the driver, as
that may interfere with caching. It also adds a lot of unnecessary
data to traces.
2019-05-01 01:57:34 +02:00
Philip Rebohle 0a77ebbeaf
[dxgi] Change default of s_gamma_bound to true
In the future, we'll assume true and only pass the spec constant
value to the driver if their value is actually different from the
default, but this requires reliable defaults.
2019-05-01 01:57:34 +02:00
Philip Rebohle 04e6479690
[dxbc] Remove old spec constant code 2019-05-01 01:57:34 +02:00
Philip Rebohle dc3cfc9fa0
[dxbc] Use new spec constant API for rasterizer sample count 2019-05-01 01:57:34 +02:00
Philip Rebohle 7111af423d
[dxbc] Add new emitNewSpecConstant method
Convenience method to declare new specialization constants.
2019-05-01 01:57:34 +02:00
Philip Rebohle a340b3101c
[d3d11] Add missing interface queries for IDXGIObject and IDXGIDeviceSubObject 2019-05-01 01:54:00 +02:00
Eero Kelly b92dc14c4d [util] Enable constant buffer range check for NieR:Automata
This fixes a graphical corruption issue where Operator 6O's portrait
displays as a large flashing circle due to uninitialized buffer reads.

Fixes issue: https://github.com/ValveSoftware/Proton/issues/1543

Reviewed-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
2019-04-30 16:08:52 +02:00
Philip Rebohle dc52212873
[dxbc] Disable Constant Buffer Range Check on AMD
The hardware already behaves as intended, no need to waste GPÜ cycles.
2019-04-30 16:07:24 +02:00
Philip Rebohle 3b1e753bb5
[dxvk] Re-implement early discard with quad granularity
May perform better on some hardware in situations where we cannot
discard a full subgroup. Closes #753.
2019-04-30 14:46:03 +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
Danylo Piliaiev 261d31cac6 [dxbc] Fix xfb passthrough for system values
vReg should be always allocated for system values which is
necessary for emitXfbOutputSetup and is already done for
hull shader passthrough.

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
2019-04-30 12:19:21 +02:00
Philip Rebohle 2afe5ec141 [d3d11] Clean up rasterizer state initialization
The error messages are pointless since all of this is already
handled in NormalizeDesc.
2019-04-29 16:22:42 +02:00
Philip Rebohle 06c144f075 [dxbc] Store sample positions as vec2 array
We can append the zeroes in shader code instead. May
improve generated code on drivers that use scratch
memory or temporary uniform buffers for large arrays.
2019-04-29 14:04:42 +02:00
Philip Rebohle 8f5338b1d1 [spirv] Add constvec2f32 helper
We should probably replace this with a proper template at some point.
2019-04-29 13:47:15 +02:00
Philip Rebohle b14ad7b30c [dxbc] Remove some old TODOs
This is already implemented properly.
2019-04-29 11:48:09 +02:00
Philip Rebohle 04152055b7 [dxbc] Correctly report a sample count of 0 for unbound images 2019-04-29 11:48:09 +02:00
Philip Rebohle a3e0157ab0 [dxbc] Correctly report a size of 0 for unbound images 2019-04-29 11:48:09 +02:00
Philip Rebohle 18cbaefdcb [dxbc] Correctly report a size of 0 for unbound buffers 2019-04-29 11:48:09 +02:00