Philip Rebohle
a7666aad82
[dxvk] Refactor the way render passes to pipeline compiler methods
2019-07-30 13:17:56 +02:00
Philip Rebohle
d01b6baf38
[dxvk] Introduce compilePipeline method to Dxvk*Pipeline classes
...
Decouples the act of synchronously retrieving a handle
from asynchronously compiling the pipeline.
2019-07-30 12:14:52 +02:00
Philip Rebohle
20b0cbdfb6
[dxvk] Rename compilePipeline -> createPipeline
...
More in line with Vulkan naming.
2019-07-30 11:06:25 +02:00
Philip Rebohle
8d4996bcda
[dxvk] Use shader key structs to store shaders in DxvkPipeline objects
...
Mostly a code cleanup to make constructing these objects a bit easier.
2019-07-23 12:48:11 +02:00
Philip Rebohle
a93dd74f71
[dxvk] Don't use derivative pipelines
...
No driver appears to be taking advantage of this, so why bother.
2019-07-14 13:58:00 +02:00
Philip Rebohle
924ca9eaec
[dxvk] Add more generic version of DxvkBindingMask
2019-06-23 18:45:34 +02:00
Philip Rebohle
a715937db1
[dxvk] Always pass through fully enabled color write masks
...
May improve performance when rendering to RGB-only or Alpha-only
images, which seems to be especially common in D3D9.
2019-06-14 14:27:21 +02:00
Philip Rebohle
42c9fad017
[dxvk] Fix binding indices for vertex attribute divisor
...
Also, only emit a divisor description if the divisor isn't 1.
2019-06-02 10:59:34 +02:00
Philip Rebohle
0d40c20aef
[dxvk] Compact vertex buffer bindings
...
This way, we can always update all vertex buffer bindings with one
single API call, without having to deal with any gaps in binding IDs.
The previous optimization triggers a bug in some drivers when no
vertex buffer is ever bound to a given binding point, and may also
trigger inefficient behaviour if the binding range is assumed to
be contiguous.
2019-05-08 03:37:49 +02:00
Philip Rebohle
d5b2c2fd23
[dxvk] Pass slot mapping to pipeline layout constructor
...
We're not getting the info from any other source anyway.
2019-05-07 20:36:18 +02:00
Philip Rebohle
37f1087783
[dxvk] Add API for specialization constants
2019-05-06 03:15:45 +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
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
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
5714f18d15
[dxvk] Use new specialization constant code for graphics pipelines
2019-05-01 01:57:34 +02:00
Liam Middlebrook
9d26031dcb
[dxvk] Zero-Initialize SpecConstantData
...
Ensure that specialization constant data passed into the driver is
zero-initialized.
Having the pData field in VkSpecializationInfo be zero-initialized helps
to create more deterministic input to the driver, which is particularly
useful when debugging shader issues.
2019-04-03 23:21:12 +02:00
Philip Rebohle
cd93ba570e
[dxvk] Simplify DxvkShaderModule
...
This is merely a wrapper for a VkShaderModule now, so it really
doesn't need anything fancy and definitely doesn't need to be
heap-allocated.
2019-04-03 20:47:58 +02:00
Philip Rebohle
2bd09e52e7
[dxvk] Don't cache shader modules for graphics pipelines
...
We're only ever going to need those when actually compiling a new
pipeline, so on average we're just wasting large amounts of memory
by keeping them around.
Trades several hundred MB of memory for a small increase in compile
times. Creating shader modules is typically very cheap.
2019-04-03 20:01:36 +02:00
Philip Rebohle
70510bab9a
[dxvk] Introduce extra pipeline state
...
Provides extra state that will be passed in via spec constants.
Whether or not this state is used is determined by the shaders.
2019-04-01 02:31:32 +02:00
Chip Davis
7a37d88067
[dxvk] Log vertex attributes and buffers when logging pipeline state.
...
This was invaluable in diagnosing a missing feature from MoltenVK.
2019-03-27 21:59:03 +01:00
Philip Rebohle
b65520d627
[dxvk] Fix feature query for vertex attribute divisor
2019-02-20 11:47:15 +01:00
Philip Rebohle
9159401b14
[dxvk] Use depthClipEnable during graphics pipeline creation
...
Fall back to previous behaviour if the feature is not available.
2019-02-19 14:22:36 +01:00
Philip Rebohle
0d84ebd4c9
[dxvk] DepthClampEnable -> DepthClipEnable
...
There are subtle differences between the two that we
should deal with in the backend at some point.
2019-01-17 01:59:10 +01:00
Philip Rebohle
422198952a
[dxvk] Use minimal set of dynamic state
...
We don't need to enable blend constants for pipelines that don't
have blending enabled, etc. This helps reduce the number of API
calls slightly and may help the driver work more efficiently.
2019-01-16 20:55:41 +01:00
Philip Rebohle
9572425912
[dxvk] Clear color write mask if fragment shader output is undefined
...
Fallout 76 writes undefined data to one specific render target
otherwise. Refs #779 .
2018-12-07 13:43:27 +01:00
Philip Rebohle
dbd7db3328
[dxvk] Fix typo around dual-src blending
...
Fixes e74411704277009169a31f0bc34951b9f67be9c2
2018-11-20 19:55:08 +01:00
Philip Rebohle
e744117042
[dxvk] Patch fragment shader for dual-source blending
2018-11-19 17:07:05 +01:00
Philip Rebohle
e15e693dc4
[dxvk] Spill render pass for pipelines that use vertex stage UAVs
...
We cannot use simple pipeline barriers in this case because of the
extremely strict restrictions surrounding self-dependencies.
2018-10-30 14:43:52 +01:00
Philip Rebohle
9decfb34b7
[dxvk] Determine whether a graphics pipeline writes to resources
...
- Fix missing test for storage texel buffers
2018-10-29 12:12:34 +01:00
Philip Rebohle
ec8559f40a
[dxvk] Remove unneeded atomic that holds base pipeline handles
...
No longer needed because the full pipeline object gets locked anyway.
2018-10-29 12:11:33 +01:00
Philip Rebohle
a27e440272
[dxvk] Detect Xfb and set rasterized stream index
2018-10-10 13:05:37 +02:00
Philip Rebohle
eff81c7edf
[dxvk] Implement getShader method for graphics pipelines
2018-10-10 10:28:12 +02:00
Philip Rebohle
8bcd47d6dc
[dxvk] Simplify pipeline object locking
...
Any more complex approach is not very useful at the moment
because we have to put a lock around the actual compile
function anyway.
2018-09-25 18:22:58 +02:00
Philip Rebohle
a950872c7c
[dxvk] Check whether the vertex binding / attribute count is valid
2018-09-24 16:22:12 +02:00
Philip Rebohle
4a72cae1e6
[dxvk] Enable state cache
2018-09-23 14:41:43 +02:00
Philip Rebohle
d6742e38c5
[dxvk] Lock pipeline object while compiling one pipeline
...
This prevents us from compiling the exact same pipeline twice
at the same time, which for some reason crashes RADV.
2018-09-22 12:04:06 +02:00
Philip Rebohle
83447975ac
[dxvk] Refactor pipeline stat counters
...
The stat counter struct no longer has to be passed to
the pipeline compiler function.
The new implementation uses atomic counters of the pipeline manager
rather than per-command list counters, which removes the need to
pass the counter structure to the compiler function.
2018-09-22 12:02:20 +02:00
Philip Rebohle
5410680401
[dxvk] Refactor pipeline object constructors
...
This way we don't need to pass everything to the pipeline objects.
2018-09-22 11:59:25 +02:00
Philip Rebohle
482930f04a
[dxvk] Implement backend support for D3D11 forced sample count
...
We don't support rasterization with a sample count different from
the framebuffer sample count, but if there are no attachments, any
sample count is allowed.
2018-09-18 13:22:28 +02:00
Philip Rebohle
f42f708f72
[dxvk] Rename DxvkBindingState -> DxvkBindingMask
...
Preparation for some more binding-related work.
2018-09-17 10:45:28 +02:00
Philip Rebohle
c8e0c253ba
[dxvk] Simplify graphics pipeline instance management
2018-09-16 10:07:45 +02:00
Philip Rebohle
364e15d11a
[dxvk] Remove all remaining pipecompiler code
2018-09-14 17:22:56 +02:00
Philip Rebohle
18927dc958
[dxvk] Remove asynchronous pipeline compiler
2018-09-14 16:46:07 +02:00
Philip Rebohle
5c89a68879
[dxvk] Implement render target state tracking for async compilation
...
This ensures that we always render to targets which are only used once.
2018-09-10 19:41:17 +02:00
Philip Rebohle
c3b542878c
[dxvk] Repurpose asynchronous pipeline compiler
...
Removes support for DISABLE_OPTIMIZATION_BIT. Instead, pipelines
will not be made available until compiled by one of the worker
threads.
2018-09-10 17:02:42 +02:00
Philip Rebohle
cb274e040d
[dxvk] Add spec constants for pixel shader output mapping
2018-09-01 17:59:50 +02:00
Philip Rebohle
37a8743dbc
[dxvk] Add output component mask state to graphics pipelines
...
This is required in order to implement swizzled render target views.
We currently use this to remap color write masks as needed.
2018-09-01 17:59:50 +02:00
Philip Rebohle
18b39d8239
[dxvk] Fix base pipeline assignment when compipling new pipelines
...
We might otherwise end up destroying our base pipeline.
2018-08-10 23:29:45 +02:00
Philip Rebohle
656cb2e4aa
[dxvk] Refactor Vulkan extension management
...
Adding an extension will now require an additional step, but
this evolved version of the extension list code is more sane
and the structures can be more easily copied around.
2018-07-23 20:07:21 +02:00