mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
Compare commits
325 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
90d4529f27 | ||
|
9417c7cfb7 | ||
|
1615e5a76b | ||
|
8c11270940 | ||
|
fd120d8f2d | ||
|
46c7f65be8 | ||
|
054ae10693 | ||
|
0f2dd5f9be | ||
|
419c6364db | ||
|
74517de783 | ||
|
f796d8668e | ||
|
e597b0d80f | ||
|
b484a9e1f6 | ||
|
5d13a90e37 | ||
|
da89da2bf3 | ||
|
b8f2c3e1f4 | ||
|
ee28861837 | ||
|
f251da574c | ||
|
3113f167ba | ||
|
d72c91ef97 | ||
|
45541dd9b2 | ||
|
ee6c66eb1b | ||
|
177ea3bcbd | ||
|
61b403a032 | ||
|
264ff9e2da | ||
|
b1cae0dd1e | ||
|
f7354ff9e3 | ||
|
06399d128a | ||
|
b67279394b | ||
|
55c6e17fca | ||
|
f1c19e34d8 | ||
|
e9e9fdbd5e | ||
|
602d2f90d7 | ||
|
891c6d2743 | ||
|
77819d8d04 | ||
|
275644d34a | ||
|
f31efc1afc | ||
|
fccf9f7ac5 | ||
|
88b3776436 | ||
|
cca052da29 | ||
|
dd93b31e48 | ||
|
442a8347bf | ||
|
a7bb5b6ba3 | ||
|
aad1c3e35c | ||
|
edaf7fbd88 | ||
|
4f4afab3d5 | ||
|
1302b897ed | ||
|
16daf0423d | ||
|
8e3f863341 | ||
|
02fc1ba9c3 | ||
|
8076c9a591 | ||
|
06388a2c9b | ||
|
b005390a36 | ||
|
fffdb76b33 | ||
|
e847df9528 | ||
|
39563aa5b3 | ||
|
60a3279318 | ||
|
cab1f57e01 | ||
|
fc2aaee224 | ||
|
1002a6b357 | ||
|
2fb0c2d187 | ||
|
8e6b08d685 | ||
|
1b45052c92 | ||
|
61c402405a | ||
|
44a669a644 | ||
|
7efba29853 | ||
|
b32b060518 | ||
|
ef8dd51c7a | ||
|
f8c848f563 | ||
|
1d74dc7903 | ||
|
af4403147a | ||
|
cf61d217a9 | ||
|
71dd917091 | ||
|
8febea5a9c | ||
|
dff79973e0 | ||
|
c5d680d141 | ||
|
f525e9e93a | ||
|
fdaacb158e | ||
|
3badab2086 | ||
|
bad4c74002 | ||
|
367cf10cdc | ||
|
229a34b93c | ||
|
52d52ad1b9 | ||
|
a597dc8755 | ||
|
9ab77658f2 | ||
|
d396c4ce27 | ||
|
f22e52f358 | ||
|
63e056512d | ||
|
d27b8eb2c0 | ||
|
bf49a1a95b | ||
|
e54f770669 | ||
|
720a087c28 | ||
|
58d6e44501 | ||
|
61a550017f | ||
|
ebc461f795 | ||
|
4a3ad750e0 | ||
|
c39c5b3907 | ||
|
269747dbf3 | ||
|
9624e2f904 | ||
|
e8b3561252 | ||
|
547768bcdd | ||
|
a1e10e5c90 | ||
|
18c1477464 | ||
|
30be83f911 | ||
|
61841e9423 | ||
|
eddae47062 | ||
|
92021b7a3c | ||
|
7e5d9e3b6f | ||
|
5c706152fa | ||
|
5c09752194 | ||
|
f374934281 | ||
|
ed9e236b01 | ||
|
89eda51855 | ||
|
1153f6bb34 | ||
|
9605993af3 | ||
|
926575a6f3 | ||
|
39e62ed2be | ||
|
622311da8e | ||
|
c1ebba9515 | ||
|
88f85ffb50 | ||
|
8c465c81cf | ||
|
ccedb7f711 | ||
|
f3baf55d97 | ||
|
8f8c89fb87 | ||
|
3ca2259807 | ||
|
4f2e07a45d | ||
|
7fd10bb6bc | ||
|
240b9424fb | ||
|
a04e3a51dd | ||
|
7a4ac1afb1 | ||
|
96f66aa4f8 | ||
|
d4a49d788a | ||
|
37cfbe47d7 | ||
|
81afe43569 | ||
|
7eba063136 | ||
|
948c4145f5 | ||
|
98f63c46f8 | ||
|
932c5e36dc | ||
|
58bc61e48d | ||
|
7e99188dc7 | ||
|
25ff56769b | ||
|
983d01df8c | ||
|
7d02922541 | ||
|
4e9798f6f7 | ||
|
fd4a820c4b | ||
|
9c5cb2de18 | ||
|
8484bd59a6 | ||
|
d1c45fe2f0 | ||
|
2258e9d0f3 | ||
|
c77e5f1c1f | ||
|
a584499c8a | ||
|
fc589add49 | ||
|
8a6a620ee2 | ||
|
5d75731d97 | ||
|
fbb5e59a03 | ||
|
6bfb94c440 | ||
|
cf6bc95a3d | ||
|
4ae00cea43 | ||
|
b22e2113a6 | ||
|
0652bb1950 | ||
|
372ddd1f29 | ||
|
f649db23a5 | ||
|
d932fba7c3 | ||
|
11475ef62a | ||
|
cb96482500 | ||
|
bad72d1874 | ||
|
b4bb3931c5 | ||
|
250a24bd3f | ||
|
6fc3ae2b5c | ||
|
cbb1d84069 | ||
|
3a235b57f6 | ||
|
9b98489155 | ||
|
9a80ff28e4 | ||
|
71afb78126 | ||
|
6e370777b4 | ||
|
1bd873fb2b | ||
|
c2e09e4c4f | ||
|
0d1bc77b2a | ||
|
4433dacb4f | ||
|
71a9feac8e | ||
|
1e178efa01 | ||
|
bfdd5c142d | ||
|
78719dc814 | ||
|
d50b5fe767 | ||
|
18731d71a6 | ||
|
3d49b59a68 | ||
|
819c5f1943 | ||
|
9d94506313 | ||
|
fe70ee2158 | ||
|
21d5ee4df2 | ||
|
c861a937e8 | ||
|
f95ab2a5e8 | ||
|
7e7a6d3691 | ||
|
80b9f52010 | ||
|
3a07df8476 | ||
|
0dee96ead6 | ||
|
e71b2c0911 | ||
|
0b77b5f99e | ||
|
01faf6ad9e | ||
|
bd3d4a6c06 | ||
|
acc68aef94 | ||
|
31ff1fa9b6 | ||
|
95bad60281 | ||
|
9187a41733 | ||
|
42d46d2513 | ||
|
9014183100 | ||
|
981034e6e4 | ||
|
0a98d09145 | ||
|
d52eb8595f | ||
|
cdabe172cb | ||
|
54bd6f7b4b | ||
|
77e1c5893e | ||
|
c0a2bb1095 | ||
|
402c93fa68 | ||
|
3e553aaaa7 | ||
|
f26d47585f | ||
|
8fe6d2eeac | ||
|
e0e261eac3 | ||
|
25cf6a720b | ||
|
e9fb067d4c | ||
|
d077562f79 | ||
|
55c5129ad9 | ||
|
a18ace731d | ||
|
44bf5556ae | ||
|
63631a8fd4 | ||
|
3bafd036bb | ||
|
a55973d695 | ||
|
15ea5ff9db | ||
|
c4f074d25d | ||
|
866c5d9531 | ||
|
b8a85c6ad5 | ||
|
ab37b27a7d | ||
|
c58d666d1b | ||
|
8f8c7a02ee | ||
|
ae6bc398d6 | ||
|
d4b5e79c8b | ||
|
aec9ea085e | ||
|
e222a786a1 | ||
|
3079c874e3 | ||
|
28dff58fb5 | ||
|
53d5ea639c | ||
|
1ec112e3d7 | ||
|
5d33fb4633 | ||
|
c96143abdc | ||
|
22157c3da3 | ||
|
eca4b62c7e | ||
|
571d807dd8 | ||
|
41a5d37935 | ||
|
d4d960cb8b | ||
|
2a3413e0f0 | ||
|
b2a1f6b5e4 | ||
|
574239e3e3 | ||
|
6e303af519 | ||
|
b0ac77b44d | ||
|
07ce711583 | ||
|
e4bf5933b9 | ||
|
79dd9544b7 | ||
|
23ff83e8a0 | ||
|
53e9ad3e4c | ||
|
e5afbda34a | ||
|
8a2b357855 | ||
|
717cd3f5bb | ||
|
e390bc35e2 | ||
|
06040d2a30 | ||
|
a65c0b0e22 | ||
|
73d422a0e0 | ||
|
e489098878 | ||
|
dfb2a316e6 | ||
|
300f3462a4 | ||
|
68764b74a1 | ||
|
dcac2646e4 | ||
|
52d5cb749f | ||
|
01800942a9 | ||
|
62c891b796 | ||
|
a34cf2e64e | ||
|
396edae281 | ||
|
d8e6a1066d | ||
|
e4d94d955c | ||
|
ff31284f8d | ||
|
dc84afe73a | ||
|
f0584cad62 | ||
|
62e9b86697 | ||
|
d5a0b3afc4 | ||
|
08cece3a92 | ||
|
de25e88901 | ||
|
e9a8bfb2c4 | ||
|
8c7704bb78 | ||
|
d3e6a3a78f | ||
|
6775f7ba66 | ||
|
0d2f2e1860 | ||
|
69f32796b0 | ||
|
9ccba35dde | ||
|
8fa1750206 | ||
|
7d521db3db | ||
|
588784e4dc | ||
|
b4bf5af475 | ||
|
3aee386e2f | ||
|
69ecfdfb0b | ||
|
bdfec4886d | ||
|
5a05fabe62 | ||
|
2a2943c2cf | ||
|
358d656262 | ||
|
bf452b5907 | ||
|
488af14144 | ||
|
6c9f6d0fcf | ||
|
4ed60cda13 | ||
|
c4a8e06abf | ||
|
9ccf291971 | ||
|
5c02e12187 | ||
|
3aa83e877d | ||
|
3935e8647f | ||
|
e98e6c9b53 | ||
|
5ccadd07f1 | ||
|
0b67481496 | ||
|
1a0d85b8d6 | ||
|
e93f2e7746 | ||
|
9532ac5f84 | ||
|
861078d63a | ||
|
8d84e206ab | ||
|
6ef0213135 | ||
|
b40179da3a | ||
|
7e1fcdca89 | ||
|
20190a1388 | ||
|
7b9eb8d189 | ||
|
5e88ab22aa |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,6 +10,7 @@ Makefile
|
|||||||
Makefile.in
|
Makefile.in
|
||||||
test-suite.log
|
test-suite.log
|
||||||
/vkd3d-compiler
|
/vkd3d-compiler
|
||||||
|
/vkd3d-dxbc
|
||||||
|
|
||||||
vkd3d-*.tar.xz
|
vkd3d-*.tar.xz
|
||||||
|
|
||||||
|
7
.gitlab-ci.yml
Normal file
7
.gitlab-ci.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
stages:
|
||||||
|
- image
|
||||||
|
- build
|
||||||
|
|
||||||
|
include:
|
||||||
|
- local: "/gitlab/image.yml"
|
||||||
|
- local: "/gitlab/build.yml"
|
128
ANNOUNCE
128
ANNOUNCE
@@ -1,16 +1,16 @@
|
|||||||
The Wine team is proud to announce that release 1.8 of vkd3d, the Direct3D to
|
The Wine team is proud to announce that release 1.9 of vkd3d, the Direct3D to
|
||||||
Vulkan translation library, is now available.
|
Vulkan translation library, is now available.
|
||||||
|
|
||||||
This release contains improvements that are listed in the release notes below.
|
This release contains improvements that are listed in the release notes below.
|
||||||
The main highlights are:
|
The main highlights are:
|
||||||
|
|
||||||
- Support for still many more HLSL features and intrinsics.
|
- Yet more improvements to the HLSL compiler.
|
||||||
- Performance improvements to vkd3d descriptor updates.
|
- A new utility to inspect the contents of DXBC blobs.
|
||||||
- Miscellaneous bug fixes.
|
- Miscellaneous bug fixes.
|
||||||
|
|
||||||
The source is available from the following location:
|
The source is available from the following location:
|
||||||
|
|
||||||
https://dl.winehq.org/vkd3d/source/vkd3d-1.8.tar.xz
|
https://dl.winehq.org/vkd3d/source/vkd3d-1.9.tar.xz
|
||||||
|
|
||||||
The current source can also be pulled directly from the git repository:
|
The current source can also be pulled directly from the git repository:
|
||||||
|
|
||||||
@@ -21,73 +21,83 @@ for the complete list.
|
|||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
What's new in vkd3d 1.8
|
What's new in vkd3d 1.9
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
|
|
||||||
*** libvkd3d
|
*** libvkd3d
|
||||||
|
|
||||||
- Performance improvements have been made to the code that handles descriptor
|
- Copying between depth/stencil and colour formats in
|
||||||
updates. In some applications the improvement can be quite significant.
|
ID3D12GraphicsCommandList::CopyResource() is supported.
|
||||||
|
- The ID3D12Fence1 interface is supported.
|
||||||
- Host-visible descriptor heaps are persistently mapped on creation. Some
|
|
||||||
applications access resource data from the CPU after calling Unmap(), and
|
|
||||||
that's supposed to work in practice.
|
|
||||||
|
|
||||||
- 1-dimensional texture unordered-access views and shader resource views are
|
|
||||||
implemented.
|
|
||||||
|
|
||||||
- Shader resource view, unordered access view, and constant buffer view root
|
|
||||||
descriptors with NULL GPU addresses are supported.
|
|
||||||
|
|
||||||
- Direct3D 12 descriptor heap destruction is delayed until all contained
|
|
||||||
resources are destroyed.
|
|
||||||
|
|
||||||
|
|
||||||
*** libvkd3d-shader
|
*** libvkd3d-shader
|
||||||
|
|
||||||
|
- vkd3d_shader_scan() supports retrieving descriptor information for `d3dbc'
|
||||||
|
shaders. This is one of the requirements for eventual SPIR-V generation from
|
||||||
|
`d3dbc' sources.
|
||||||
|
|
||||||
- New features for the HLSL source type:
|
- New features for the HLSL source type:
|
||||||
- Support for the ternary conditional operator "?:".
|
|
||||||
- Support for "discard" statements.
|
|
||||||
- Support for the "packoffset" keyword.
|
|
||||||
- Support for semantics on array types.
|
|
||||||
- Support for RWBuffer loads and stores.
|
|
||||||
- Register allocation for arrays and structures of resources and samplers
|
|
||||||
is implemented.
|
|
||||||
- Support for the SV_IsFrontFace pixel shader system-value semantics.
|
|
||||||
- Support for using constant expressions as array sizes and indices.
|
|
||||||
- Support for dynamic selection of vector components.
|
|
||||||
- Support for the following intrinsic functions:
|
- Support for the following intrinsic functions:
|
||||||
- D3DCOLORtoUBYTE4()
|
- clip()
|
||||||
- any()
|
- ddx_coarse() and ddy_coarse()
|
||||||
- asfloat()
|
- ddx_fine() and ddy_fine()
|
||||||
- ddx() and ddy()
|
- tex1D(), tex2D(), texCUBE(), and tex3D()
|
||||||
- fmod()
|
- Constant folding support for more expression types. In particular:
|
||||||
- log(), log2(), and log10()
|
- comparison operators
|
||||||
- sign()
|
- floating-point min() and max()
|
||||||
- trunc()
|
- logical `and' and `or'
|
||||||
- The SampleBias(), SampleCmp(), SampleCmpLevelZero(), and SampleGrad()
|
- dot products
|
||||||
texture object methods are implemented.
|
- square roots
|
||||||
- Support for the case-insensitive variants of the "vector" and "matrix"
|
- logarithms
|
||||||
data types.
|
- Support for multi-sample texture object declarations without explicit
|
||||||
- Parser support for the "unroll" loop attribute. A warning is output for
|
sample counts in shader model 4.1 and later shaders.
|
||||||
"unroll" without iteration count, and an error is output when an iteration
|
- Support for using constant expressions as sample counts in multi-sample
|
||||||
count is specified. Actual unrolling is not implemented yet.
|
texture object declarations.
|
||||||
- Parser support for RWStructuredBuffer resources.
|
- Support for variable initialisers using variables declared earlier in the
|
||||||
- Parser support for SamplerComparisonState objects. Note that outputting
|
same declaration list. E.g., `float a = 1, b = a, c = b + 1;'.
|
||||||
compiled effects is not supported yet, but parsing these allows shaders
|
- The GetDimensions() texture object method is implemented.
|
||||||
containing SamplerComparisonState state objects to be compiled.
|
- Matrix swizzles are implemented.
|
||||||
|
- Parser support for if-statement attributes like `[branch]' and
|
||||||
|
`[flatten]'.
|
||||||
|
- Support for the `inline' function modifier.
|
||||||
|
|
||||||
- More improvements to HLSL support for the Direct3D shader model 1/2/3
|
- Previously, vkd3d_shader_compile() would in some cases return VKD3D_OK
|
||||||
profiles.
|
despite compilation failing when targeting legacy Direct3D bytecode. These
|
||||||
|
cases have been fixed.
|
||||||
|
|
||||||
- The section alignment of DXBC blobs produced by
|
- Various HLSL preprocessor fixes for edge cases related to stringification.
|
||||||
vkd3d_shader_serialize_dxbc() matches those produced by d3dcompiler more
|
|
||||||
closely.
|
|
||||||
|
|
||||||
- The "main" function for shaders produced by the SPIR-V target is always
|
- SPIR-V target support for the `linear noperspective centroid' input
|
||||||
terminated, even when the source was a TPF shader without explicit "ret"
|
interpolation mode.
|
||||||
instruction.
|
|
||||||
|
|
||||||
- Relative addressing of shader input registers is supported by SPIR-V
|
- New interfaces:
|
||||||
targets.
|
- The vkd3d_shader_scan_signature_info structure extends the
|
||||||
|
vkd3d_shader_compile_info structure, and can be used to retrieve
|
||||||
|
descriptions of `dxbc-tpf' and `d3dbc' shader inputs and outputs.
|
||||||
|
- vkd3d_shader_free_scan_signature_info() is used to free
|
||||||
|
vkd3d_shader_scan_signature_info structures.
|
||||||
|
- The VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_ORDER compile option can be
|
||||||
|
used to specify the default matrix packing order for HLSL sources.
|
||||||
|
- The vkd3d_shader_varying_map_info structure extends the
|
||||||
|
vkd3d_shader_compile_info structure, and can be used to specify a mapping
|
||||||
|
between the outputs of a shader stage and the inputs of the next shader
|
||||||
|
stage.
|
||||||
|
- vkd3d_shader_build_varying_map() is used to build a mapping between the
|
||||||
|
outputs of a shader stage and the inputs of the next shader stage.
|
||||||
|
- The VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_RAW_BUFFER flag returned as part of
|
||||||
|
the vkd3d_shader_descriptor_info structure indicates the descriptor refers
|
||||||
|
to a byte-addressed (`raw') buffer resource.
|
||||||
|
|
||||||
|
|
||||||
|
*** vkd3d-compiler
|
||||||
|
|
||||||
|
- The `--matrix-storage-order' option can used to specify the default matrix
|
||||||
|
storage order for HLSL sources.
|
||||||
|
|
||||||
|
|
||||||
|
*** vkd3d-dxbc
|
||||||
|
|
||||||
|
- vkd3d-dxbc is a new utility that can be used to inspect the contents of DXBC
|
||||||
|
blobs.
|
||||||
|
2
AUTHORS
2
AUTHORS
@@ -1,4 +1,5 @@
|
|||||||
Alexandre Julliard
|
Alexandre Julliard
|
||||||
|
Alistair Leslie-Hughes
|
||||||
Andrew Eikum
|
Andrew Eikum
|
||||||
Andrey Gusev
|
Andrey Gusev
|
||||||
Atharva Nimbalkar
|
Atharva Nimbalkar
|
||||||
@@ -9,6 +10,7 @@ Conor McCarthy
|
|||||||
David Gow
|
David Gow
|
||||||
Derek Lesho
|
Derek Lesho
|
||||||
Ethan Lee
|
Ethan Lee
|
||||||
|
Evan Tang
|
||||||
Fabian Maurer
|
Fabian Maurer
|
||||||
Francisco Casas
|
Francisco Casas
|
||||||
Francois Gouget
|
Francois Gouget
|
||||||
|
303
Makefile.am
303
Makefile.am
@@ -42,149 +42,157 @@ vkd3d_cross_tests = \
|
|||||||
tests/hlsl_d3d12
|
tests/hlsl_d3d12
|
||||||
|
|
||||||
vkd3d_shader_tests = \
|
vkd3d_shader_tests = \
|
||||||
tests/abs.shader_test \
|
tests/hlsl/abs.shader_test \
|
||||||
tests/all.shader_test \
|
tests/hlsl/all.shader_test \
|
||||||
tests/any.shader_test \
|
tests/hlsl/any.shader_test \
|
||||||
tests/arithmetic-float.shader_test \
|
tests/hlsl/arithmetic-float-uniform.shader_test \
|
||||||
tests/arithmetic-float-uniform.shader_test \
|
tests/hlsl/arithmetic-float.shader_test \
|
||||||
tests/arithmetic-int.shader_test \
|
tests/hlsl/arithmetic-int-uniform.shader_test \
|
||||||
tests/arithmetic-int-uniform.shader_test \
|
tests/hlsl/arithmetic-int.shader_test \
|
||||||
tests/arithmetic-uint.shader_test \
|
tests/hlsl/arithmetic-uint.shader_test \
|
||||||
tests/array-index-expr.shader_test \
|
tests/hlsl/array-dimension.shader_test \
|
||||||
tests/array-parameters.shader_test \
|
tests/hlsl/array-index-expr.shader_test \
|
||||||
tests/asfloat.shader_test \
|
tests/hlsl/array-parameters.shader_test \
|
||||||
tests/asuint.shader_test \
|
tests/hlsl/array-size-expr.shader_test \
|
||||||
tests/bitwise.shader_test \
|
tests/hlsl/asfloat.shader_test \
|
||||||
tests/bool-semantics.shader_test \
|
tests/hlsl/asuint.shader_test \
|
||||||
tests/cast-broadcast.shader_test \
|
tests/hlsl/attributes.shader_test \
|
||||||
tests/cast-componentwise-compatible.shader_test \
|
tests/hlsl/bitwise.shader_test \
|
||||||
tests/cast-componentwise-equal.shader_test \
|
tests/hlsl/bool-cast.shader_test \
|
||||||
tests/cast-to-float.shader_test \
|
tests/hlsl/bool-semantics.shader_test \
|
||||||
tests/cast-to-half.shader_test \
|
tests/hlsl/cast-broadcast.shader_test \
|
||||||
tests/cast-to-int.shader_test \
|
tests/hlsl/cast-componentwise-compatible.shader_test \
|
||||||
tests/cast-to-uint.shader_test \
|
tests/hlsl/cast-componentwise-equal.shader_test \
|
||||||
tests/cbuffer.shader_test \
|
tests/hlsl/cast-to-float.shader_test \
|
||||||
tests/compute.shader_test \
|
tests/hlsl/cast-to-half.shader_test \
|
||||||
tests/conditional.shader_test \
|
tests/hlsl/cast-to-int.shader_test \
|
||||||
tests/ddxddy.shader_test \
|
tests/hlsl/cast-to-uint.shader_test \
|
||||||
tests/distance.shader_test \
|
tests/hlsl/cbuffer.shader_test \
|
||||||
tests/entry-point-semantics.shader_test \
|
tests/hlsl/clamp.shader_test \
|
||||||
tests/exp.shader_test \
|
tests/hlsl/clip.shader_test \
|
||||||
tests/expr-indexing.shader_test \
|
tests/hlsl/combined-samplers.shader_test \
|
||||||
tests/floor.shader_test \
|
tests/hlsl/comma.shader_test \
|
||||||
tests/fmod.shader_test \
|
tests/hlsl/compute.shader_test \
|
||||||
tests/frac.shader_test \
|
tests/hlsl/conditional.shader_test \
|
||||||
tests/function-return.shader_test \
|
tests/hlsl/const.shader_test \
|
||||||
tests/hlsl-array-dimension.shader_test \
|
tests/hlsl/cross.shader_test \
|
||||||
tests/hlsl-array-size-expr.shader_test \
|
tests/hlsl/d3dcolor-to-ubyte4.shader_test \
|
||||||
tests/hlsl-attributes.shader_test \
|
tests/hlsl/ddxddy.shader_test \
|
||||||
tests/hlsl-bool-cast.shader_test \
|
tests/hlsl/discard.shader_test \
|
||||||
tests/hlsl-clamp.shader_test \
|
tests/hlsl/distance.shader_test \
|
||||||
tests/hlsl-comma.shader_test \
|
tests/hlsl/dot.shader_test \
|
||||||
tests/hlsl-cross.shader_test \
|
tests/hlsl/duplicate-modifiers.shader_test \
|
||||||
tests/hlsl-d3dcolor-to-ubyte4.shader_test \
|
tests/hlsl/entry-point-semantics.shader_test \
|
||||||
tests/hlsl-discard.shader_test \
|
tests/hlsl/exp.shader_test \
|
||||||
tests/hlsl-dot.shader_test \
|
tests/hlsl/expr-indexing.shader_test \
|
||||||
tests/hlsl-duplicate-modifiers.shader_test \
|
tests/hlsl/floor.shader_test \
|
||||||
tests/hlsl-for.shader_test \
|
tests/hlsl/fmod.shader_test \
|
||||||
tests/hlsl-function.shader_test \
|
tests/hlsl/for.shader_test \
|
||||||
tests/hlsl-function-cast.shader_test \
|
tests/hlsl/frac.shader_test \
|
||||||
tests/hlsl-function-overload.shader_test \
|
tests/hlsl/function-cast.shader_test \
|
||||||
tests/hlsl-gather-offset.shader_test \
|
tests/hlsl/function-overload.shader_test \
|
||||||
tests/hlsl-gather.shader_test \
|
tests/hlsl/function-return.shader_test \
|
||||||
tests/hlsl-initializer-flatten.shader_test \
|
tests/hlsl/function.shader_test \
|
||||||
tests/hlsl-initializer-implicit-array.shader_test \
|
tests/hlsl/gather-offset.shader_test \
|
||||||
tests/hlsl-initializer-invalid-arg-count.shader_test \
|
tests/hlsl/gather.shader_test \
|
||||||
tests/hlsl-initializer-local-array.shader_test \
|
tests/hlsl/getdimensions.shader_test \
|
||||||
tests/hlsl-initializer-matrix.shader_test \
|
tests/hlsl/initializer-flatten.shader_test \
|
||||||
tests/hlsl-initializer-nested.shader_test \
|
tests/hlsl/initializer-implicit-array.shader_test \
|
||||||
tests/hlsl-initializer-numeric.shader_test \
|
tests/hlsl/initializer-invalid-arg-count.shader_test \
|
||||||
tests/hlsl-initializer-objects.shader_test \
|
tests/hlsl/initializer-local-array.shader_test \
|
||||||
tests/hlsl-initializer-static-array.shader_test \
|
tests/hlsl/initializer-matrix.shader_test \
|
||||||
tests/hlsl-initializer-struct.shader_test \
|
tests/hlsl/initializer-multi.shader_test \
|
||||||
tests/hlsl-intrinsic-override.shader_test \
|
tests/hlsl/initializer-nested.shader_test \
|
||||||
tests/hlsl-invalid.shader_test \
|
tests/hlsl/initializer-numeric.shader_test \
|
||||||
tests/hlsl-is-front-face.shader_test \
|
tests/hlsl/initializer-objects.shader_test \
|
||||||
tests/hlsl-ldexp.shader_test \
|
tests/hlsl/initializer-static-array.shader_test \
|
||||||
tests/hlsl-length.shader_test \
|
tests/hlsl/initializer-struct.shader_test \
|
||||||
tests/hlsl-lerp.shader_test \
|
tests/hlsl/intrinsic-override.shader_test \
|
||||||
tests/hlsl-majority-pragma.shader_test \
|
tests/hlsl/invalid.shader_test \
|
||||||
tests/hlsl-majority-typedef.shader_test \
|
tests/hlsl/is-front-face.shader_test \
|
||||||
tests/hlsl-matrix-indexing.shader_test \
|
tests/hlsl/ldexp.shader_test \
|
||||||
tests/hlsl-mul.shader_test \
|
tests/hlsl/length.shader_test \
|
||||||
tests/hlsl-nested-arrays.shader_test \
|
tests/hlsl/lerp.shader_test \
|
||||||
tests/hlsl-normalize.shader_test \
|
tests/hlsl/lit.shader_test \
|
||||||
tests/hlsl-numeric-constructor-truncation.shader_test \
|
tests/hlsl/load-level.shader_test \
|
||||||
tests/hlsl-numeric-types.shader_test \
|
tests/hlsl/log.shader_test \
|
||||||
tests/hlsl-numthreads.shader_test \
|
tests/hlsl/logic-operations.shader_test \
|
||||||
tests/hlsl-return-implicit-conversion.shader_test \
|
tests/hlsl/loop.shader_test \
|
||||||
tests/hlsl-shape.shader_test \
|
tests/hlsl/majority-pragma.shader_test \
|
||||||
tests/hlsl-single-numeric-initializer.shader_test \
|
tests/hlsl/majority-syntax.shader_test \
|
||||||
tests/hlsl-smoothstep.shader_test \
|
tests/hlsl/majority-typedef.shader_test \
|
||||||
tests/hlsl-state-block-syntax.shader_test \
|
tests/hlsl/math.shader_test \
|
||||||
tests/hlsl-static-initializer.shader_test \
|
tests/hlsl/matrix-indexing.shader_test \
|
||||||
tests/hlsl-storage-qualifiers.shader_test \
|
tests/hlsl/matrix-semantics.shader_test \
|
||||||
tests/hlsl-struct-array.shader_test \
|
tests/hlsl/max.shader_test \
|
||||||
tests/hlsl-struct-assignment.shader_test \
|
tests/hlsl/minimum-precision.shader_test \
|
||||||
tests/hlsl-struct-semantics.shader_test \
|
tests/hlsl/mul.shader_test \
|
||||||
tests/hlsl-ternary.shader_test \
|
tests/hlsl/multiple-rt.shader_test \
|
||||||
tests/hlsl-transpose.shader_test \
|
tests/hlsl/nested-arrays.shader_test \
|
||||||
tests/hlsl-trunc.shader_test \
|
tests/hlsl/nointerpolation.shader_test \
|
||||||
tests/hlsl-type-names.shader_test \
|
tests/hlsl/normalize.shader_test \
|
||||||
tests/hlsl-vector-indexing.shader_test \
|
tests/hlsl/numeric-constructor-truncation.shader_test \
|
||||||
tests/hlsl-vector-indexing-uniform.shader_test \
|
tests/hlsl/numeric-types.shader_test \
|
||||||
tests/lit.shader_test \
|
tests/hlsl/numthreads.shader_test \
|
||||||
tests/load-level.shader_test \
|
tests/hlsl/object-field-offsets.shader_test \
|
||||||
tests/log.shader_test \
|
tests/hlsl/object-parameters.shader_test \
|
||||||
tests/logic-operations.shader_test \
|
tests/hlsl/object-references.shader_test \
|
||||||
tests/loop.shader_test \
|
tests/hlsl/pow.shader_test \
|
||||||
tests/majority-syntax.shader_test \
|
tests/hlsl/reflect.shader_test \
|
||||||
tests/math.shader_test \
|
tests/hlsl/register-reservations.shader_test \
|
||||||
tests/matrix-semantics.shader_test \
|
tests/hlsl/return-implicit-conversion.shader_test \
|
||||||
tests/max.shader_test \
|
tests/hlsl/return.shader_test \
|
||||||
tests/minimum-precision.shader_test \
|
tests/hlsl/round.shader_test \
|
||||||
tests/multiple-rt.shader_test \
|
tests/hlsl/sample-bias.shader_test \
|
||||||
tests/nointerpolation.shader_test \
|
tests/hlsl/sample-grad.shader_test \
|
||||||
tests/object-field-offsets.shader_test \
|
tests/hlsl/sample-level.shader_test \
|
||||||
tests/object-parameters.shader_test \
|
tests/hlsl/sampler-offset.shader_test \
|
||||||
tests/object-references.shader_test \
|
tests/hlsl/sampler.shader_test \
|
||||||
tests/pow.shader_test \
|
tests/hlsl/saturate.shader_test \
|
||||||
|
tests/hlsl/shader-interstage-interface.shader_test \
|
||||||
|
tests/hlsl/shape.shader_test \
|
||||||
|
tests/hlsl/side-effects.shader_test \
|
||||||
|
tests/hlsl/sign.shader_test \
|
||||||
|
tests/hlsl/single-numeric-initializer.shader_test \
|
||||||
|
tests/hlsl/smoothstep.shader_test \
|
||||||
|
tests/hlsl/sqrt.shader_test \
|
||||||
|
tests/hlsl/state-block-syntax.shader_test \
|
||||||
|
tests/hlsl/static-initializer.shader_test \
|
||||||
|
tests/hlsl/step.shader_test \
|
||||||
|
tests/hlsl/storage-qualifiers.shader_test \
|
||||||
|
tests/hlsl/struct-array.shader_test \
|
||||||
|
tests/hlsl/struct-assignment.shader_test \
|
||||||
|
tests/hlsl/struct-semantics.shader_test \
|
||||||
|
tests/hlsl/swizzle-constant-prop.shader_test \
|
||||||
|
tests/hlsl/swizzle-matrix.shader_test \
|
||||||
|
tests/hlsl/swizzles.shader_test \
|
||||||
|
tests/hlsl/ternary.shader_test \
|
||||||
|
tests/hlsl/texture-load-offset.shader_test \
|
||||||
|
tests/hlsl/texture-load-typed.shader_test \
|
||||||
|
tests/hlsl/texture-load.shader_test \
|
||||||
|
tests/hlsl/texture-ordering.shader_test \
|
||||||
|
tests/hlsl/transpose.shader_test \
|
||||||
|
tests/hlsl/trigonometry.shader_test \
|
||||||
|
tests/hlsl/trunc.shader_test \
|
||||||
|
tests/hlsl/type-names.shader_test \
|
||||||
|
tests/hlsl/uav-load.shader_test \
|
||||||
|
tests/hlsl/uav-out-param.shader_test \
|
||||||
|
tests/hlsl/uav-rwbuffer.shader_test \
|
||||||
|
tests/hlsl/uav-rwstructuredbuffer.shader_test \
|
||||||
|
tests/hlsl/uav-rwtexture.shader_test \
|
||||||
|
tests/hlsl/uniform-semantics.shader_test \
|
||||||
|
tests/hlsl/vector-indexing-uniform.shader_test \
|
||||||
|
tests/hlsl/vector-indexing.shader_test \
|
||||||
|
tests/hlsl/writemask-assignop-0.shader_test \
|
||||||
|
tests/hlsl/writemask-assignop-1.shader_test \
|
||||||
|
tests/hlsl/writemask-assignop-2.shader_test \
|
||||||
|
tests/hlsl/writemask-assignop-3.shader_test \
|
||||||
|
tests/preproc-if-expr.shader_test \
|
||||||
tests/preproc-if.shader_test \
|
tests/preproc-if.shader_test \
|
||||||
tests/preproc-ifdef.shader_test \
|
tests/preproc-ifdef.shader_test \
|
||||||
tests/preproc-if-expr.shader_test \
|
|
||||||
tests/preproc-invalid.shader_test \
|
tests/preproc-invalid.shader_test \
|
||||||
tests/preproc-macro.shader_test \
|
tests/preproc-macro.shader_test \
|
||||||
tests/preproc-misc.shader_test \
|
tests/preproc-misc.shader_test
|
||||||
tests/reflect.shader_test \
|
|
||||||
tests/register-reservations.shader_test \
|
|
||||||
tests/return.shader_test \
|
|
||||||
tests/round.shader_test \
|
|
||||||
tests/sample-bias.shader_test \
|
|
||||||
tests/sample-grad.shader_test \
|
|
||||||
tests/sample-level.shader_test \
|
|
||||||
tests/sampler.shader_test \
|
|
||||||
tests/sampler-offset.shader_test \
|
|
||||||
tests/saturate.shader_test \
|
|
||||||
tests/shader-interstage-interface.shader_test \
|
|
||||||
tests/side-effects.shader_test \
|
|
||||||
tests/sign.shader_test \
|
|
||||||
tests/sqrt.shader_test \
|
|
||||||
tests/step.shader_test \
|
|
||||||
tests/swizzle-constant-prop.shader_test \
|
|
||||||
tests/swizzles.shader_test \
|
|
||||||
tests/texture-load.shader_test \
|
|
||||||
tests/texture-load-offset.shader_test \
|
|
||||||
tests/texture-load-typed.shader_test \
|
|
||||||
tests/trigonometry.shader_test \
|
|
||||||
tests/uav-load.shader_test \
|
|
||||||
tests/uav-out-param.shader_test \
|
|
||||||
tests/uav-rwbuffer.shader_test \
|
|
||||||
tests/uav-rwstructuredbuffer.shader_test \
|
|
||||||
tests/uav-rwtexture.shader_test \
|
|
||||||
tests/writemask-assignop-0.shader_test \
|
|
||||||
tests/writemask-assignop-1.shader_test \
|
|
||||||
tests/writemask-assignop-2.shader_test \
|
|
||||||
tests/writemask-assignop-3.shader_test
|
|
||||||
|
|
||||||
vkd3d_test_headers = \
|
vkd3d_test_headers = \
|
||||||
tests/d3d12_crosstest.h \
|
tests/d3d12_crosstest.h \
|
||||||
@@ -270,6 +278,7 @@ libvkd3d_shader_la_SOURCES = \
|
|||||||
libs/vkd3d-shader/d3d_asm.c \
|
libs/vkd3d-shader/d3d_asm.c \
|
||||||
libs/vkd3d-shader/d3dbc.c \
|
libs/vkd3d-shader/d3dbc.c \
|
||||||
libs/vkd3d-shader/dxbc.c \
|
libs/vkd3d-shader/dxbc.c \
|
||||||
|
libs/vkd3d-shader/dxil.c \
|
||||||
libs/vkd3d-shader/glsl.c \
|
libs/vkd3d-shader/glsl.c \
|
||||||
libs/vkd3d-shader/hlsl.c \
|
libs/vkd3d-shader/hlsl.c \
|
||||||
libs/vkd3d-shader/hlsl.h \
|
libs/vkd3d-shader/hlsl.h \
|
||||||
@@ -283,7 +292,7 @@ libvkd3d_shader_la_SOURCES = \
|
|||||||
libs/vkd3d-shader/vkd3d_shader_main.c \
|
libs/vkd3d-shader/vkd3d_shader_main.c \
|
||||||
libs/vkd3d-shader/vkd3d_shader_private.h
|
libs/vkd3d-shader/vkd3d_shader_private.h
|
||||||
libvkd3d_shader_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_SHADER_SOURCE -I$(srcdir)/libs/vkd3d-shader @SPIRV_TOOLS_CFLAGS@
|
libvkd3d_shader_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_SHADER_SOURCE -I$(srcdir)/libs/vkd3d-shader @SPIRV_TOOLS_CFLAGS@
|
||||||
libvkd3d_shader_la_LDFLAGS = $(AM_LDFLAGS) -version-info 7:0:6
|
libvkd3d_shader_la_LDFLAGS = $(AM_LDFLAGS) -version-info 8:0:7
|
||||||
libvkd3d_shader_la_LIBADD = libvkd3d-common.la @SPIRV_TOOLS_LIBS@ -lm
|
libvkd3d_shader_la_LIBADD = libvkd3d-common.la @SPIRV_TOOLS_LIBS@ -lm
|
||||||
if HAVE_LD_VERSION_SCRIPT
|
if HAVE_LD_VERSION_SCRIPT
|
||||||
libvkd3d_shader_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-shader/vkd3d_shader.map
|
libvkd3d_shader_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-shader/vkd3d_shader.map
|
||||||
@@ -301,8 +310,9 @@ libvkd3d_la_SOURCES = \
|
|||||||
include/private/vkd3d_common.h \
|
include/private/vkd3d_common.h \
|
||||||
include/private/vkd3d_debug.h \
|
include/private/vkd3d_debug.h \
|
||||||
include/private/vkd3d_memory.h \
|
include/private/vkd3d_memory.h \
|
||||||
include/private/vkd3d_utf8.h \
|
include/private/vkd3d_shader_utils.h \
|
||||||
include/private/vkd3d_test.h \
|
include/private/vkd3d_test.h \
|
||||||
|
include/private/vkd3d_utf8.h \
|
||||||
include/vkd3d_d3d12.idl \
|
include/vkd3d_d3d12.idl \
|
||||||
include/vkd3d_d3dcommon.idl \
|
include/vkd3d_d3dcommon.idl \
|
||||||
include/vkd3d_unknown.idl \
|
include/vkd3d_unknown.idl \
|
||||||
@@ -317,7 +327,7 @@ libvkd3d_la_SOURCES = \
|
|||||||
libs/vkd3d/vkd3d_shaders.h \
|
libs/vkd3d/vkd3d_shaders.h \
|
||||||
libs/vkd3d/vulkan_procs.h
|
libs/vkd3d/vulkan_procs.h
|
||||||
libvkd3d_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_SOURCE
|
libvkd3d_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_SOURCE
|
||||||
libvkd3d_la_LDFLAGS = $(AM_LDFLAGS) -version-info 9:0:8
|
libvkd3d_la_LDFLAGS = $(AM_LDFLAGS) -version-info 10:0:9
|
||||||
libvkd3d_la_LIBADD = libvkd3d-common.la libvkd3d-shader.la @DL_LIBS@ @PTHREAD_LIBS@
|
libvkd3d_la_LIBADD = libvkd3d-common.la libvkd3d-shader.la @DL_LIBS@ @PTHREAD_LIBS@
|
||||||
if HAVE_LD_VERSION_SCRIPT
|
if HAVE_LD_VERSION_SCRIPT
|
||||||
libvkd3d_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d/vkd3d.map
|
libvkd3d_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d/vkd3d.map
|
||||||
@@ -329,7 +339,7 @@ libvkd3d_utils_la_SOURCES = \
|
|||||||
libs/vkd3d-utils/vkd3d_utils_main.c \
|
libs/vkd3d-utils/vkd3d_utils_main.c \
|
||||||
libs/vkd3d-utils/vkd3d_utils_private.h
|
libs/vkd3d-utils/vkd3d_utils_private.h
|
||||||
libvkd3d_utils_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_UTILS_SOURCE
|
libvkd3d_utils_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_UTILS_SOURCE
|
||||||
libvkd3d_utils_la_LDFLAGS = $(AM_LDFLAGS) -version-info 4:4:3
|
libvkd3d_utils_la_LDFLAGS = $(AM_LDFLAGS) -version-info 4:5:3
|
||||||
libvkd3d_utils_la_LIBADD = libvkd3d-common.la libvkd3d-shader.la libvkd3d.la @PTHREAD_LIBS@
|
libvkd3d_utils_la_LIBADD = libvkd3d-common.la libvkd3d-shader.la libvkd3d.la @PTHREAD_LIBS@
|
||||||
if HAVE_LD_VERSION_SCRIPT
|
if HAVE_LD_VERSION_SCRIPT
|
||||||
libvkd3d_utils_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-utils/vkd3d_utils.map
|
libvkd3d_utils_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-utils/vkd3d_utils.map
|
||||||
@@ -347,11 +357,16 @@ EXTRA_DIST += \
|
|||||||
libs/vkd3d-shader/libvkd3d-shader.pc.in \
|
libs/vkd3d-shader/libvkd3d-shader.pc.in \
|
||||||
libs/vkd3d-utils/libvkd3d-utils.pc.in
|
libs/vkd3d-utils/libvkd3d-utils.pc.in
|
||||||
|
|
||||||
bin_PROGRAMS = vkd3d-compiler
|
bin_PROGRAMS = vkd3d-compiler vkd3d-dxbc
|
||||||
|
|
||||||
vkd3d_compiler_SOURCES = programs/vkd3d-compiler/main.c
|
vkd3d_compiler_SOURCES = programs/vkd3d-compiler/main.c
|
||||||
vkd3d_compiler_CFLAGS = $(AM_CFLAGS) @NCURSES_CFLAGS@
|
vkd3d_compiler_CFLAGS = $(AM_CFLAGS) @NCURSES_CFLAGS@
|
||||||
vkd3d_compiler_LDADD = libvkd3d-shader.la @NCURSES_LIBS@
|
vkd3d_compiler_LDADD = libvkd3d-shader.la @NCURSES_LIBS@
|
||||||
|
|
||||||
|
vkd3d_dxbc_SOURCES = programs/vkd3d-dxbc/main.c
|
||||||
|
vkd3d_dxbc_CFLAGS = $(AM_CFLAGS) @NCURSES_CFLAGS@
|
||||||
|
vkd3d_dxbc_LDADD = libvkd3d-shader.la @NCURSES_LIBS@
|
||||||
|
|
||||||
LDADD = libvkd3d.la libvkd3d-shader.la libvkd3d-utils.la
|
LDADD = libvkd3d.la libvkd3d-shader.la libvkd3d-utils.la
|
||||||
AM_DEFAULT_SOURCE_EXT = .c
|
AM_DEFAULT_SOURCE_EXT = .c
|
||||||
|
|
||||||
|
19
README
19
README
@@ -15,8 +15,8 @@ Vkd3d generates some of its headers from IDL files. If you are using the
|
|||||||
release tarballs, then these headers are pre-generated and are included. If
|
release tarballs, then these headers are pre-generated and are included. If
|
||||||
you are building from git, then they will be generated at build-time using
|
you are building from git, then they will be generated at build-time using
|
||||||
widl. By default, vkd3d will use the widl found in `PATH'. If widl is not
|
widl. By default, vkd3d will use the widl found in `PATH'. If widl is not
|
||||||
available or is not recent (>= 3.20), then you can build Wine with `make
|
available or is not recent (>= 3.21), then you can build Wine with `make
|
||||||
tools/widl' to avoid building all of Wine. You can then point vkd3d's
|
tools/widl/widl' to avoid building all of Wine. You can then point vkd3d's
|
||||||
configure at that widl binary with `WIDL="/path/to/widl"'.
|
configure at that widl binary with `WIDL="/path/to/widl"'.
|
||||||
|
|
||||||
For release builds, you may want to define NDEBUG. If you do not need debug log
|
For release builds, you may want to define NDEBUG. If you do not need debug log
|
||||||
@@ -47,8 +47,8 @@ commas or semicolons.
|
|||||||
|
|
||||||
* NO_COLOR - this is an alias of NO_COLOUR.
|
* NO_COLOR - this is an alias of NO_COLOUR.
|
||||||
|
|
||||||
* NO_COLOUR - when set, vkd3d-compiler will default to monochrome output,
|
* NO_COLOUR - when set, vkd3d-compiler and vkd3d-dxbc will default to
|
||||||
even when the output supports colour.
|
monochrome output, even when the output supports colour.
|
||||||
|
|
||||||
* VKD3D_CONFIG - a list of options that change the behavior of libvkd3d.
|
* VKD3D_CONFIG - a list of options that change the behavior of libvkd3d.
|
||||||
* virtual_heaps - Create descriptors for each D3D12 root signature
|
* virtual_heaps - Create descriptors for each D3D12 root signature
|
||||||
@@ -82,3 +82,14 @@ commas or semicolons.
|
|||||||
conditions in tests.
|
conditions in tests.
|
||||||
|
|
||||||
* VKD3D_TEST_BUG - set to 0 to disable bug_if() conditions in tests.
|
* VKD3D_TEST_BUG - set to 0 to disable bug_if() conditions in tests.
|
||||||
|
|
||||||
|
================
|
||||||
|
Developing vkd3d
|
||||||
|
================
|
||||||
|
|
||||||
|
Development of vkd3d happens on the Wine GitLab instance
|
||||||
|
(https://gitlab.winehq.org/wine/vkd3d/). Contributors are encouraged
|
||||||
|
to submit their patches using the merge request tool.
|
||||||
|
|
||||||
|
Each merge request is automatically tested with the GitLab CI
|
||||||
|
system. See gitlab/README in the Git tree for more details.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
AC_PREREQ([2.69])
|
AC_PREREQ([2.69])
|
||||||
AC_INIT([vkd3d],[1.8])
|
AC_INIT([vkd3d],[1.9])
|
||||||
|
|
||||||
AC_CONFIG_AUX_DIR([bin])
|
AC_CONFIG_AUX_DIR([bin])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
@@ -27,7 +27,7 @@ AC_PROG_CC
|
|||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
AC_PROG_SED
|
AC_PROG_SED
|
||||||
AC_PROG_MKDIR_P
|
AC_PROG_MKDIR_P
|
||||||
VKD3D_PROG_WIDL(3, 20)
|
VKD3D_PROG_WIDL(3, 21)
|
||||||
AS_IF([test "x$WIDL" = "xno"], [AC_MSG_WARN([widl is required to build header files.])])
|
AS_IF([test "x$WIDL" = "xno"], [AC_MSG_WARN([widl is required to build header files.])])
|
||||||
|
|
||||||
AC_CHECK_PROGS([FLEX], [flex], [none])
|
AC_CHECK_PROGS([FLEX], [flex], [none])
|
||||||
@@ -143,7 +143,8 @@ VKD3D_CHECK_FUNC([HAVE_BUILTIN_ADD_OVERFLOW], [__builtin_add_overflow], [__built
|
|||||||
VKD3D_CHECK_FUNC([HAVE_SYNC_ADD_AND_FETCH], [__sync_add_and_fetch], [__sync_add_and_fetch((int *)0, 0)])
|
VKD3D_CHECK_FUNC([HAVE_SYNC_ADD_AND_FETCH], [__sync_add_and_fetch], [__sync_add_and_fetch((int *)0, 0)])
|
||||||
VKD3D_CHECK_FUNC([HAVE_SYNC_SUB_AND_FETCH], [__sync_sub_and_fetch], [__sync_sub_and_fetch((int *)0, 0)])
|
VKD3D_CHECK_FUNC([HAVE_SYNC_SUB_AND_FETCH], [__sync_sub_and_fetch], [__sync_sub_and_fetch((int *)0, 0)])
|
||||||
VKD3D_CHECK_FUNC([HAVE_SYNC_BOOL_COMPARE_AND_SWAP], [__sync_bool_compare_and_swap], [__sync_bool_compare_and_swap((int *)0, 0, 0)])
|
VKD3D_CHECK_FUNC([HAVE_SYNC_BOOL_COMPARE_AND_SWAP], [__sync_bool_compare_and_swap], [__sync_bool_compare_and_swap((int *)0, 0, 0)])
|
||||||
VKD3D_CHECK_FUNC([HAVE_ATOMIC_EXCHANGE_N], [__atomic_exchange_n], [__atomic_exchange_n((int *)0, 0)])
|
VKD3D_CHECK_FUNC([HAVE_ATOMIC_EXCHANGE_N], [__atomic_exchange_n], [__atomic_exchange_n((int *)0, 0, 0)])
|
||||||
|
VKD3D_CHECK_FUNC([HAVE_GETTID], [gettid], [gettid()])
|
||||||
|
|
||||||
dnl Makefiles
|
dnl Makefiles
|
||||||
case $host_os in
|
case $host_os in
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#define VK_NO_PROTOTYPES
|
#define VK_NO_PROTOTYPES
|
||||||
#define VK_USE_PLATFORM_XCB_KHR
|
#define VK_USE_PLATFORM_XCB_KHR
|
||||||
#define VKD3D_UTILS_API_VERSION VKD3D_API_VERSION_1_8
|
#define VKD3D_UTILS_API_VERSION VKD3D_API_VERSION_1_9
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <vkd3d.h>
|
#include <vkd3d.h>
|
||||||
#include <vkd3d_utils.h>
|
#include <vkd3d_utils.h>
|
||||||
@@ -113,6 +113,9 @@ struct demo_swapchain
|
|||||||
VkDevice vk_device;
|
VkDevice vk_device;
|
||||||
ID3D12CommandQueue *command_queue;
|
ID3D12CommandQueue *command_queue;
|
||||||
|
|
||||||
|
ID3D12Fence *present_fence;
|
||||||
|
unsigned long long present_count;
|
||||||
|
|
||||||
uint32_t current_buffer;
|
uint32_t current_buffer;
|
||||||
unsigned int buffer_count;
|
unsigned int buffer_count;
|
||||||
ID3D12Resource *buffers[1];
|
ID3D12Resource *buffers[1];
|
||||||
@@ -529,6 +532,17 @@ static inline struct demo_swapchain *demo_swapchain_create(ID3D12CommandQueue *c
|
|||||||
}
|
}
|
||||||
swapchain->buffer_count = image_count;
|
swapchain->buffer_count = image_count;
|
||||||
free(vk_images);
|
free(vk_images);
|
||||||
|
|
||||||
|
if (FAILED(ID3D12Device_CreateFence(d3d12_device, 0, 0, &IID_ID3D12Fence, (void **)&swapchain->present_fence)))
|
||||||
|
{
|
||||||
|
for (i = 0; i < image_count; ++i)
|
||||||
|
{
|
||||||
|
ID3D12Resource_Release(swapchain->buffers[i]);
|
||||||
|
}
|
||||||
|
free(swapchain);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
swapchain->present_count = 0;
|
||||||
ID3D12Device_Release(d3d12_device);
|
ID3D12Device_Release(d3d12_device);
|
||||||
|
|
||||||
ID3D12CommandQueue_AddRef(swapchain->command_queue = command_queue);
|
ID3D12CommandQueue_AddRef(swapchain->command_queue = command_queue);
|
||||||
@@ -574,6 +588,12 @@ static inline void demo_swapchain_present(struct demo_swapchain *swapchain)
|
|||||||
present_desc.pImageIndices = &swapchain->current_buffer;
|
present_desc.pImageIndices = &swapchain->current_buffer;
|
||||||
present_desc.pResults = NULL;
|
present_desc.pResults = NULL;
|
||||||
|
|
||||||
|
/* Synchronize vkd3d_acquire_vk_queue() with the Direct3D 12 work
|
||||||
|
* already submitted to the command queue. */
|
||||||
|
++swapchain->present_count;
|
||||||
|
ID3D12CommandQueue_Signal(swapchain->command_queue, swapchain->present_fence, swapchain->present_count);
|
||||||
|
ID3D12Fence_SetEventOnCompletion(swapchain->present_fence, swapchain->present_count, NULL);
|
||||||
|
|
||||||
vk_queue = vkd3d_acquire_vk_queue(swapchain->command_queue);
|
vk_queue = vkd3d_acquire_vk_queue(swapchain->command_queue);
|
||||||
vkQueuePresentKHR(vk_queue, &present_desc);
|
vkQueuePresentKHR(vk_queue, &present_desc);
|
||||||
vkd3d_release_vk_queue(swapchain->command_queue);
|
vkd3d_release_vk_queue(swapchain->command_queue);
|
||||||
@@ -589,6 +609,7 @@ static inline void demo_swapchain_destroy(struct demo_swapchain *swapchain)
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
ID3D12CommandQueue_Release(swapchain->command_queue);
|
ID3D12CommandQueue_Release(swapchain->command_queue);
|
||||||
|
ID3D12Fence_Release(swapchain->present_fence);
|
||||||
for (i = 0; i < swapchain->buffer_count; ++i)
|
for (i = 0; i < swapchain->buffer_count; ++i)
|
||||||
{
|
{
|
||||||
ID3D12Resource_Release(swapchain->buffers[i]);
|
ID3D12Resource_Release(swapchain->buffers[i]);
|
||||||
|
51
gitlab/README
Normal file
51
gitlab/README
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
=====================
|
||||||
|
vkd3d testing scripts
|
||||||
|
=====================
|
||||||
|
|
||||||
|
These scripts are used by the GitLab CI feature to automatically run
|
||||||
|
the vkd3d tests on each merge request.
|
||||||
|
|
||||||
|
The CI target build-image, in the file image.yml, builds a Docker
|
||||||
|
image based on Debian bookworm with all the packages required for
|
||||||
|
testing, and uploads it to the GitLab container registry. The Docker
|
||||||
|
script is in the file image.docker.
|
||||||
|
|
||||||
|
The file build.yml contains the actual testing targets. Currently
|
||||||
|
vkd3d is tested on Linux, on x86-64 and i386, each architecture with
|
||||||
|
two different Vulkan drivers (both from Mesa): llvmpipe (a software
|
||||||
|
implementation) and RADV (a hardware implementation backed by an AMD
|
||||||
|
GPU); and on macOS, on Intel, using MoltenVK as Vulkan driver. The
|
||||||
|
testing logs are available as CI artifacts.
|
||||||
|
|
||||||
|
Some custom runner configuration is required in order to run the tests
|
||||||
|
on an AMD GPU. Specifically, a runner tagged with `amd-gpu' must be
|
||||||
|
available with the following features:
|
||||||
|
|
||||||
|
* of course a sufficiently recent AMD GPU must be available to the
|
||||||
|
host;
|
||||||
|
|
||||||
|
* the host kernel must have the appropriate driver and firmware
|
||||||
|
installed;
|
||||||
|
|
||||||
|
* the runner must forward the DRI nodes to the guest; this can be
|
||||||
|
configured by adding the line
|
||||||
|
|
||||||
|
devices = ["/dev/dri"]
|
||||||
|
|
||||||
|
to the relevant [runners.docker] section in the config.toml file;
|
||||||
|
|
||||||
|
* the DRI render nodes must be readable and writable by GID 800,
|
||||||
|
either because they belong to that group (e.g. because the group
|
||||||
|
`render', which typically owns those files, has GID 800) or via a
|
||||||
|
FS ACL; such stipulation is needed because in Debian group `render'
|
||||||
|
is created dynamically, therefore has no predictable GID: the use
|
||||||
|
of a fixed GID enables the guest system to be set up so that the
|
||||||
|
user running the tests can access the render nodes.
|
||||||
|
|
||||||
|
A runner on an Intel macOS system tagged with `mac' must also be
|
||||||
|
available to run the macOS tests. Unfortunately a system like Docker
|
||||||
|
is not available in this case to provide an isolated standard
|
||||||
|
environment for running the tests. All the software required to
|
||||||
|
compile and run the tests will therefore have to be installed directly
|
||||||
|
on the host system. Complete instructions to setup the macOS are
|
||||||
|
currently not available.
|
19
gitlab/build-linux
Executable file
19
gitlab/build-linux
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "Building $(git log -1)"
|
||||||
|
echo "---"
|
||||||
|
|
||||||
|
COMMIT=$(git rev-parse --short HEAD)
|
||||||
|
|
||||||
|
set -Eeuxo pipefail
|
||||||
|
|
||||||
|
./autogen.sh
|
||||||
|
rm -fr build
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
../configure --enable-demos && make -j$(nproc) && make -j$(nproc) crosstest && make -j$(nproc) check || touch ../pipeline_failed
|
||||||
|
|
||||||
|
mkdir -p ../artifacts/$COMMIT
|
||||||
|
rsync -Rr doc/* tests/*.exe test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT
|
||||||
|
|
||||||
|
git reset --hard
|
19
gitlab/build-mac
Executable file
19
gitlab/build-mac
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "Building $(git log -1)"
|
||||||
|
echo "---"
|
||||||
|
|
||||||
|
COMMIT=$(git rev-parse --short HEAD)
|
||||||
|
|
||||||
|
set -Eeuxo pipefail
|
||||||
|
|
||||||
|
./autogen.sh
|
||||||
|
rm -fr build
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
../configure && make -j$(sysctl -n hw.ncpu) && make -j$(sysctl -n hw.ncpu) crosstest && make -j$(sysctl -n hw.ncpu) check || touch ../pipeline_failed
|
||||||
|
|
||||||
|
mkdir -p ../artifacts/$COMMIT
|
||||||
|
rsync -Rr tests/*.exe test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT
|
||||||
|
|
||||||
|
git reset --hard
|
93
gitlab/build.yml
Normal file
93
gitlab/build.yml
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
.build-linux:
|
||||||
|
stage: build
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||||
|
image: $CI_REGISTRY/wine/vkd3d:debian-bookworm
|
||||||
|
interruptible: true
|
||||||
|
needs:
|
||||||
|
- job: build-image
|
||||||
|
optional: true
|
||||||
|
dependencies: []
|
||||||
|
script:
|
||||||
|
- git config --global --add safe.directory $CI_PROJECT_DIR
|
||||||
|
- git clean -fdx
|
||||||
|
- git reset --hard
|
||||||
|
- rm -fr .git/rebase-merge
|
||||||
|
- mkdir artifacts
|
||||||
|
- cat /proc/cpuinfo > artifacts/cpuinfo.txt
|
||||||
|
- cat /proc/meminfo > artifacts/meminfo.txt
|
||||||
|
- vulkaninfo > artifacts/vulkaninfo.txt
|
||||||
|
- git rebase $CI_MERGE_REQUEST_DIFF_BASE_SHA --exec ./gitlab/build-linux
|
||||||
|
- if [ -f pipeline_failed ] ; then exit 1 ; fi
|
||||||
|
artifacts:
|
||||||
|
when: always
|
||||||
|
paths:
|
||||||
|
- artifacts
|
||||||
|
|
||||||
|
build-radv-64:
|
||||||
|
extends: .build-linux
|
||||||
|
tags:
|
||||||
|
- amd-gpu
|
||||||
|
variables:
|
||||||
|
VK_LOADER_DRIVERS_SELECT: 'radeon_*'
|
||||||
|
|
||||||
|
build-llvmpipe-64:
|
||||||
|
extends: .build-linux
|
||||||
|
allow_failure: true
|
||||||
|
variables:
|
||||||
|
VK_LOADER_DRIVERS_SELECT: 'lvp_*'
|
||||||
|
|
||||||
|
build-radv-32:
|
||||||
|
extends: .build-linux
|
||||||
|
tags:
|
||||||
|
- amd-gpu
|
||||||
|
variables:
|
||||||
|
VK_LOADER_DRIVERS_SELECT: 'radeon_*'
|
||||||
|
CC: 'gcc -m32'
|
||||||
|
|
||||||
|
build-llvmpipe-32:
|
||||||
|
extends: .build-linux
|
||||||
|
allow_failure: true
|
||||||
|
variables:
|
||||||
|
VK_LOADER_DRIVERS_SELECT: 'lvp_*'
|
||||||
|
CC: 'gcc -m32'
|
||||||
|
|
||||||
|
build-mac:
|
||||||
|
stage: build
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||||
|
allow_failure: true
|
||||||
|
interruptible: true
|
||||||
|
needs: []
|
||||||
|
dependencies: []
|
||||||
|
tags:
|
||||||
|
- mac
|
||||||
|
script:
|
||||||
|
- git config --global --add safe.directory $CI_PROJECT_DIR
|
||||||
|
- git clean -fdx
|
||||||
|
- git reset --hard
|
||||||
|
- rm -fr .git/rebase-merge
|
||||||
|
# We use a custom ICD which is not marked as a portability driver,
|
||||||
|
# so that test programs are not confused.
|
||||||
|
- ./gitlab/patch_moltenvk_icd.sh
|
||||||
|
- export VK_DRIVER_FILES="$PWD/gitlab/MoltenVK_icd.json"
|
||||||
|
- mkdir artifacts
|
||||||
|
- system_profiler SPSoftwareDataType SPHardwareDataType > artifacts/systeminfo.txt
|
||||||
|
- vulkaninfo > artifacts/vulkaninfo.txt
|
||||||
|
- export PATH="/usr/local/opt/bison/bin:/usr/local/opt/flex/bin:$PATH"
|
||||||
|
- git clone --depth 1 --branch wine-3.21 https://gitlab.winehq.org/wine/wine.git
|
||||||
|
- cd wine
|
||||||
|
- mkdir build
|
||||||
|
- cd build
|
||||||
|
- ../configure --enable-win64 --without-x --without-freetype
|
||||||
|
- make tools/widl/widl
|
||||||
|
- cd ../..
|
||||||
|
- export PATH="$PWD/wine/build/tools/widl:$PATH"
|
||||||
|
- git rebase $CI_MERGE_REQUEST_DIFF_BASE_SHA --exec ./gitlab/build-mac
|
||||||
|
- if [ -f pipeline_failed ] ; then exit 1 ; fi
|
||||||
|
variables:
|
||||||
|
VKD3D_DISABLE_EXTENSIONS: "VK_EXT_descriptor_indexing"
|
||||||
|
artifacts:
|
||||||
|
when: always
|
||||||
|
paths:
|
||||||
|
- artifacts
|
41
gitlab/image.docker
Normal file
41
gitlab/image.docker
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# FROM line will be added dynamically
|
||||||
|
|
||||||
|
WORKDIR /tmp
|
||||||
|
|
||||||
|
RUN export DEBIAN_FRONTEND=noninteractive; \
|
||||||
|
echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
|
||||||
|
echo 'path-exclude=/usr/share/locale/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
|
||||||
|
echo 'path-exclude=/usr/share/man/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
|
||||||
|
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf && \
|
||||||
|
echo '#!/bin/sh' > /usr/sbin/policy-rc.d && \
|
||||||
|
echo 'exit 101' >> /usr/sbin/policy-rc.d && \
|
||||||
|
chmod +x /usr/sbin/policy-rc.d && \
|
||||||
|
dpkg --add-architecture i386 && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get dist-upgrade -y && \
|
||||||
|
apt-get install -y build-essential pkg-config gcc-multilib gcc-mingw-w64 \
|
||||||
|
autoconf automake libtool flex bison \
|
||||||
|
git ca-certificates rsync \
|
||||||
|
doxygen doxygen-latex graphviz \
|
||||||
|
mesa-vulkan-drivers mesa-vulkan-drivers:i386 \
|
||||||
|
vulkan-tools spirv-headers \
|
||||||
|
libvulkan-dev libvulkan-dev:i386 \
|
||||||
|
libncurses-dev libncurses-dev:i386 \
|
||||||
|
libxcb1-dev libxcb1-dev:i386 \
|
||||||
|
libxcb-util-dev libxcb-util-dev:i386 \
|
||||||
|
libxcb-icccm4-dev libxcb-icccm4-dev:i386 \
|
||||||
|
libxcb-keysyms1-dev libxcb-keysyms1-dev:i386 && \
|
||||||
|
git clone --depth 1 --branch wine-3.21 https://gitlab.winehq.org/wine/wine.git && \
|
||||||
|
cd wine && \
|
||||||
|
mkdir build && \
|
||||||
|
cd build && \
|
||||||
|
../configure --without-x --without-freetype && \
|
||||||
|
make tools/widl/widl && \
|
||||||
|
cp tools/widl/widl /usr/local/bin && \
|
||||||
|
cd ../.. && \
|
||||||
|
rm -rf wine && \
|
||||||
|
apt-get clean && \
|
||||||
|
groupadd host-render -g 800 && \
|
||||||
|
useradd -m gitlab -G host-render
|
||||||
|
|
||||||
|
USER gitlab
|
20
gitlab/image.yml
Normal file
20
gitlab/image.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
build-image:
|
||||||
|
stage: image
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == 'push' && $CI_PROJECT_PATH == "wine/vkd3d" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
|
changes:
|
||||||
|
- .gitlab-ci.yml
|
||||||
|
- gitlab/image.yml
|
||||||
|
- gitlab/image.docker
|
||||||
|
image:
|
||||||
|
name: gcr.io/kaniko-project/executor:debug
|
||||||
|
entrypoint: [""]
|
||||||
|
variables:
|
||||||
|
IMAGE_SOURCE: "$CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX/debian:bookworm"
|
||||||
|
IMAGE_LOCAL: "$CI_REGISTRY_IMAGE:debian-bookworm"
|
||||||
|
DOCKER_FILE: "$CI_PROJECT_DIR/gitlab/image.docker"
|
||||||
|
script:
|
||||||
|
- mkdir -p /kaniko/.docker
|
||||||
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"},\"$CI_DEPENDENCY_PROXY_SERVER\":{\"auth\":\"$(printf "%s:%s" "$CI_DEPENDENCY_PROXY_USER" "$CI_DEPENDENCY_PROXY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
|
||||||
|
- sed -i "1iFROM $IMAGE_SOURCE" "$DOCKER_FILE"
|
||||||
|
- /kaniko/executor --context "$CI_PROJECT_DIR" --dockerfile "$DOCKER_FILE" --destination "$IMAGE_LOCAL"
|
12
gitlab/patch_moltenvk_icd.sh
Executable file
12
gitlab/patch_moltenvk_icd.sh
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
BASE_PATH="/usr/local/opt/molten-vk/share/vulkan/icd.d"
|
||||||
|
|
||||||
|
cp "$BASE_PATH/MoltenVK_icd.json" gitlab/MoltenVK_icd.json
|
||||||
|
|
||||||
|
# The driver path is relative
|
||||||
|
sed -i -e 's|"library_path" *: "|"library_path" : "'"$BASE_PATH/"'|g' gitlab/MoltenVK_icd.json
|
||||||
|
|
||||||
|
# We pretend this is not a portability driver, otherwise vkd3d won't
|
||||||
|
# find it
|
||||||
|
sed -i -e 's|"is_portability_driver" *: *true|"is_portability_driver" : false|g' gitlab/MoltenVK_icd.json
|
@@ -20,6 +20,7 @@
|
|||||||
#define __VKD3D_COMMON_H
|
#define __VKD3D_COMMON_H
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include "vkd3d_windows.h"
|
#include "vkd3d_windows.h"
|
||||||
#include "vkd3d_types.h"
|
#include "vkd3d_types.h"
|
||||||
|
|
||||||
@@ -28,6 +29,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
@@ -171,6 +173,11 @@ static inline bool vkd3d_bound_range(size_t start, size_t count, size_t limit)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool vkd3d_object_range_overflow(size_t start, size_t count, size_t size)
|
||||||
|
{
|
||||||
|
return (~(size_t)0 - start) / size < count;
|
||||||
|
}
|
||||||
|
|
||||||
static inline uint16_t vkd3d_make_u16(uint8_t low, uint8_t high)
|
static inline uint16_t vkd3d_make_u16(uint8_t low, uint8_t high)
|
||||||
{
|
{
|
||||||
return low | ((uint16_t)high << 8);
|
return low | ((uint16_t)high << 8);
|
||||||
@@ -186,6 +193,21 @@ static inline int vkd3d_u32_compare(uint32_t x, uint32_t y)
|
|||||||
return (x > y) - (x < y);
|
return (x > y) - (x < y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool bitmap_clear(uint32_t *map, unsigned int idx)
|
||||||
|
{
|
||||||
|
return map[idx >> 5] &= ~(1u << (idx & 0x1f));
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool bitmap_set(uint32_t *map, unsigned int idx)
|
||||||
|
{
|
||||||
|
return map[idx >> 5] |= (1u << (idx & 0x1f));
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool bitmap_is_set(const uint32_t *map, unsigned int idx)
|
||||||
|
{
|
||||||
|
return map[idx >> 5] & (1u << (idx & 0x1f));
|
||||||
|
}
|
||||||
|
|
||||||
static inline int ascii_isupper(int c)
|
static inline int ascii_isupper(int c)
|
||||||
{
|
{
|
||||||
return 'A' <= c && c <= 'Z';
|
return 'A' <= c && c <= 'Z';
|
||||||
|
67
include/private/vkd3d_shader_utils.h
Normal file
67
include/private/vkd3d_shader_utils.h
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2023 Conor McCarthy for CodeWeavers
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __VKD3D_SHADER_UTILS_H
|
||||||
|
#define __VKD3D_SHADER_UTILS_H
|
||||||
|
|
||||||
|
#include "vkd3d_shader.h"
|
||||||
|
|
||||||
|
#define TAG_DXIL VKD3D_MAKE_TAG('D', 'X', 'I', 'L')
|
||||||
|
#define TAG_SHDR VKD3D_MAKE_TAG('S', 'H', 'D', 'R')
|
||||||
|
#define TAG_SHEX VKD3D_MAKE_TAG('S', 'H', 'E', 'X')
|
||||||
|
|
||||||
|
static inline enum vkd3d_result vkd3d_shader_parse_dxbc_source_type(const struct vkd3d_shader_code *dxbc,
|
||||||
|
enum vkd3d_shader_source_type *type, char **messages)
|
||||||
|
{
|
||||||
|
struct vkd3d_shader_dxbc_desc desc;
|
||||||
|
enum vkd3d_result ret;
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
|
*type = VKD3D_SHADER_SOURCE_NONE;
|
||||||
|
|
||||||
|
if ((ret = vkd3d_shader_parse_dxbc(dxbc, 0, &desc, messages)) < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
for (i = 0; i < desc.section_count; ++i)
|
||||||
|
{
|
||||||
|
uint32_t tag = desc.sections[i].tag;
|
||||||
|
if (tag == TAG_SHDR || tag == TAG_SHEX)
|
||||||
|
{
|
||||||
|
*type = VKD3D_SHADER_SOURCE_DXBC_TPF;
|
||||||
|
#ifndef VKD3D_SHADER_UNSUPPORTED_DXIL
|
||||||
|
break;
|
||||||
|
#else
|
||||||
|
}
|
||||||
|
else if (tag == TAG_DXIL)
|
||||||
|
{
|
||||||
|
*type = VKD3D_SHADER_SOURCE_DXBC_DXIL;
|
||||||
|
/* Default to DXIL if both are present. */
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vkd3d_shader_free_dxbc(&desc);
|
||||||
|
|
||||||
|
if (*type == VKD3D_SHADER_SOURCE_NONE)
|
||||||
|
return VKD3D_ERROR_INVALID_SHADER;
|
||||||
|
|
||||||
|
return VKD3D_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* __VKD3D_SHADER_UTILS_H */
|
@@ -77,6 +77,7 @@ enum vkd3d_api_version
|
|||||||
VKD3D_API_VERSION_1_6,
|
VKD3D_API_VERSION_1_6,
|
||||||
VKD3D_API_VERSION_1_7,
|
VKD3D_API_VERSION_1_7,
|
||||||
VKD3D_API_VERSION_1_8,
|
VKD3D_API_VERSION_1_8,
|
||||||
|
VKD3D_API_VERSION_1_9,
|
||||||
|
|
||||||
VKD3D_FORCE_32_BIT_ENUM(VKD3D_API_VERSION),
|
VKD3D_FORCE_32_BIT_ENUM(VKD3D_API_VERSION),
|
||||||
};
|
};
|
||||||
@@ -207,7 +208,42 @@ VKD3D_API VkPhysicalDevice vkd3d_get_vk_physical_device(ID3D12Device *device);
|
|||||||
VKD3D_API struct vkd3d_instance *vkd3d_instance_from_device(ID3D12Device *device);
|
VKD3D_API struct vkd3d_instance *vkd3d_instance_from_device(ID3D12Device *device);
|
||||||
|
|
||||||
VKD3D_API uint32_t vkd3d_get_vk_queue_family_index(ID3D12CommandQueue *queue);
|
VKD3D_API uint32_t vkd3d_get_vk_queue_family_index(ID3D12CommandQueue *queue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Acquire the Vulkan queue backing a command queue.
|
||||||
|
*
|
||||||
|
* While a queue is acquired by the client, it is locked so that
|
||||||
|
* neither the vkd3d library nor other threads can submit work to
|
||||||
|
* it. For that reason it should be released as soon as possible with
|
||||||
|
* vkd3d_release_vk_queue(). The lock is not reentrant, so the same
|
||||||
|
* queue must not be acquired more than once by the same thread.
|
||||||
|
*
|
||||||
|
* Work submitted through the Direct3D 12 API exposed by vkd3d is not
|
||||||
|
* always immediately submitted to the Vulkan queue; sometimes it is
|
||||||
|
* kept in another internal queue, which might not necessarily be
|
||||||
|
* empty at the time vkd3d_acquire_vk_queue() is called. For this
|
||||||
|
* reason, work submitted directly to the Vulkan queue might appear to
|
||||||
|
* the Vulkan driver as being submitted before other work submitted
|
||||||
|
* though the Direct3D 12 API. If this is not desired, it is
|
||||||
|
* recommended to synchronize work submission using an ID3D12Fence
|
||||||
|
* object, by submitting to the queue a signal operation after all the
|
||||||
|
* Direct3D 12 work is submitted and waiting for it before calling
|
||||||
|
* vkd3d_acquire_vk_queue().
|
||||||
|
*
|
||||||
|
* \since 1.0
|
||||||
|
*/
|
||||||
VKD3D_API VkQueue vkd3d_acquire_vk_queue(ID3D12CommandQueue *queue);
|
VKD3D_API VkQueue vkd3d_acquire_vk_queue(ID3D12CommandQueue *queue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Release the Vulkan queue backing a command queue.
|
||||||
|
*
|
||||||
|
* This must be paired to an earlier corresponding
|
||||||
|
* vkd3d_acquire_vk_queue(). After this function is called, the Vulkan
|
||||||
|
* queue returned by vkd3d_acquire_vk_queue() must not be used any
|
||||||
|
* more.
|
||||||
|
*
|
||||||
|
* \since 1.0
|
||||||
|
*/
|
||||||
VKD3D_API void vkd3d_release_vk_queue(ID3D12CommandQueue *queue);
|
VKD3D_API void vkd3d_release_vk_queue(ID3D12CommandQueue *queue);
|
||||||
|
|
||||||
VKD3D_API HRESULT vkd3d_create_image_resource(ID3D12Device *device,
|
VKD3D_API HRESULT vkd3d_create_image_resource(ID3D12Device *device,
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -21,6 +21,92 @@ import "vkd3d_windows.h";
|
|||||||
|
|
||||||
#include "vkd3d_unknown.idl"
|
#include "vkd3d_unknown.idl"
|
||||||
|
|
||||||
|
typedef enum D3D_PRIMITIVE
|
||||||
|
{
|
||||||
|
D3D_PRIMITIVE_UNDEFINED,
|
||||||
|
D3D_PRIMITIVE_POINT,
|
||||||
|
D3D_PRIMITIVE_LINE,
|
||||||
|
D3D_PRIMITIVE_TRIANGLE,
|
||||||
|
D3D_PRIMITIVE_LINE_ADJ = 6,
|
||||||
|
D3D_PRIMITIVE_TRIANGLE_ADJ,
|
||||||
|
D3D_PRIMITIVE_1_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_2_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_3_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_4_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_5_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_6_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_7_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_8_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_9_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_10_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_11_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_12_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_13_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_14_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_15_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_16_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_17_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_18_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_19_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_20_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_21_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_22_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_23_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_24_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_25_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_26_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_27_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_28_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_29_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_30_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_31_CONTROL_POINT_PATCH,
|
||||||
|
D3D_PRIMITIVE_32_CONTROL_POINT_PATCH,
|
||||||
|
D3D10_PRIMITIVE_UNDEFINED = 0,
|
||||||
|
D3D10_PRIMITIVE_POINT,
|
||||||
|
D3D10_PRIMITIVE_LINE,
|
||||||
|
D3D10_PRIMITIVE_TRIANGLE,
|
||||||
|
D3D10_PRIMITIVE_LINE_ADJ = 6,
|
||||||
|
D3D10_PRIMITIVE_TRIANGLE_ADJ,
|
||||||
|
D3D11_PRIMITIVE_UNDEFINED = 0,
|
||||||
|
D3D11_PRIMITIVE_POINT,
|
||||||
|
D3D11_PRIMITIVE_LINE,
|
||||||
|
D3D11_PRIMITIVE_TRIANGLE,
|
||||||
|
D3D11_PRIMITIVE_LINE_ADJ = 6,
|
||||||
|
D3D11_PRIMITIVE_TRIANGLE_ADJ,
|
||||||
|
D3D11_PRIMITIVE_1_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_2_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_3_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_4_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_5_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_6_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_7_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_8_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_9_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_10_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_11_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_12_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_13_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_14_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_15_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_16_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_17_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_18_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_19_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_20_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_21_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_22_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_23_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_24_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_25_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_26_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_27_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_28_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_29_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_30_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_31_CONTROL_POINT_PATCH,
|
||||||
|
D3D11_PRIMITIVE_32_CONTROL_POINT_PATCH,
|
||||||
|
} D3D_PRIMITIVE;
|
||||||
|
|
||||||
typedef enum D3D_PRIMITIVE_TOPOLOGY
|
typedef enum D3D_PRIMITIVE_TOPOLOGY
|
||||||
{
|
{
|
||||||
D3D_PRIMITIVE_TOPOLOGY_UNDEFINED = 0,
|
D3D_PRIMITIVE_TOPOLOGY_UNDEFINED = 0,
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user