1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-12 04:08:52 +01:00
Commit Graph

691 Commits

Author SHA1 Message Date
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
Philip Rebohle
fba16e2a04
[d3d11] Added experimental support for RTVs into 3D images 2018-02-14 03:16:53 +01:00
Philip Rebohle
7bbb6ea93b
[dxvk] More query stuff 2018-02-14 03:16:39 +01:00
Philip Rebohle
4965f8c318
[d3d11] Implemented SRV and RTV normalization 2018-02-14 01:29:50 +01:00
Philip Rebohle
54cfdbdc51
[dxvk] Implemented more query and query pool methods 2018-02-13 13:43:27 +01:00
Philip Rebohle
5beae25bdf
[dxvk] Implemented virtual query class and query pool stub 2018-02-12 16:36:42 +01:00
Philip Rebohle
8a4fa0b1b8
[dxvk] Added Query stub 2018-02-08 19:32:53 +01:00
Philip Rebohle
807dd72656
[hud] Use buffer invalidation instead of synchronization
The previously used synchronization may have had a negative impact on
performance, whereas the new approach is similar to what D3D11 apps do.
2018-02-08 12:48:54 +01:00
Philip Rebohle
59be5b72e8
[dxbc] Added support for oDepthGe/oDepthLe 2018-02-08 10:28:27 +01:00
Philip Rebohle
b3ba401503
[dxbc] Added support for early fragment tests 2018-02-08 10:26:46 +01:00
Philip Rebohle
5a42512028
[dxbc] Silence DclIndexRange warnings 2018-02-08 10:17:59 +01:00
Philip Rebohle
f4d679caa2
[d3d11] Enable sampleRateShading feature 2018-02-08 10:06:10 +01:00
Philip Rebohle
7f409f446a
[dxvk] Improve internal framebuffer APIs
Removes an unnecessary dynamic memory allocation in favour
of a stack-allocated array.
2018-02-07 16:46:39 +01:00