Commit Graph

446 Commits

Author SHA1 Message Date
Philip Rebohle c55c09368b [d3d11] Only store low 8 bits of stencil reference
Seems to match behaviour of the D3D11 runtime, in that OMGetDepthStencilState
will not retain the high bits.

Found by CME. Should fix #1784.
2022-12-11 19:51:57 +01:00
Joshua Ashton 699d56e35d [d3d11] Handle nullptr RasterizerState in ApplyRasterizerSampleCount
This broke as of a637134c56 is causing a crash in the BGFX d3d11 samples.
2022-09-16 11:40:36 +02:00
Joshua Ashton 3a6f8fa413 [d3d11] Assign ForcedSampleCount to correct value in ApplyRasterizerSampleCount
ForcedSampleCount was never being respected as it would always be replaced with 1 as it was being assigned to the wrong variable.

This was also probably causing a bunch of redundant CS work as it was changing state that was dirty checked.
2022-09-16 11:40:36 +02:00
Philip Rebohle 0a222aaaf0 [d3d11] Implement CopyTiles and UpdateTiles 2022-08-26 05:53:03 +02:00
Philip Rebohle ca41bb4ea4 [d3d11] Implement CopyTileMappings 2022-08-26 05:53:03 +02:00
Philip Rebohle ff2ff37696 [d3d11] Implement UpdateTileMappings 2022-08-26 05:53:03 +02:00
Philip Rebohle 5130638ebe [d3d11] Implement ResizeTilePool 2022-08-26 05:53:03 +02:00
Philip Rebohle f97660e210 [d3d11] Implement TiledResourceBarrier 2022-08-26 05:53:03 +02:00
Philip Rebohle 86bdda70b4 [d3d11] Move D3D10Multithread instance to immediate context
Deferred contexts do not support this.
2022-08-24 12:15:35 +02:00
Philip Rebohle 658d824ddd
[d3d11] Silence log spam for invalid image operations 2022-08-18 14:48:29 +02:00
Philip Rebohle d3ab905621
[d3d11] Request high-priority shader compiles as necessary
This can reduce stutter in case shaders are needed immediately while
background threads are still busy compiling a different set of shaders.
2022-08-11 12:39:28 +02:00
Philip Rebohle 0adf64f085 [dxvk] Add flat shading parameter to rasterizer state 2022-08-08 13:34:59 +02:00
Philip Rebohle a74f8da7b7
[d3d11] Use bindVertexBufferRange whenever possible 2022-08-07 19:03:51 +02:00
Philip Rebohle 97f0d1dfb8
[d3d11] Use bindIndexBufferRange whenever possible 2022-08-07 19:03:51 +02:00
Philip Rebohle 35dde3e1b9
[d3d11] Change how resourece binding treats null resources 2022-08-07 19:03:51 +02:00
Philip Rebohle 45a1587b88
[d3d11] Fix some possible constant buffer binding bugs 2022-08-07 18:44:47 +02:00
Philip Rebohle 2e6a2f1be3
[dxvk] Make shader stage parameter in bindShader a template parameter 2022-08-07 18:44:44 +02:00
Philip Rebohle 29a2cb9a5e
[d3d9,d3d11] Make GetShaderStage functions constexpr 2022-08-07 18:44:44 +02:00
Philip Rebohle 28ecf8268d
[d3d11] Use new resource view binding methods 2022-08-07 17:59:20 +02:00
Joshua Ashton 31d17efb48 [dxvk] Add feedback loop aspect flags to bindRenderTargets 2022-08-06 01:33:30 +01:00
Philip Rebohle 7e237b33b7
[d3d11] Track highest bound unordered access view 2022-08-05 14:13:25 +02:00
Philip Rebohle 934caa3fd7
[d3d11] Track highest bound vertex buffer 2022-08-05 14:13:25 +02:00
Philip Rebohle 3dbd9d8659
[d3d11] Track highest bound sampler 2022-08-05 14:13:25 +02:00
Philip Rebohle 6c372e40f6
[d3d11] Track highest bound shader resource 2022-08-05 14:13:24 +02:00
Philip Rebohle 5dd2b20940
[d3d11] Track highest bound constant buffer 2022-08-05 14:13:24 +02:00
Philip Rebohle 18c4ca8e92
[d3d11] Introduce D3D11MaxUsedBindings
And use it in ResetCommandListState, in order to avoid redundant state changes.
2022-08-05 14:13:24 +02:00
Philip Rebohle 9f07bc6532
[d3d11] Refactor shader state 2022-08-05 14:13:24 +02:00
Philip Rebohle 95ab1465ab
[d3d11] Add reset method to more context state 2022-08-05 14:13:24 +02:00
Philip Rebohle 4e1f6e5efd
[d3d11] Refactor unordered access view and output merger state 2022-08-05 14:13:24 +02:00
Philip Rebohle 8383423fbe
[d3d11] Refactor sampler state 2022-08-05 14:13:24 +02:00
Philip Rebohle 1b4cb66dc3
[d3d11] Refactor shader resource state 2022-08-05 14:13:24 +02:00
Philip Rebohle 33e169e85f
[d3d11] Refactor constant buffer state 2022-08-05 14:13:24 +02:00
Philip Rebohle 91fc0a8688
[d3d11] Rename and factor out some state clearing methods 2022-08-05 14:13:21 +02:00
Philip Rebohle e49524fcb0
[d3d11] Move GetType and GetContextFlags to D3D11CommonContext 2022-08-04 13:43:36 +02:00
Philip Rebohle 1d2d712dfb
[d3d11] Move d3d11_context_common.* -> d3d11_context.* 2022-08-04 13:43:36 +02:00
Philip Rebohle 30b1cac0ae
[d3d11] Remove old D3D11DeviceContext class 2022-08-04 13:43:36 +02:00
Philip Rebohle 20df9fc899
[d3d11] Move all remaining context code to D3D11CommonContext 2022-08-04 13:43:36 +02:00
Philip Rebohle a3ed84c0c1
[d3d11] Move remaining D3D11DeviceContext members to D3D11CommonContext 2022-08-04 13:43:36 +02:00
Philip Rebohle b20bfe763e
[d3d11] Move D3D10Multithread instance to D3D11CommonContext 2022-08-04 13:43:36 +02:00
Philip Rebohle 9a2d8878ef
[d3d11] Move Track*SequenceNumber methods to D3D11CommonContext 2022-08-04 13:43:36 +02:00
Philip Rebohle 532b3a6add
[d3d11] Move EmitCs and related methods to D3D11CommonContext 2022-08-04 13:43:36 +02:00
Philip Rebohle e0ea272c0d
[d3d11] Move misc methods to D3D11CommonContext 2022-08-04 13:43:36 +02:00
Philip Rebohle 9e916edef9
[d3d11] Move Draw* and Dispatch* methods to D3D11CommonContext 2022-08-04 13:43:36 +02:00
Philip Rebohle 1d87af062c
[d3d11] Move ResolveSubresource to D3D11CommonContext 2022-08-04 13:43:36 +02:00
Philip Rebohle 17c318864e
[d3d11] Move Apply* methods to D3D11CommonContext 2022-08-04 13:43:36 +02:00
Philip Rebohle 7c82ed35b2
[d3d11] Move internal resource update methods to D3D11CommonContext 2022-08-04 13:43:36 +02:00
Philip Rebohle 956bad5e84
[d3d11] Move GenerateMips to D3D11CommonContext 2022-08-04 13:43:36 +02:00
Philip Rebohle 751d7467df
[d3d11] Move Clear* methods to D3D11CommonContext 2022-08-04 13:43:35 +02:00
Philip Rebohle 50942cd2d9
[d3d11] Move Copy* methods to D3D11CommonContext 2022-08-04 13:43:35 +02:00
Philip Rebohle 163af1309d
[d3d11] Move SetPredication to D3D11CommonContext 2022-08-04 13:43:35 +02:00