1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 10:24:12 +01:00
Commit Graph

884 Commits

Author SHA1 Message Date
Philip Rebohle
abb90086d5
[dxvk] Use analyzer to determine UAV image type 2018-03-23 01:04:04 +01:00
Philip Rebohle
44d8d6b8c3
[dxvk] Fixed command buffer synchronization 2018-03-22 20:15:46 +01:00
Philip Rebohle
16caa10697
[dxbc] Add analyzer stub
Will be used to gather information for the compiler.
2018-03-22 20:01:57 +01:00
Philip Rebohle
085fd6a959
[d3d11] Remove unnecessary Map() check 2018-03-22 19:28:00 +01:00
Philip Rebohle
2566909917
[dxvk] Remove DxvkFence 2018-03-22 19:01:01 +01:00
Philip Rebohle
0bdae4f930
[dxvk] Move fence object into DxvkCommandList
Reduces command submission overhead by reusing fence objects
instead of creating new ones for each submission. Improves
error reporting in case the submission cannot be complete.
2018-03-22 18:57:33 +01:00
Philip Rebohle
d9b1995cf0
[d3d11] Do not forward D3D11_MAP_FLAG_DO_NOT_WAIT for mapped images
Workaround for a regression in The Witcher 3 that was introduced
in commit 53d557c2db. May have a
significant negative impact on performance in some games.
2018-03-22 14:12:43 +01:00
Philip Rebohle
b3aff7cd2e
[d3d11] Fix immediate context initialization
The old initialization code did not take either CSMT or
Deferred Contexts into account and could lead to illegal
calls to beginRecording.

Fixes a hang encountered in Dishonored 2.
2018-03-22 13:40:45 +01:00
Philip Rebohle
7f6c8dff95
[d3d11] Fix flush condition and CS thread synchronization
If chunks have been sent to the CS thread, we need to
flush even if the current chunk is empty.
2018-03-22 12:58:26 +01:00
Philip Rebohle
5eedbc0546
[dxgi] Always use 32-bit depth buffers instead of 24-bit
Support for 24-bit depth buffers seems poor even on GPUs which support
them, and there seem to be no issues with using 32-bit buffers in practice.
2018-03-22 11:09:23 +01:00
Philip Rebohle
53d557c2db
[d3d11] Implement D3D11_MAP_FLAG_DO_NOT_WAIT
Improves framerate in Dishonored 2 by up to 50%.
2018-03-22 11:02:14 +01:00
Philip Rebohle
9215cfdcf2
[dxvk] Minor 2018-03-22 11:01:54 +01: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
Philip Rebohle
6f6e12a329
[util] Fix possible crash with null interfaces in private storage 2018-03-21 15:09:08 +01:00
Philip Rebohle
9ef94e28ac
[dxbc] Support UNorm/SNorm typed resources 2018-03-21 15:08:53 +01:00
Philip Rebohle
08806070ca
[d3d11] Fix CheckFeatureSupport return value 2018-03-21 15:08:34 +01:00
Philip Rebohle
efcd5c6b4d
[d3d11] Implement support for D3D11_FEATURE_FORMAT_SUPPORT2 2018-03-21 13:31:22 +01:00
Philip Rebohle
09151f3616
[d3d11] Lift shaderStorageImageReadWithoutFormat requirement 2018-03-21 12:57:29 +01:00
Philip Rebohle
584ee6b6f0
[dxbc] Lift ShaderStorageImageReadWithoutFormat requirement 2018-03-21 12:47:53 +01:00
Philip Rebohle
fcff10aae7
[dxbc] Set image format for UAVs when atomic operations are used
Fixes a violation of the Vulkan specification where atomic operations
would be used on storage images with SpvImageFormatUnknown. Should fix
driver crashes on Nvidia.

