notaz
5eefb8530d
[general] More wine test suite fixes ( #220 )
...
* [dxgi] Implement freeing private data
Done by passing null as data.
Fixes wine private data test crash and passes them.
* [dxgi] Improve private data argument handling
Fixes 7 more wine tests.
2018-03-29 07:11:21 +02:00
Philip Rebohle
ae88f83b86
[d3d11] Introduce D3D11DeviceContainer
...
Refactored DxgiVkDevice, D3D11Device and D3D11Presenter
to behave more like aggregable objects, where the new
D3D11DeviceContainer class is the COM aggregate object.
Fixes the reference counting issue outlined in #210 .
2018-03-28 21:24:52 +02:00
Philip Rebohle
8d3dcba8d5
[dxgi] Renamed private DXGI interfaces
2018-03-28 19:06:00 +02:00
Philip Rebohle
410cde3f17
[dxgi] Move device creation to DxgiAdapter
...
This is better than exporting new functions.
2018-03-28 18:58:53 +02:00
Philip Rebohle
6babc22ec0
[dxgi] Reset pointers before returning an error
...
Also fixes a refcount issue and minor code formatting issues.
2018-03-28 11:56:58 +02:00
Philip Rebohle
87f9bcfd75
[dxbc] Do not use locations >32 for tess control outputs
...
Fixes an assertion with latest mesa-git.
2018-03-28 11:55:29 +02:00
Philip Rebohle
1a8567a363
[d3d11] Fixed silly bug in blend state comparison
2018-03-28 11:55:03 +02:00
Philip Rebohle
057d74e57f
Merge branch 'master' of https://github.com/doitsujin/dxvk
2018-03-27 02:02:50 +02:00
notaz
5411689789
[dxgi] More argument handling improvements ( #211 )
...
Fixes 11 tests + a crash.
2018-03-27 01:58:33 +02:00
Philip Rebohle
a700e928ef
[dxbc] Enable MultiViewport capability if needed
...
Fixes invalid SPIR-V generated since 60d6416e5f
.
2018-03-27 01:41:06 +02:00
Philip Rebohle
60d6416e5f
[dxbc] Implemnted SV_ViewportArrayIndex for geometry shaders
...
Required by Final Fantasy XIV.
2018-03-26 23:32:30 +02:00
Philip Rebohle
fc47fb8f6c
[dxvk] Do not create descriptor set layout/template if binding count is 0
...
Fixes a validation error in case an application renders geometry without
any active shader resource slots.
2018-03-26 23:13:33 +02:00
notaz
f02b44f440
[dxgi] Fix some argument checks ( #205 )
...
Changed according to wine's tests.
2018-03-26 07:38:37 +02:00
Philip Rebohle
675b1c5b8c
[d3d11] Implemented image mapping on deferred contexts
...
Also refactored buffer mapping to reduce code duplication.
Optimized the lookup function for a small performance gain
in games which map a lot of resources on deferred contexts.
2018-03-25 13:24:03 +02:00
Philip Rebohle
61c55d6f89
[d3d11] Get rid of redundant format query
2018-03-25 08:38:31 +02:00
Philip Rebohle
4e84a77896
[d3d11] Disable DO_NOT_WAIT flag by default
...
Apparently this breaks Elder Scrolls Online as well, so we'll
just enable it explicitly for games which benefit from this
optimization and disable it by default.
2018-03-25 00:54:42 +01:00
Philip Rebohle
4ed007e9f6
[d3d11] Add <unordered_map> include
...
Fixes #201 .
2018-03-24 18:54:00 +01:00
Philip Rebohle
0900e1b5f9
[d3d11] Added missing files
2018-03-24 17:29:13 +01:00
Philip Rebohle
bd69e843c2
[d3d11] Added D3D11Options
...
Includes a per-app knob for Witcher 3 to disable D3D11_MAP_FLAG_DO_NOT_WAIT.
2018-03-24 17:02:24 +01:00
Philip Rebohle
ac94c42380
Revert "[dxbc] Do not emit per-vertex input block"
...
This reverts commit 4ce64bd886
.
Fixes a regression in Sniper: Ghost Warrior 2 and Dishonored 2.
2018-03-24 16:23:31 +01:00
Philip Rebohle
54382ae319
[dxbc] Add experimental support for mixed resource types
...
HLSL tbuffers are translated to resources with a "mixed" format.
There is no documentation about which format the buffers actually
use, so we'll default to UINT and see what happens.
2018-03-24 14:21:13 +01:00
Philip Rebohle
19e0829a37
[dxgi] Enumerate scaled and centered display modes correctly
...
Fixes fullscreen mode in Dark Souls 3.
2018-03-24 13:42:23 +01:00
Philip Rebohle
87d6fde5c4
[dxgi] FindClosestMatchingMode: Fall back to 8-bit SRGB format
...
Fixes errors in various games which rely on this method.
2018-03-24 11:31:39 +01:00
Philip Rebohle
7f7eedac35
[dxbc] Implement SV_ClipDistance and SV_CullDistance
2018-03-24 11:29:07 +01:00
Philip Rebohle
4ce64bd886
[dxbc] Do not emit per-vertex input block
...
Instead, we can let the normal input registers do their thing.
2018-03-24 00:32:22 +01:00
Philip Rebohle
0ab27aa4e3
[dxbc] Check if the signature is nullptr before using it
...
Fixes a crash in The Witcher 3.
2018-03-23 21:38:21 +01:00
Philip Rebohle
31772af4a5
[dxbc] Count clipping and culling planes
2018-03-23 19:48:07 +01:00
Philip Rebohle
ba9e1f307d
[dxbc] Don't use rvalue references for file streams
2018-03-23 18:17:16 +01:00
Philip Rebohle
0a2fa590f5
[d3d11] Reset busy flag after emitting the Flush command
...
Fixes a general performance regression in games
that call WaitForResources a lot.
2018-03-23 11:54:19 +01:00
Philip Rebohle
e6d93d6cfb
[spirv] Emit image types only once
...
Fixes SPIR-V validation errors.
2018-03-23 01:10:12 +01:00
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
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
Philip Rebohle
0f800c6c51
[dxvk] Added Vulkan function pointers for VK_KHR_descriptor_update_template
2018-03-17 22:35:50 +01:00
Philip Rebohle
ebd46e4109
[d3d11] Re-define D3D11_FEATURE_DATA_ARCHITECTURE_INFO
...
Fixes previous commit on MinGW.
2018-03-17 21:38:35 +01:00
Mikhail Paulyshka
043982d3be
[d3d11] stub implementation of ID3D11Device1 ( #175 )
2018-03-17 20:11:00 +01:00
Mikhail Paulyshka
a3e7139c1e
[d3d11] stub implementation of ID3DDeviceContext1 ( #174 )
2018-03-17 18:54:09 +01:00
Philip Rebohle
52a9a4f406
[dxvk] Reimplemented clearRenderTarget
...
Closer to the D3D11 API. We cannot use the normal clearColorImage and
clearDepthStencilImage methods in case the game uses a 2D array view
for a 3D image. Fixes some validation issues in Hellblade.
2018-03-17 17:59:43 +01:00
Philip Rebohle
1af52abb67
[d3d11] Move OMSetRenderTargets optimization to D3D11ImmediateContext
...
We cannot call Flush() on deferred contexts anyway, so the command
submission optimization should only be applied to immediate contexts.
2018-03-17 14:09:16 +01:00
Philip Rebohle
ccfe1a346b
[d3d11] Moved GetViewFromDesc and NormalizeDesc out of D3D11Devuce
2018-03-17 13:42:37 +01:00
Philip Rebohle
0ddbb58ce4
[d3d11] Enable IDXGIDevice2 interface query
2018-03-17 13:05:55 +01:00
Philip Rebohle
3b43c1c183
[dxgi] Support more formats in the presenter
...
Should surpress "Unsupported format" warnings in games
based on Unreal Engine 4 and Frostbite Engine.
2018-03-17 09:20:06 +01:00
Mikhail Paulyshka
608cd33a25
[dxgi] added stub implementation of IDXGIDevice2 ( #172 )
2018-03-17 01:48:55 +01:00
Philip Rebohle
b9b74eb961
Merge pull request #169 from Mixaill/fix-msvc-64
...
[dxbc] fix MSVC 64-bit build
2018-03-17 01:05:04 +01:00
Guy1524
b3cd7547ca
Move Custom PCI ID to DXGI
2018-03-16 19:40:26 -04:00
Mikhail Paulyshka
fd633ea784
[dxbc] fix MSVC 64-bit build
2018-03-17 01:59:13 +03:00
Philip Rebohle
c931b4ba87
[dxvk] Implement proper compute pipeline lookup
...
Fixes correctness issues and potential GPU lockups in case
a compute shader resource is not bound at dispatch time.
2018-03-16 01:25:18 +01:00
Philip Rebohle
9b3908823a
[dxvk] Fixed depth image layout regression
2018-03-16 01:05:30 +01:00
Philip Rebohle
eb8ae5cc82
[d3d11] Allow 2D array view creation for 3D textures
...
Fixes a regression that was introduced with the texture
class refactor. Fixes validation issues in Hellblade.
2018-03-14 20:40:11 +01:00
Philip Rebohle
0e0ee61d9b
[d3d11] Always use VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT
...
We need to investigate why not doing this breaks shadows in Heaven.
2018-03-14 17:40:26 +01:00
Philip Rebohle
3b20c71894
[d3d11] Re-implement direct image mapping (disabled by default)
...
We cannot enable this by default yet because it may break some games.
2018-03-14 16:40:28 +01:00
Philip Rebohle
155bd32e22
[d3d11] Check if a textue can be created before making the attempt
...
This may prevent driver crashes and give more useful debugging info
in case a given combination of image parameters is not supported by
a device. May also improve compatibility with direct image mapping.
2018-03-14 16:03:48 +01:00
Philip Rebohle
7a6d61d943
[d3d11] Create mapped image buffer only when needed
...
Also adds some documentation to D3D11CommonTexture.
2018-03-14 14:49:45 +01:00
Philip Rebohle
0ba3337289
[d3d11] Refactored Map/Unmap methods
2018-03-14 14:40:09 +01:00
Philip Rebohle
91b82c05b2
[d3d11] Refactoring texture classes: Move static methods into D3D11CommonTexture
2018-03-14 01:16:31 +01:00
Philip Rebohle
56df0bcccb
[d3d11] Refactoring texture classes: Remove D3D11TextureInfo
2018-03-14 00:45:07 +01:00
Philip Rebohle
16d66c8a1d
[d3d11] Refactoring texture classes: Introduce D3D11CommonTexture
2018-03-13 23:51:30 +01:00
Philip Rebohle
e6814332e7
Revert "[d3d11] Re-enable image mapping"
...
Still breaks games for unknown reasons.
2018-03-13 17:40:12 +01:00
Philip Rebohle
ba2c4782b0
[spirv] Removed SPIR-V Tools headers
2018-03-13 14:58:17 +01:00
Philip Rebohle
25cae39cdb
[spirv] Remove SPIR-V tools integration
...
SPIR-V tools did not turn out to be useful, but increased the
binary size by a significant amount and caused build problems.
- spirv-opt: Far too slow for the intended purpose, and Nvidia
specific shader issues have been reported and fixed.
- spirv-val: Not much value in practice since shaders can be
written to a directory and validated manually.
2018-03-13 14:32:03 +01:00
Philip Rebohle
8e9d0878e6
[dxvk] Remove RenderDoc workaround
...
RenderDoc 1.0 cannot be used with DXVK anymore,
which makes the workaround obsolete.
2018-03-13 11:43:23 +01:00
Philip Rebohle
72f954088b
[d3d11] Use only one mip level for multisampled textures
2018-03-13 11:29:25 +01:00
Philip Rebohle
06cff50453
[d3d11] Flush CS chunks when executing/finalizing command lists
...
Fixes rendering issues and validation errors in Kingdom Come: Deliverance.
2018-03-12 23:36:55 +01:00
Mikhail Paulyshka
fa78259459
[dxgi] fix DxgiOutput::FindClosestMatchingMode() implementation ( #157 )
...
* remove useless checks
* fix refresh rate matching and unspecified detection
2018-03-12 22:28:34 +01:00
Mikhail Paulyshka
d3a4230acf
[d3d11] D3D11Device::QueryInterface() suppress warning for d56e2a4c-5127-8437-658a-98c5bb789498
...
there is no public information about this interface
2018-03-12 23:29:44 +03:00
Philip Rebohle
887e514442
[dxvk] Use dummy viewport if requested viewport size is 0
...
Fixes a bunch of validation errors in various games,
including The Witcher 3.
2018-03-12 13:14:27 +01:00
Philip Rebohle
56c826be85
[d3d11] Do not enable D3D11_BIND_UNORDERED_ACCESS for back buffers
...
Not all formats can be used for unordered access views. An application
must explicitly request this feature during swap chain creation.
2018-03-12 13:03:33 +01:00
Philip Rebohle
3e60c8f316
[d3d11] Re-enable image mapping
...
After more extensive testing, it looks like commit 4eacff21
actually fixed the issue in most (all?) cases.
2018-03-12 12:54:05 +01:00
Philip Rebohle
3d0aad705d
[dxbc] Implemented samplepos instruction
...
Required by Fallout 4, among other games.
2018-03-12 12:25:10 +01:00
Mikhail Paulyshka
b17568deba
[dxgi,d3d11] log unknown interfaces GUID ( #154 )
...
* [d3d11] log unknown interfaces GUID in QueryInterface()
* [dxgi] log unknown interfaces GUID in QueryInterface()
2018-03-12 12:05:43 +01:00
Mikhail Paulyshka
3cb3c05888
[dxgi] implement DxgiOutput::FindClosestMatchingMode() ( #153 )
...
rev2:
* use std::vector instead of C array
* add clarification about TODO
2018-03-12 08:52:32 +01:00
Mikhail Paulyshka
f94ff7db4f
[d3d11] add check for pResource against nullptr in D3D11ImmediateContext::Map()
2018-03-12 03:18:44 +03:00
Philip Rebohle
4eacff21e9
[dxvk] Flush initialization context unconditionally
...
An application might need to wait for a resource to become available
just after it has been created, in which case its initialization
commands might not have been dispatched yet. If no rendering commands
were issued on the immediate context prior to the wait operation,
WaitForResource would stall indefinitely.
2018-03-11 20:25:09 +01:00
Philip Rebohle
bbbc552868
[d3d11] Disabled image mapping
...
Effectively reverts d3e89b20dd
as it
breaks games for some reason.
2018-03-11 19:02:02 +01:00
Philip Rebohle
5b9e4c1faa
[d3d11] Fix image tiling
...
Fixes bug introduced in d3e89b20dd
, which
applies linear tiling to the wrong kind of images.
2018-03-11 00:06:44 +01:00
Philip Rebohle
d3e89b20dd
[d3d11] Allocate host-readable images on host-visible memory
...
Not having to wait for an image->buffer copy to finish on the
GPU allows for more efficient synchronization. Significantly
improves performance in The Witcher 3.
2018-03-10 23:32:15 +01:00
Philip Rebohle
a4a8e0d6c8
[dxvk] Add memory flag query to DxvkImage
2018-03-10 17:41:42 +01:00
Philip Rebohle
fb36b56891
[dxvk] Removed stat counters
2018-03-10 17:37:10 +01:00
Guy1524
1bad90ae96
Add Custom PCI Vendor and Device ID Support ( #137 )
...
* Add Custom PCI Vendor and Device ID Support
Allow the user to configure DXVK to use a custom PCI Vendor and Device ID, so that the program behaves the same on different cards.
* Remove AMD/NVIDIA/INTEL Shortcuts
* Remove extra semicolon
* Return DxvkGpuVendor to being an enum class
* Fixed hexadecimal output
2018-03-10 15:05:32 +01:00
Mikhail Paulyshka
3dad074fc4
[dxbc] implemented retc instructions ( #140 )
2018-03-10 15:04:58 +01:00
Philip Rebohle
28880d0fa8
[dxbc] Implemented DclHsMaxTessFactor
2018-03-10 15:02:27 +01:00
Philip Rebohle
afaa3b5a30
[d3d11] Fix minor code inconsistencies
2018-03-10 14:41:06 +01:00
Philip Rebohle
7069df6b1e
[d3d11] Reimplemented ClearState
...
Potentially increases the overhead of ClearState calls, but also correctly
resets the context state when deferred contexts are used.
2018-03-10 13:06:15 +01:00
Philip Rebohle
5cb6c968b5
[d3d11] Fix RestoreUnorderedAccessViews for pixel shaders
2018-03-10 12:47:45 +01:00
Philip Rebohle
ca53fe7925
[d3d11] Minor fixes
2018-03-10 12:11:17 +01:00
Philip Rebohle
969b35c80c
[d3d11] RestoreState: Restore DS/OM/RS state objects
2018-03-10 11:56:58 +01:00
Philip Rebohle
5befa3b745
[d3d11] RestoreState: Restore IA state
2018-03-10 11:44:27 +01:00
Philip Rebohle
c49a0b969b
[d3d11] RestoreState: Restore viewport state
2018-03-10 11:31:40 +01:00
Philip Rebohle
f15feef47f
[d3d11] RestoreState: Restore shader resource bindings
2018-03-10 11:30:32 +01:00
Philip Rebohle
5ef0f31c66
[dxvk/d3d11] Refactored resource binding
...
Slightly reduces overhead of D3D11 *SetShaderResources methods.
2018-03-10 11:16:52 +01:00
Philip Rebohle
b72f11a0bf
[d3d11] RestoreState: Restore vertex and index buffer bindings
2018-03-10 10:39:07 +01:00
Philip Rebohle
d1a2cff9ac
[d3d11] RestoreState: Restore framebuffer and shader bindings
2018-03-10 10:19:07 +01:00
Philip Rebohle
3efd437310
[dxbc] Fixed TGSM size with dcl_tgsm_raw
...
https://msdn.microsoft.com/en-us/library/windows/desktop/hh446929(v=vs.85).aspx
2018-03-09 22:01:19 +01:00
Philip Rebohle
b7a964e15e
[d3d11] Fix texture cube array view normalization
2018-03-09 17:24:36 +01:00
Philip Rebohle
3b42011c50
[d3d11] Implemented OMGetRenderTargetsAndUnorderedAccessViews and predication stub
2018-03-09 16:47:20 +01:00
Philip Rebohle
09fd7abde0
[d3d11] Fix potentially invalid value for anisotropic filtering
2018-03-09 15:24:28 +01:00
Philip Rebohle
220c3301cf
[dxvk] Tweaked command stream chunk sizes and submission
...
Improves overall frame rate and latency in situations where the
application's render thread cannot keep up with the CS thread.
Considerable frametime improvements in NieR:Automata and
slightly higher frame rates in The Witcher 3.
2018-03-09 12:31:35 +01:00
Philip Rebohle
8d443cb50d
[dxvk] Reduced overhead of depth image descriptor layout check
2018-03-09 12:30:39 +01:00
Philip Rebohle
e2314cfe58
[dxgi] Fixed R10G10B10A2 format mapping
...
Fixes lighting issues in The Witcher 3.
2018-03-08 16:23:44 +01:00
Philip Rebohle
c3cf65c015
[dxbc] Use signed int for component index in OpImageGather
...
Workaround for a bug in Nvidia's shader compiler, which currently
expects the component index to be signed rather than unsigned.
2018-03-08 07:50:37 +01:00
Philip Rebohle
85d28f7328
[d3d11] Implemented ClearUnorderedAccessViewUint for raw and structured buffers
2018-03-07 16:29:13 +01:00
Philip Rebohle
95e2c641e0
[d3d11] Partially implement SOSetTargets/SOGetTargets
...
This does not implement any stream output functionality yet,
but it allows games to set and query stream output buffers.
2018-03-07 15:32:19 +01:00
Philip Rebohle
360bf3ee4c
[dxvk] Recreate buffer views if necessary
...
Fixes broken animations and artifacts in The Witcher 3.
2018-03-07 13:54:28 +01:00
Philip Rebohle
ad017c2556
[dxvk] Implemented physical buffer view
2018-03-07 13:32:17 +01:00
Philip Rebohle
b494bb2ac1
[d3d11] Fixed potential sync issue in Map()
2018-03-07 10:37:27 +01:00
Philip Rebohle
7ac0d413ad
[dxbc] Use correct arrays for vicp/vocp in hull shaders
...
Fixes Heaven on RADV.
2018-03-07 09:52:24 +01:00
Philip Rebohle
6e981b91b6
[dxvk] Add adapter logging
2018-03-07 00:23:06 +01:00
Philip Rebohle
0fdde6a94e
[dxbc] Fix hull shader barrier issue
2018-03-07 00:22:40 +01:00
Philip Rebohle
b7a9c2c751
[dxbc] Implemented vicp for hull shaders
...
Allows Unigine Heaven to start with tessellation enabled.
2018-03-06 19:19:10 +01:00
Mikhail Paulyshka
9deb73a2a7
Add support for MSVC, attempt 3 ( #130 )
...
* [dxvk] fixes for MSVC
* nullptr -> int is illegal conversion for MSVC. nullptr was replaced with VK_NULL_HANDLE
* MSVC does not support source code strings longer than 65535 chars. String was replaced with array of chars.
* [utils] fixes for MSVC
* __mingw_uuidof() does not exists in MSVC
* apply GCC pragma only for GCC
* added missing header
* [dxbc] fixes for MSVC
*added missing header
* [dxgi] fixes for MSVC
* user __declspec(uuid()) instead of _mingw_uuidof()
* do not use DLLEXPORT macro for MSVC
* [d3d11] fixes for MSVC
* replace WINBOOL with BOOL
* do not declare D3D11 structs for MSVC
* do not use DLLEXPORT macro for MSVC
* [meson] fix build scripts for MSVC
* change cpp version from c++1z to c++latest for MSVC
* set -DOMINMAX definition for MSVC
* disable test and wine_utils for MSVC
* use .def files instead of __declspec(dllexport) for MSVC (bypass 'C2375: redefinition; different linkage' error)
* fix .def files for MinGW
* add --enable-stdcall-fixup linker flag for MinGW
2018-03-06 18:34:34 +01:00
Philip Rebohle
88c4e363e5
[dxbc] Implemented workaround for hull shader output synchronization
2018-03-06 18:29:20 +01:00
Philip Rebohle
4fed7521f7
[d3d11] Enabled tessellation shaders
...
Note that applications that require tessellation support
will not work as of yet.
2018-03-06 17:02:47 +01:00
Philip Rebohle
2271814d95
[dxbc] Implemented domain shader input variables
2018-03-06 16:47:35 +01:00
Philip Rebohle
ff0ff0c23b
[dxbc] Implemented hull shader passthrough
2018-03-06 15:52:29 +01:00
Philip Rebohle
d2ca721387
[dxbc] Reworked Hull Shader phase invocations
...
Instead of running individual phases sequentially, we can
run them in parallel if execution barriers are in place.
2018-03-06 15:05:58 +01:00
Philip Rebohle
87afb33228
[dxbc] Implemented Hull Shader output setup
2018-03-06 14:49:11 +01:00
Philip Rebohle
988aaa0161
[dxbc] Implemented Hull Shader output variables
2018-03-06 14:00:03 +01:00
Philip Rebohle
13331a463f
[d3d11] Re-implement check for mapping device-local images
2018-03-06 11:35:12 +01:00
Philip Rebohle
b2f5b262f7
[dxbc] Added support for the control point phase in Hull Shaders
2018-03-05 17:23:00 +01:00
Philip Rebohle
4688b2cc5a
[dxbc] Formatting fixes + Hull shader barriers
2018-03-05 16:14:46 +01:00
Philip Rebohle
96ca9fa6ea
[dxbc] Fixed tessellation factor enums
2018-03-05 15:02:17 +01:00
Philip Rebohle
1cbe6829eb
Revert "Add MSVC support ( #123 )"
...
This reverts commit c63d4361a0
.
2018-03-05 14:32:28 +01:00
Mikhail Paulyshka
c63d4361a0
Add MSVC support ( #123 )
...
* [utils] fixes for MSVC
* __mingw_uuidof() does not exists in MSVC
* apply GCC pragma only for GCC
* added missing header
* [dxvk] fixes for MSVC
* nullptr -> int is illegal conversion for MSVC. nullptr was replaced with VK_NULL_HANDLE
* MSVC does not support source code strings longer than 65535 chars. String was replaced with array of chars.
* [dxbc] fixes for MSVC
*added missing header
* [dxgi] fixes for MSVC
* user __declspec(uuid()) instead of _mingw_uuidof()
* [d3d11] fixes for MSVC
* replace WINBOOL with BOOL
* do not declare D3D11 structs
* [meson] fix build scripts for MSVC
* change cpp version from 1z to 17 for MSVC
* set -DOMINMAX definition for MSVC
* disable test and wine_utils for MSVC
* use .def files instead of __declspec(dllexport) (bypass 'C2375: redefinition; different linkage' error)
2018-03-05 14:28:51 +01:00
Philip Rebohle
3501186d38
[dxbc] Added tess level interface variables
2018-03-05 14:07:15 +01:00
Philip Rebohle
484308347a
[d3d11] Treat D3D11SamplerState as state object
2018-03-05 02:21:34 +01:00
Philip Rebohle
7a6e20f3a8
[d3d11] Fixed CheckMultisampleQualityLevels return values
2018-03-05 01:08:26 +01:00
Philip Rebohle
9ede325c5b
Merge branch 'master' of https://github.com/doitsujin/dxvk
2018-03-05 01:07:58 +01:00
Mikhail Paulyshka
6c62d7608e
[d3d11] add stub for ID3DUserDefinedAnnotation ( #122 )
...
* [d3d11] D3D11DeviceContext::QueryInterface: log missing GUID
* [d3d11] suppress warnings for ID3DUserDefinedAnnotation and ID3D11Debug
2018-03-05 01:07:09 +01:00
Philip Rebohle
e8e5739978
[d3d11] Fixed potential crashes in InitImage/InitBuffer
2018-03-03 23:33:55 +01:00
Philip Rebohle
52f6ba1756
[dxvk] Fixed D3D11CreateDeviceAndSwapChain bug
...
Some applications may want to create a swap chain
without specifying a device or context pointer.
2018-03-03 23:15:15 +01:00
Philip Rebohle
c5bbf2d989
[d3d11] Fixed FinishCommandList
...
- ppCommandList is optional.
- We need to call RestoreState in order to set up the current context
state for the new command list.
2018-03-03 22:28:30 +01:00
Philip Rebohle
82ac381919
[d3d11] Move framebuffer creation out of OMSetRenderTargets
...
This might be useful when restoring context state.
2018-03-03 22:15:41 +01:00
Philip Rebohle
b469cfac0b
[d3d11] Implemented FinishCommandList/ExecuteCommandList
2018-03-03 20:59:17 +01:00
Mikhail Paulyshka
3f8c2b0f9c
[dxgi] implement CreateDXGIFactory2 ( #120 )
2018-03-03 20:10:51 +01:00
Philip Rebohle
9f01ad1f7f
[dxvk] Fix typo
2018-03-02 17:28:17 +01:00
Philip Rebohle
49d2cee930
[dxvk] Fix Nvidia driver version number
2018-03-02 16:35:28 +01:00
Philip Rebohle
349817c52e
[dxvk] Do not enable HUD if DXVK_HUD is 0
...
Fixes #107 .
2018-03-02 10:36:46 +01:00
ZeroFault
fae9916708
Debug logging for compute shaders ( #115 )
...
* Add debug logging for compute shaders
* remove redundant nullptr check
2018-03-02 10:33:06 +01:00
Philip Rebohle
e0fbfdf0e2
[dxvk] Use linked list for CS chunks
...
Improves memory efficiency and CPU overhead of the CSMT implementation
when the average number of bytes per command entry is less than 64 bytes.
2018-03-02 10:31:08 +01:00
Philip Rebohle
3dea58dabc
[dxbc] Implemented more tessellation-related declarations
2018-03-01 14:36:17 +01:00
Philip Rebohle
feba1f0e88
[dxbc] Implemented Hull Shader control point count declarations
2018-03-01 12:47:24 +01:00
Philip Rebohle
0916115086
[dxbc] Implemented Hull Shader fork/join phase invocations
2018-03-01 12:08:06 +01:00
Philip Rebohle
868e55ede7
[dxgi] Added support for 422 formats
...
Untested, but should fix error messages in some engines.
2018-03-01 10:45:46 +01:00
Philip Rebohle
0e9b7d7ccd
[dxbc] Implemented new workaround for depth-compare ops on Nvidia
2018-03-01 10:11:15 +01:00
Philip Rebohle
c21ebd72ef
Merge branch 'tessellation'
...
Dropping the branch because it won't actually break anything.
This is obviously not a complete implementation yet.
2018-03-01 09:34:00 +01:00
Philip Rebohle
d185977918
[dxbc] Implemented Hull shader function declarations
2018-03-01 09:26:17 +01:00
Philip Rebohle
83eb34d71c
[dxvk] Replaced exception by error message
2018-03-01 08:23:55 +01:00
Philip Rebohle
dbe3662bfc
[dxvk] Fixed potential memory allocation issue
2018-03-01 07:29:05 +01:00
Philip Rebohle
d74db72add
[d3d11] Implemented CSGetUnorderedAccessViews
2018-03-01 07:02:39 +01:00
Philip Rebohle
d0db88ee62
[dxbc] Implemnted some HS/DS stubs
2018-03-01 07:00:54 +01:00
Philip Rebohle
bdfbd3e81c
[dxvk] Implemented new workaround for query-related lockups
...
vkGetQueryPoolResults may never return if VK_QUERY_RESULT_WAIT_BIT is
set, and may return queries as not available when they should in fact
be available. This would cause indefinite hangs, so instead we return
fake data to query objects if retrieving query data fails.
2018-02-28 12:39:16 +01:00
Philip Rebohle
a5706254d5
[dxbc] Do not emit depth image types for integer images
2018-02-28 06:51:13 +01:00
Philip Rebohle
8bfd12067a
[dxbc] Remove packDrefValueIntoCoordinates hack
...
Causes more issues than it solves when the coordinate vector
gets too big.
2018-02-28 06:44:55 +01:00
Philip Rebohle
fcb2b6d2d8
[dxbc] Use signed integers for bit insert/extract ops
...
Fixes a crash with the Nvidia driver.
2018-02-28 06:44:27 +01:00
Philip Rebohle
97409c3380
[dxvk] Added workaround for RADV query problem
...
In some cases, this should allow games which use occlusion queries
to run rather than enter an infinite loop in GetData().
2018-02-28 06:12:31 +01:00
Philip Rebohle
e5c0030f06
[dxvk] Fall back to host memory if no device memory is available
2018-02-27 12:36:44 +01:00
Philip Rebohle
757bb2bad7
[dxvk] Mark events and queries as available by default
...
Fixes a lockup in World of Warships, which waits for an event query
to be signaled without actually ever calling End() for that query.
2018-02-27 10:14:53 +01:00
Philip Rebohle
dc67cf730e
[d3d11] Add exception handling to CreateTexture* methods
2018-02-27 08:54:24 +01:00
Philip Rebohle
43b7e84bb5
[d3d11] Return fake tessellation shader obejects to the application
...
Prevents crashes in applications that use domain and hull shaders for
more than just rendering. Allows Fallout 4 tp run.
2018-02-26 17:29:10 +01:00
Philip Rebohle
e45d502fe4
[d3d11] Fix Create*Shader return values
...
When not writing back any shader object, we should be returning
S_FALSE instead of S_OK.
2018-02-26 17:04:45 +01:00
Philip Rebohle
c7acfb667f
[d3d11] Fix format for 1D RTVs and DSVs
2018-02-26 17:00:24 +01:00
Philip Rebohle
ec59389527
[dxbc] Implement EvalAttribute* instructions
2018-02-26 16:46:34 +01:00
Philip Rebohle
e4292adf29
[d3d11] Implemented 1D render target and depth-stencil views
...
An apitrace for Fallout 4 suggests that the game actually uses this.
2018-02-26 15:21:18 +01:00
Philip Rebohle
3ebafcc281
Revert "[d3d11] Remvoed query support"
...
This reverts commit 3d17eb68b9
.
2018-02-26 14:33:27 +01:00
Philip Rebohle
14845628c4
Revert "[d3d11] Fixed fake event query"
...
This reverts commit dbf3fd768d
.
2018-02-26 14:33:17 +01:00
Philip Rebohle
00f6262ff3
[dxbc] Properly implement Input/Output coverage masks
2018-02-26 14:23:41 +01:00
Clément Guérin
858107278f
[util] fix GUID printing
2018-02-24 22:48:40 -08:00
Clément Guérin
c80488428e
[dxgi] add support for B4G4R4A4 color format
2018-02-24 22:48:40 -08:00
Philip Rebohle
ced02ba061
[dxvk] Fixed potential null pointer access when creating descriptor set
2018-02-25 00:30:07 +01:00
Philip Rebohle
ce020e5bc9
[dxvk] Fixed 32-bit compilation issue, derp
2018-02-25 00:18:30 +01:00
Philip Rebohle
e8c98eac95
[dxvk] Implement proper graphics and compute state validation
...
Fixes crashes in various games, including Fallout 4.
2018-02-24 23:56:12 +01:00
Philip Rebohle
eadf74264b
[d3d11] Return early for clear operations on NULL views
...
Fixes a crash in Fallout 4 when loading into the game.
2018-02-24 23:39:22 +01:00
Gabriel Majeri
f582c4e1ce
Throw error if requested layer is not installed ( #100 )
...
* Warn if requested layer is not enabled
* Replace warning with hard error
2018-02-24 22:07:31 +01:00
Philip Rebohle
82fc851f32
[d3d11] Fixed CopySubresourceRegion for partial buffer updates
...
Fixes a subtle bug that caused the Fallout 4 menu to render random
geometry.
2018-02-23 15:16:44 +01:00
Philip Rebohle
dbf3fd768d
[d3d11] Fixed fake event query
2018-02-23 13:21:09 +01:00
Philip Rebohle
3d17eb68b9
[d3d11] Remvoed query support
...
Breaks too many games.
2018-02-23 13:17:24 +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
8813ff979a
[d3d11] Allow UAVs to be created for the swap image
...
Fixes an issue with ComputeMark
2018-02-22 21:38:51 +01:00
Philip Rebohle
2b9ab6626a
[d3d11] Do not create views if the resource bind flags are invalid
2018-02-22 21:38:45 +01:00
Philip Rebohle
4c693fc262
[spirv] Added experimental spirv-tools integration
...
Added support for the validator in order to make debugging easier,
as well as the optimizer, which may help Nvidia users run DXVK.
2018-02-22 18:06:00 +01:00
Philip Rebohle
78e9b575c5
[dxbc] Implement AtomicIMin/Max instructions
2018-02-21 03:49:06 +01:00
Philip Rebohle
b419b3dfbd
[dxvk] Implemented typeless resolve
...
This should allow a large number of Unity-based games to
render at least a menu.
2018-02-21 01:04:28 +01:00
Philip Rebohle
cb3daaf856
[dxvk] Change resolveImage interface to accept an explicit format
2018-02-20 22:26:23 +01:00
Philip Rebohle
43dbc9f1d6
[dxvk] Support depth-to-color image copies and vice versa
...
Fixes validation errors and depth of field effect in Neptunia VII
and potentially other games which do not use all depth images for
rendering.
2018-02-20 13:08:50 +01:00
Philip Rebohle
be4ccc1260
Merge branch 'queries'
2018-02-20 11:32:57 +01:00
Philip Rebohle
e89c7e9276
[d3d11] Added test case for occlusion queries and small improvements
2018-02-19 11:27:14 +01:00
Philip Rebohle
45a03b11be
[dxgi] Add stub implementation of DXGI_PRESENT_TEST
2018-02-18 23:49:00 +01:00
Philip Rebohle
675a629ae5
[d3d11] Fixed crash with timestamp disjoint queries
2018-02-18 23:39:55 +01:00
Philip Rebohle
18c723fe8b
[d3d11] Remove leftover log message
2018-02-18 23:18:41 +01:00
Philip Rebohle
5fea615ed7
[dxvk] Implement backend part for event queries
2018-02-18 22:57:45 +01:00
Philip Rebohle
5334ff57bf
[d3d11] Wired up D3D11Query to backend
2018-02-18 22:34:23 +01:00
Philip Rebohle
7ddd2500d1
[dxvk] Added query tracker
2018-02-18 20:11:05 +01:00
Philip Rebohle
43200010c1
[dxvk] Implemented query allocation
2018-02-18 17:14:02 +01:00
Philip Rebohle
7ae4904ae9
[dxvk] Relax feature requirements, minor fixes
2018-02-18 11:16:18 +01:00
Philip Rebohle
be1cad34bf
[dxbc] Use correct image query instructions for UAVs
...
May fix issues on Nvidia drivers.
2018-02-17 07:33:42 +01:00
Philip Rebohle
fd1fd40ad6
[dxvk] Only emit depth image types for 2D and Cube images
...
May fix driver crashes on Nvidia.
2018-02-16 09:59:41 +01:00
Philip Rebohle
8ebffc1018
[dxbc] Added support for SV_RenderTargetID in pixel shaders
2018-02-15 18:07:40 +01:00
Philip Rebohle
746c90e860
[dxvk] Add DxvkEvent class
...
Will be used to back D3D11 event queries.
2018-02-15 13:26:05 +01:00
Philip Rebohle
dd237d866d
[dxvk] Make query pools more usable as query allocators
2018-02-15 13:25:18 +01:00
Philip Rebohle
563d4582ab
[dxbc] Implemented BfRev instruction
2018-02-15 09:41:48 +01:00
Philip Rebohle
0c2058e8c4
[dxvk] Introduced DxvkComputePipelineStateInfo
...
Will be used to re-compile compute pipelines against the current
state, just like graphics pipelines. May fix GPU lockups etc.
2018-02-14 17:54:35 +01:00
Philip Rebohle
ba707f95b7
[dxvk] Do not commit compute barriers for unbound resources
...
Fixes a crash in Neptunia VII.
2018-02-14 16:18:18 +01:00
Philip Rebohle
17cdccd1ce
[dxgi] Use recursive locking and report fullscreen state changes early
...
Fixes lockups in fullscreen mode in a certain weeb game.
2018-02-14 13:11:59 +01:00
pchome
fb3734ce49
[d3d11] Fix unhandled exception
...
With this patch The Witcher 3 can successfully load saved game.
2018-02-14 07:35:39 +02:00