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

77 Commits

Author SHA1 Message Date
Philip Rebohle
98b8d41016
[dxbc] Write shader name to the generated SPIR-V
Might help identifying shaders in debugging tools such as Renderdoc.
2018-04-15 21:00:08 +02:00
Philip Rebohle
5d1642af1f
[spirv] Track instruction offset in instruction iterator 2018-04-10 12:48:24 +02:00
Philip Rebohle
4b44d3ce39 [dxbc] Unify constants
Identical constants will now be reused. Considerably reduces code size.
2018-04-02 19:41:22 +02:00
Philip Rebohle
ba9e1f307d
[dxbc] Don't use rvalue references for file streams 2018-03-23 18:17:16 +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
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
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
3d0aad705d
[dxbc] Implemented samplepos instruction
Required by Fallout 4, among other games.
2018-03-12 12:25: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
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
0916115086
[dxbc] Implemented Hull Shader fork/join phase invocations 2018-03-01 12:08:06 +01:00
Philip Rebohle
d185977918
[dxbc] Implemented Hull shader function declarations 2018-03-01 09:26:17 +01:00
Philip Rebohle
ec59389527
[dxbc] Implement EvalAttribute* instructions 2018-02-26 16:46:34 +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
563d4582ab
[dxbc] Implemented BfRev instruction 2018-02-15 09:41:48 +01:00
Philip Rebohle
b8a540d4ef
[dxbc] Implemented Lod instruction 2018-02-04 22:41:23 +01:00
Philip Rebohle
54108726d5
[dxbc] Implemented SampleInfo instruction 2018-02-04 19:30:39 +01:00
Philip Rebohle
d0201a1bab
[dxbc] Implemented GatherPo and GatherPoC instructions 2018-02-04 17:40:02 +01:00
Philip Rebohle
596541ed02
[dxbc] Implemented gather instructions and pixel shader SVs 2018-01-17 02:12:29 +01:00
Philip Rebohle
96a97aa0c4 [dxvk] Added HUD
Experimental version of a HUD which displays information
about the hardware, driver version, and frames per second.
2018-01-13 03:53:33 +01:00
Philip Rebohle
fe02c5d6b9 [dxvk] Implementing unbound resource handling (3/4)
The shader compiler will now generate specialization constants
for shader resources, uniform access views, and constant buffers.
2018-01-10 13:44:04 +01:00
Philip Rebohle
f4cd90d6fa [dxbc] Implemented vendor-specific workarounds in an attemt to fix Nvidia 2018-01-07 20:05:27 +01:00
Philip Rebohle
356591cc99 [d3d11] Fixed viewport offset 2018-01-05 16:53:12 +01:00
Philip Rebohle
bfac9eb737 [dxbc] Added bound checking for some texel fetch operations 2018-01-02 16:57:37 +01:00
Philip Rebohle
043330132f [dxbc] Added experimental support for atomic operations 2018-01-02 12:07:49 +01:00
Philip Rebohle
5332891748 [dxbc] Implemented switch-case instructions 2017-12-30 17:22:36 +01:00
Philip Rebohle
e740adfcb7 [dxbc] Implemented f16 pack/unpack instructions 2017-12-30 13:18:31 +01:00
Philip Rebohle
f93745adcf [dxbc] Implemented bfi and bfe instructions 2017-12-30 03:44:19 +01:00
Philip Rebohle
298eeedcc4 [dxbc] Implemented round instructions
Also fixed potential numerical stability issues in with min/max
instructions and saturation when an operand is NaN.
2017-12-29 19:26:59 +01:00
Philip Rebohle
a51439fb29 [dxbc] Implemented thread group shared memory and barriers 2017-12-29 00:51:31 +01:00
Philip Rebohle
a72727a173 [dxbc] Added support for structured and raw buffers 2017-12-28 16:03:17 +01:00
Philip Rebohle
7f5fa18d0b [dxbc] Enabled SPV_KHR_shader_draw_parameters for vertex shaders 2017-12-27 14:31:38 +01:00
Philip Rebohle
5ce975eed9 [dxbc] Fixed SV_VERTEXID and SV_INSTANCEID
Apparently, these two system values ignore the base vertex
and base instance from the draw call. This is not documented,
but in line with what the AMD driver does on Windows.
2017-12-27 12:49:25 +01:00
Philip Rebohle
24b9d9d99a [dxbc] Experimental support for ld,resinfo 2017-12-27 01:37:15 +01:00
Philip Rebohle
46717529fa [dxbc] Implemented unsigned comparators and sample_l 2017-12-21 17:14:11 +01:00
Philip Rebohle
109ce0a695 [dxbc] Implemented sample_d and vector shift instructions 2017-12-20 23:50:39 +01:00
Philip Rebohle
41d660f220 [spirv] Added image operand structure for more flexible sample ops 2017-12-20 20:21:44 +01:00
Philip Rebohle
659ec7b59d [d3d11] Added DXGI format properties 2017-12-20 14:54:24 +01:00
Philip Rebohle
9865474bb4 [dxbc] Initial shadow sampler support 2017-12-20 00:16:49 +01:00
Philip Rebohle
d1720c0c52 [dxbc] Implemented derivatives 2017-12-19 20:26:05 +01:00
Philip Rebohle
5415b685de [dxbc] Implemented type conversion instructions 2017-12-19 18:12:18 +01:00
Philip Rebohle
95bc4b5826 [dxbc] Added immediate constant buffer support 2017-12-19 17:41:23 +01:00
Philip Rebohle
6df9fc75d2 [dxbc] Implemented some new bit-wise logical instructions 2017-12-19 00:45:31 +01:00
Philip Rebohle
6cc3ff4ad8 [dxbc] Basic geometry shader (sm4) support 2017-12-18 16:41:05 +01:00
Philip Rebohle
1e08c0744f [dxbc] Implemented basic control flow instuctions 2017-12-18 11:53:28 +01:00
Philip Rebohle
47347e38da [dxbc] Shader decoder and compiler overhaul (1/2)
Major rewrite of the entire shader decoder to generate easy
to parse data structures for the compiler, which ultimately
allows new instructions to be implemented more easily.
2017-12-18 00:28:54 +01:00
Philip Rebohle
2f99be9546 [dxbc] Implemented conditional move and comparison instructions 2017-12-17 01:36:41 +01:00