TODO: Fix data types for atomic operation instructions.
2018-03-21 12:11:18 +01:00
Philip Rebohle
c1a1ff3915
[d3d11] Implement remaining D3D11.1 feature queries 2018-03-21 04:58:31 +01:00
Philip Rebohle
17e981f360
[dxvk] Increase UAV slot count to 64 for the graphics pipeline
D3D11 raised this limit from 8 UAVs in the fragment shader to
64 UAVs in all graphics stages combined.
2018-03-21 04:56:33 +01:00
Philip Rebohle
bd71f256e5
[d3d11] Fixed constant buffer binding update 2018-03-21 03:26:31 +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
6550e8d623
[d3d11] Expose implemented Feature Level 11.1 features 2018-03-20 23:25:23 +01:00
Philip Rebohle
894444d43d
[dxvk] Remove old debug code 2018-03-20 22:36:02 +01:00
Philip Rebohle
42d49d7603
[dxvk] Respect bufferImageGranularity for non-linear images
May fix aliasing issues on GPUs where the bufferImageGranularity limit
is greater than the alignment requirement of non-linear resources.
2018-03-20 20:24:11 +01:00
Philip Rebohle
fd4e55007f
[d3d11] Export support for driver command lists
This indicates that our implementation of UpdateSubresource on
deferred contexts is not affected by the same issue as on Windows.
2018-03-19 17:57:20 +01:00
Philip Rebohle
493ad66d91
[d3d11] Remove obsolete acquire/release pair
This is no longer needed with the universally
thread-safe slice allocator.
2018-03-19 17:56:26 +01:00
Philip Rebohle
f762811af0
[dxvk] Use multiple free lists for physical buffer slices
Reduces lock contention and slightly improves performance in games
that rely heavily on the buffer renaming mechanism if the lock
protecting the original free list was contested.
2018-03-19 14:53:59 +01:00
Philip Rebohle
c6251d28fc
[d3d11] Remove warnings from CopySubresourceRegion1 / UpdateSubresource1
The flags should have no impact on correctness, so not supporting them
makes no difference. Prevents log spam in Dishonored 2.
2018-03-19 14:52:42 +01:00
Philip Rebohle
b33edcbb93
Merge pull request #183 from pchome/patch-1
[d3d11] Add missing <algorithms> header
2018-03-19 11:55:03 +01:00
pchome
2f8ccfa30e
[build] Add header required for std::find_if() 2018-03-19 12:49:48 +02:00
Philip Rebohle
f1c3b59e87
[d3d11] Implemented buffer mapping on deferred contexts
Allows the MultiThreadedRendering demo from the Microsoft SDK to run.
2018-03-19 03:19:13 +01:00
Philip Rebohle
0eaa3fea3b
[dxvk] Implement thread-safe buffer renaming
This is required for resource mapping on deferred contexts.
May also fix a potential synchronization issue where a buffer
could be mapped multiple times before the CS thread would mark
the physical buffer as used, which would result in invalid data.
2018-03-19 02:18:44 +01:00
Philip Rebohle
d6d6ed4efd
[d3d11] Expose Feature Level 11_1 if explicitly requested
Not enabled by default since some 11_1 functionality is not yet implemented.
2018-03-18 23:39:40 +01:00
Philip Rebohle
127fad89be
[d3d11] Refactored D3D11SamplerState creation 2018-03-18 23:35:40 +01:00
Philip Rebohle
b04e9b5f18
[d3d11] Refactored D3D11DepthStencilState creation 2018-03-18 23:32:01 +01:00
Philip Rebohle
11d8eb3be4
[d3d11] Implemented D3D11BlendState1 2018-03-18 23:27:29 +01:00
Philip Rebohle
2591bbdabd
[d3d11] Implemented ID3D11RasterizerState1 stub 2018-03-18 22:53:20 +01:00
Philip Rebohle
0a473b4f86
[d3d11] Return error if an application creates an RTV for a buffer
Vulkan does not support buffer RTVs, and neither does DXVK, so we
should return an error in that case. Previously, DXVK would crash
upon querying image information.
2018-03-18 21:38:48 +01:00
Philip Rebohle
69dd05b269
[dxgi] Fix back buffer destruction
The back buffer needs to be deleted explicitly because on
the way it is created. Fixes reference counting issues in
applications which resize the back buffer at least once.
2018-03-18 20:39:14 +01:00
Philip Rebohle
e009e63aa7
[d3d11] Fix sampler state refcount issue
We cannot use strong references in state objects that
are stored inside a member of the device itself.
2018-03-18 14:57:14 +01:00
Philip Rebohle
2346a2ac03
[d3d11] Remove inconsistent uses of "this" 2018-03-18 12:57:39 +01:00
Philip Rebohle
c43702e445
[d3d11] Implement GetConstantBuffers1 methods 2018-03-18 12:45:27 +01:00
Philip Rebohle
e54246d000
[d3d11] Implement SetConstantBuffers1 methods 2018-03-18 12:39:11 +01:00
Philip Rebohle
3133e4ba35
[d3d11] Add constant buffer offsets and counts to context state 2018-03-18 12:36:45 +01:00
Philip Rebohle
a8eecfbfe5
[d3d11] Enable direct image mapping by default 2018-03-18 00:36:53 +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