Philip Rebohle
1127a344dc
[dxvk] Fix query type enablement in query manager
...
We cannot use query types as flag indices, since query
types added in the future may have gretaer enum values
than 32.
2018-09-11 13:01:00 +02:00
Philip Rebohle
ea6b6e2e53
[dxvk] Rename useAsyncPipeCompiler -> asyncPipeCompiler
2018-09-11 08:38:18 +02:00
Philip Rebohle
ea9e812798
[dxvk] Introduce new 'Created' state for queries
...
New initial state for queries. D3D11 returns an error when trying to
retrieve data from a query in this state, rather than S_FALSE or S_OK.
2018-09-10 23:07:51 +02:00
Philip Rebohle
d7441f274b
[dxvk] Enable device features for VK_EXT_vertex_attribute_divisor
2018-09-10 22:10:16 +02:00
Philip Rebohle
ba65a1e36b
[dxvk] Query new Vertex Attribute Divisor features
...
This was added in revision 3 of the extension.
2018-09-10 21:46:14 +02:00
Philip Rebohle
f5270c8522
[dxvk] Collect info about the supported revisions of an extension
2018-09-10 21:40:40 +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
f94f5a74ba
[dxvk] Add methods to track render target view usage
2018-09-10 18:05:52 +02:00
Philip Rebohle
c7ddaea5a6
[dxvk] Add method to retrieve current frame number
2018-09-10 18:05:33 +02:00
Philip Rebohle
5cc2c219dd
[dxvk] Use all but two available threads for async pipeline compilation
2018-09-10 17:03:11 +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
b7d8be25f1
[dxgi] Use DXGI back buffer count for the Vulkan swap chain
2018-09-09 19:07:41 +02:00
Philip Rebohle
45f61cbae5
[dxvk] Fix initial query state
...
Trying to retrieve data from newly created D3D11 queries is supposed
to return S_FALSE and not return data, so we shouldn't mark the query
as available immediately after creation.
2018-09-09 14:35:09 +02:00
Philip Rebohle
2533b9f4ed
[dxvk] Fix layer count for 2D views into 3D images
2018-09-04 07:38:47 +02:00
Philip Rebohle
2b3d9aaf5c
[dxvk] Remap spec constant ranges
...
Keeping the numbers low will make debugging shaders easier.
glslang seems to have an upper limit on spec constant IDs
in place.
2018-09-01 20:41:25 +02:00
Philip Rebohle
825200b2a2
[dxvk] Don't change spec constant IDs that are no valid resource slots
...
Fixes pipeline state-related specialization constants.
2018-09-01 20:27:36 +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
7c97e276f2
[dxvk] Fix up component swizzle for render target views
...
Vulkan does not support non-identity swizzles for image views that are
used for rendering, but we have to keep the information around in order
to support rendering to swizzled image formats.
2018-09-01 15:51:56 +02:00
Philip Rebohle
2f90213c0f
[dxvk] Enable pipeline statistics queries around compute shaders
...
Fixes potential issues caused by csInvocations being 0.
2018-08-31 16:24:03 +02:00
Philip Rebohle
657093c14e
[dxvk] Refactor query management
...
Moved all query-related state tracking and management into a
separate class. This allows for new query types to be added
in the future, and makes less dodgy assumptions about the
current state when beginning or ending a query.
2018-08-31 15:38:09 +02:00
Philip Rebohle
f1b075c0f3
[dxvk] Add CS chunk pool
...
Reduces the number of dynamic memory allocations for CS chunks by
recycling them once they are no longer needed. Also fixes a potential
issue with chunks that are dispatched multiple times.
2018-08-27 16:07:38 +02:00
Philip Rebohle
b75b7d0999
[dxvk] Simplify discardBuffer access flags
...
Specifying both read and write access is unnecessary, as the dirty
check will always return true for writes when it would also return
true for reads.
2018-08-27 14:50:47 +02:00
Philip Rebohle
34152a01a5
[dxvk] Add device filter
...
When setting DXVK_FILTER_DEVICE_NAME, only devices with a
matching device name will be reported to the application.
2018-08-27 14:22:14 +02:00
Philip Rebohle
08a9963734
[dxvk] Fix clear compute shaders for 2D array views
...
The Z component is not part of the image extent. Fixes #598 .
2018-08-26 20:08:16 +02:00
jacekcw
2ff614b241
[build] Use native Vulkan ABI for winelib builds ( #520 )
...
Allows 32-bit winelib builds to run.
2018-08-17 19:55:37 +02:00
Philip Rebohle
f4b2c52816
[dxvk] Support render target views in ClearImageView
...
This way, we'll have two separate code paths, one for
storage images and one for render targets. We'll need
this for the implementation of ClearView.
2018-08-15 19:03:26 +02:00
Philip Rebohle
beedd39f7d
[dxvk] Accept VkClearValue in DxvkContext::clearImageView
2018-08-15 19:03:26 +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
fb9b520f60
[util] Move getAppConfig and getUserConfig to Config class
...
Fixes linker errors with winelib builds.
2018-08-07 16:59:49 +02:00
Philip Rebohle
b2c4855490
[dxvk] Use global user config for backend options
2018-08-07 16:59:49 +02:00
Philip Rebohle
c0398caa2b
[dxvk] Load user config as well as per-app options in DxvkInstance
2018-08-07 14:59:09 +02:00
Philip Rebohle
fe66e668e5
[dxvk] Implement native discardBuffer function in the backend
...
This may be more efficient because it avoids renaming the buffer
in case it can be used without inserting additional barriers.
2018-08-03 11:28:00 +02:00
Philip Rebohle
ffede83d9e
[dxvk] Remove unnecessary barrier recording before compute dispatch
...
This call is not needed any longer because we have compute init barriers.
Might allow for parallel compute shader dispatch in some situations.
2018-08-01 09:14:39 +02:00
Philip Rebohle
0ba00b3f59
[dxvk] Add extended device feature structure
...
This allows the client API to query and enable extended
features in the future, should it become necessary, much
like the extende feature queries.
2018-07-31 16:58:25 +02:00
Philip Rebohle
ebb7902b2c
[dxvk] Add extended device info structure
...
This uses VK_KHR_get_physical_device_properties2
to query extension-specific device properties.
Queries info for VK_EXT_vertex_attribute_divisor.
2018-07-31 16:03:44 +02:00
Philip Rebohle
bf06654a83
[d3d11] Remove DXVK_SHADER_READ_PATH
...
Broken, and won't work with ICB UBOs.
2018-07-30 20:29:05 +02:00
Philip Rebohle
c31e646921
[dxvk] Introduce concept of shader constants
...
Large constant arrays should be moved to a uniform buffer instead
of being baked directly into the shader code.
2018-07-30 20:29:05 +02:00
Philip Rebohle
a8eb7d343a
[dxvk] Reconfigure bindings
...
In order to map ICBs to uniform buffers, we need one spare constant
buffer slot per shader stage.
2018-07-30 20:29:05 +02:00
Jacek Caban
b7bdd9de38
[dxvk] Include vector inheaders that use it.
...
Fixes winelib compilation after recent changes.
2018-07-28 15:09:31 +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
Philip Rebohle
6d24f767c6
[dxvk] Load function pointers for VK_KHR_get_physical_device_properties2
2018-07-23 18:09:50 +02:00
Philip Rebohle
5fe4c4f610
[dxvk] Use VkImageViewUsageCreateInfoKHR when creating image views
...
Must be used when view formats are used that do not support all
usage bits of the underlying image. Refs #504 .
2018-07-21 10:58:06 +02:00
Philip Rebohle
8ffe545b38
Revert "[dxvk] Bump maximum number of command buffers in flight to 16"
...
This reverts commit d744a3cd69403c3d3b292c65ba423f0f0f6e15ba.
Reportely has an unexpected negative impact on frame times in
The Witcher 3 and potentially other games on some setups.
2018-07-20 15:56:07 +02:00
Philip Rebohle
de920458d7
[dxvk] Make DxvkEvent lock-free
...
Reduces locking overhead and potential stuttering
issues when an app is spinning on the event.
2018-07-20 15:48:09 +02:00
Philip Rebohle
d744a3cd69
[dxvk] Bump maximum number of command buffers in flight to 16
2018-07-20 11:42:42 +02:00
Philip Rebohle
0fd8019a70
[dxvk] Add DxvkEvent::wait method
2018-07-20 11:39:24 +02:00
Philip Rebohle
336b3858c9
[dxvk] Relax VK_EXT_vertex_attribute_divisor requirement
...
Nvidia 396.45 still does not support this. Nvidia, please, we need it.
2018-07-19 23:10:12 +02:00
Philip Rebohle
19f74a89cd
[dxvk] Optimize buffer renaming
...
Small reduction in CPU overhead by using spinlocks instead of
a full mutex for the two buffer free lists.
2018-07-19 09:44:58 +02:00
Jacek Caban
6d16bb4c87
Don't use std::thread.
...
Wine needs to setup each thread that has an access to Windows APIs. It means that in winelib builds, we can't let standard C++ library create threads and need to use Wine for that instead. I wrote a thin wrapper around Windows thread functions so that the rest of code just has to use new dxvk::thread class instead of std::thread.
2018-07-19 08:55:34 +02:00