Commit Graph

54 Commits

Author SHA1 Message Date
Philip Rebohle 4f28d57352
[dxvk] Remove unused rasterizer discard state flag 2018-06-25 16:56:52 +02:00
Philip Rebohle db7a7fa4bc
[dxvk] Use dynamic offsets for both graphics and compute pipelines 2018-06-22 00:33:47 +02:00
Philip Rebohle f8650c1c9f
[dxvk] Require VK_KHR_maintenance2 and VK_EXT_vertex_attribute_divisor
Wine 3.10 added support for these extensions, so we should use them.
2018-06-11 21:09:52 +02:00
Philip Rebohle e8ac81fe8a
[dxvk] Removed support for depth bounds test
This feature is not used in D3D11, so we don't need backend support.
2018-06-06 13:11:09 +02:00
Philip Rebohle 8b4852be16
[dxvk] Make depth bias a dynamic state
Works around an issue with some games not setting the D3D11 depth
bias state correctly, which can result in an excessive number of
pipelines being compiled.
2018-06-06 12:45:45 +02:00
Philip Rebohle a2d9874b26
[dxvk] Use new spec constant structure for pipeline compilation 2018-05-26 14:54:29 +02:00
Philip Rebohle f42f7cc743
[dxvk] Make use of the asynchronous pipeline compiler optional
Users can enable this by setting DXVK_USE_PIPECOMPILER=1.
2018-05-13 16:02:23 +02:00
Philip Rebohle 368eea7310
[dxvk] Use derivative pipelines again 2018-05-13 15:37:18 +02:00
Philip Rebohle b805560340
[dxvk] Do not log invalid pipeline state
Fixes some log spam in case games attempt to render geometry
with an invalid pipeline state vector.
2018-05-10 21:59:57 +02:00
Philip Rebohle cfb4791872
[dxvk] Use VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT
Optimized versions of the pipelines will be compiled asynchronously.
2018-05-10 14:54:44 +02:00
Philip Rebohle 3b132196d3
[dxvk] Add ability to hold two pipeline handles to pipeline instances 2018-05-10 14:15:47 +02:00
Philip Rebohle 010fc6ad49
[dxvk] Implement DxvkGraphicsPipelineInstance
This should come in handy when compiling an optimized version of
a pipeline asynchronously. This can be extended to hold multiple
pipeline handles, i.e. one optimized one and one without opts.

Collateral damage: We're not using derivative pipelines anymore,
needs to be re-added at a later point.
2018-05-09 22:23:50 +02:00
Philip Rebohle ae0e5bccdd [dxvk] Make shader accessible from shader module 2018-05-03 23:56:28 +02:00
Philip Rebohle 3a3b1eda59 [dxvk] Move render pass out of pipeline state vector 2018-05-03 23:48:45 +02:00
Philip Rebohle d201a1f7c6 [dxvk] Made pipe manager and pipeline classes thread-safe 2018-05-01 16:45:28 +02:00
Philip Rebohle 9a8263f465
[dxvk] Implement vertex binding divisors
Uses VK_EXT_vertex_attribute_divisor when available.
2018-04-17 17:24:16 +02:00
Philip Rebohle d68d62f837
[dxvk] Removed on-disk pipeline cache
Drivers from both major vendors implement their own shader cache
already, and storing a cache per game causes more issues than it
solves. Should fix #261.
2018-04-09 19:38:32 +02:00
Philip Rebohle 687ef77860
[dxvk] Enable sample rate shading if needed 2018-04-08 21:49:30 +02:00
Philip Rebohle 4d28f765df
[dxvk] Remove support for VK_AMD_rasterization_order
RADV will be doing this by default when it makes sense.
2018-04-04 15:09:24 +02:00
Philip Rebohle 9ef4168867 [dxvk] Added support for pipeline-related stat counters 2018-04-03 15:52:39 +02:00
Philip Rebohle 097eb89cfb [dxvk] Log pipeline state when pipeline compilation fails 2018-04-02 19:05:41 +02:00
Philip Rebohle 05e0f3d52d
[dxvk] Remove mutex from Dxvk(Graphics|Compute)Pipeline
Not needed anymore because the pipe manager itself won't be
accessed by multiple threads any longer.
2018-03-29 16:36:31 +02:00
Philip Rebohle 108bf2194f
[dxvk] Time pipeline creation in debug mode 2018-03-29 12:06:53 +02:00
Philip Rebohle 5c2144b55d
[dxvk] Move tess state validation to validatePipelineState 2018-03-21 15:22:18 +01:00
Philip Rebohle ec161823e5
[dxvk] Check whether renderpass is null before creating pipeline 2018-03-21 15:09:34 +01:00
Sebastian Wick 4518b1b76e Shader cache (#188)
* [util] Adds getTempDirectory() function

Will be used by on-disk pipeline caching

* [dxvk] Implement on-disk shader caching

Saving the pipeline cache to disk when the application exits
should be sufficient but the DxvkPipelineCache destructor isn't
reliably called on exit (ref-counting issue?).
As a workaround every frame we check and save the cache if the
size increased by some amount or after one minute elapsed.

* [dxvk] Periodically update shader cache file in separate thread
2018-03-21 02:45:11 +01:00
Philip Rebohle 94aa650f3e
[dxvk] Enable the use of VK_KHR_descriptor_update_template
Reduces the CPU overhead of descriptor set updates, which usually
happen once per draw call. Gains seem to be minor in most games,
some outliers show significantly better performance (i.e. Tomb Raider).
2018-03-17 23:50:03 +01:00
Philip Rebohle e4dae74865
[dxvk] Validate tessellation state for graphics pipeline
This should help with freezes as long as Tessellation is
not properly implemented.
2018-02-23 12:55:23 +01:00
Philip Rebohle ad6c45d6b1
[dxvk] Improve debuggability of shader compiler issues
When using DXVK_LOG_LEVEL=debug, the graphics pipeline manager now
prints the names of the shaders used by the pipeline. This shall
help debug driver crashes in vkCreate*Pipelines.
2018-02-07 16:44:30 +01:00
Philip Rebohle e47c244ac3
[dxvk] Use logger instead of exception when compiling pipelines
The exception is never caught because it is called from DXVK code,
not D3D code.
2018-01-31 00:48:39 +01:00
Philip Rebohle 52e8918b57
[d3d11] Added support for tessellation patch primitives 2018-01-29 11:31:00 +01:00
Philip Rebohle a1a7bb9092
[dxvk] DxvkBindingLayout -> DxvkPipelineLayout 2018-01-23 17:40:36 +01:00
Philip Rebohle 3bb7b45c33
[dxvk] Use strict rasterization order when depth test is disabled 2018-01-19 09:01:28 +01:00
Philip Rebohle d3f84688cc
[dxvk] Make use of VK_AMD_rasterization_order
May slightly improve GPU performance in some scenarios.
2018-01-16 15:00:19 +01:00
Philip Rebohle c1f16d36bd [dxvk] Implemented local pipeline cache 2018-01-13 22:18:32 +01:00
Philip Rebohle 5dd9fea011 [dxvk] Implemented input layout validation
Checks whether all input slots consumed by the vertex shader
are provided by the input layout, and disables rendering in
case the state validation fails. This should hopefully fix
GPU lockups in Nier:Automata.
2018-01-12 14:25:26 +01:00
Philip Rebohle 8bccbbccc8 [dxvk] Using derivative graphics pipelines 2018-01-10 22:54:00 +01:00
Philip Rebohle ed642a57a7 [dxvk] Simplified state-based pipeline lookup 2018-01-10 21:28:20 +01:00
Philip Rebohle c64103c73f [dxvk] Implementing unbound resource handling (1/4)
In order to emulate D3D11 behaviour when a resource is not bound,
we use specialization constants. This requires further changes in
the shader compiler.
2018-01-10 11:44:40 +01:00
Philip Rebohle e872448ca3 [dxbc] Refactored shader compiler to return a DxvkShader 2017-12-08 18:14:05 +01:00
Philip Rebohle 796c200e32 [dxvk] Major refactoring of graphics pipeline state lookup in order to support more dynamic state 2017-12-07 21:47:38 +01:00
Philip Rebohle 27e63cbdc6 [d3d11] Implemented small buffer uploads 2017-12-07 18:51:41 +01:00
Philip Rebohle 19851c8432 [dxvk] Re-implemented pipeline creation within the backend 2017-12-07 09:38:31 +01:00
Philip Rebohle b5d068366d [dxvk] Implemented shader resource binding 2017-12-03 20:23:26 +01:00
Philip Rebohle a6bf7659b0 [dxvk] Refactored shader binding, client APIs must now create pipelines and pipeline layouts 2017-12-03 00:40:58 +01:00
Philip Rebohle f924931d2d [general] Removed TRACE calls for now 2017-11-26 14:01:41 +01:00
Philip Rebohle 8bb0325928 [dxvk] Implemented graphics pipeline creation 2017-11-20 14:11:09 +01:00
Philip Rebohle a9a03fec69 [dxvk] DxvkShader creates a VkShaderModule again 2017-11-20 14:03:00 +01:00
Philip Rebohle a895b0159b [dxvk] Added constant state object binding functions 2017-11-20 13:38:24 +01:00
Philip Rebohle ae0c186f26 [dxvk] Implemented constant state objects 2017-11-20 13:21:27 +01:00