3 Commits

Author SHA1 Message Date
Giovanni Mascellani
154acd2c2b Release 1.7.1. 2023-05-03 21:46:28 +02:00
Henri Verbeet
cb2acc35f2 vkd3d-utils: Export D3D12CreateDevice() once again.
Commit d27fee64ab inadvertently stopped
exporting D3D12CreateDevice().
2023-05-03 21:46:27 +02:00
Conor McCarthy
7b9b0179ec vkd3d: Leave the command queue op mutex locked after a partial flush.
All return paths in d3d12_command_queue_flush_ops_locked() must
leave the op mutex locked.
2023-05-03 21:46:25 +02:00
255 changed files with 14156 additions and 46903 deletions

2
.gitignore vendored
View File

@@ -10,7 +10,6 @@ Makefile
Makefile.in
test-suite.log
/vkd3d-compiler
/vkd3d-dxbc
vkd3d-*.tar.xz
@@ -23,7 +22,6 @@ vkd3d-*.tar.xz
*.tab.c
*.tab.h
*.trs
*.txt
*.yy.c
*~

View File

@@ -1,11 +0,0 @@
stages:
- image
- build
- test
- deploy
include:
- local: "/gitlab/image.yml"
- local: "/gitlab/build.yml"
- local: "/gitlab/test.yml"
- local: "/gitlab/release.yml"

155
ANNOUNCE
View File

@@ -1,155 +1,36 @@
The Wine team is proud to announce that release 1.10 of vkd3d, the Direct3D to
The Wine team is proud to announce that release 1.7.1 of vkd3d, the Direct3D to
Vulkan translation library, is now available.
This release contains improvements that are listed in the release notes below.
The main highlights are:
- libvkd3d exposes various newer Direct3D 12 interfaces.
- The HLSL compiler supports dynamic indexing of arrays.
- libvkd3d-utils implements various helper functions for manipulating DXBC
blobs.
- Miscellaneous bug fixes.
This is a bugfix release, only containing targeted fixes for a couple
of defects that had slipped in in vkd3d 1.7.
The source is available from the following location:
<https://dl.winehq.org/vkd3d/source/vkd3d-1.10.tar.xz>
https://dl.winehq.org/vkd3d/source/vkd3d-1.7.1.tar.xz
The current source can also be pulled directly from the git repository:
<https://gitlab.winehq.org/wine/vkd3d.git>
https://gitlab.winehq.org/wine/vkd3d.git
Vkd3d is available thanks to the work of multiple people. See the file AUTHORS
for the complete list.
# What's new in vkd3d 1.10
----------------------------------------------------------------
### libvkd3d
What's new in vkd3d 1.7.1
=========================
- Creating pipeline state objects from pipeline state stream descriptions is
implemented.
- Depth-bounds testing is implemented.
- When the VK\_KHR\_maintenance2 extension is available, libvkd3d will
explicitly specify the usage flags of Vulkan image views. This is
particularly useful on MoltenVK, where 2D-array views of 3D textures are
subject to usage restrictions.
- The D3D12\_FORMAT\_SUPPORT2\_UAV\_TYPED\_LOAD and/or
D3D12\_FORMAT\_SUPPORT2\_UAV\_TYPED\_STORE feature flags are reported for
UAV formats when the shaderStorageImageReadWithoutFormat and/or
shaderStorageImageWriteWithoutFormat Vulkan device features are
supported.
- The ID3D12Device5 interface is supported.
- The ID3D12GraphicsCommandList5 interface is supported.
- The ID3D12Resource1 interface is supported.
### libvkd3d-shader
*** libvkd3d
- New features for the HLSL source type:
- Support for the following intrinsic functions:
- ceil()
- degrees() and radians()
- fwidth()
- tan()
- tex2Dlod(), tex2Dproj(), texCUBEproj(), and tex3Dproj()
- Constant folding support for more expression types. In particular:
- ternary operators and branches
- reciprocal square roots
- exponentials
- logical not on booleans
- bitwise complements
- left/right shifts
- ceil(), floor(), frac(), and saturate()
- Support for dynamic indexing of arrays.
- Support for break and continue statements.
- Support for switch statements.
- The linear, centroid, and noperspective interpolation modifiers
are supported.
- The RWTexture1DArray and RWTexture2DArray unordered access view
types are supported.
- \[loop\] attributes are accepted on loops.
- u/U and l/L suffixes on integer constants.
- Release 1.7 has a bug that causes an internal mutex in its command
queue implementation to be unlocked too early under certain usage
patterns. This is known to further cause internal inconsistencies
that manifest as program deadlocks for some programs. In release
1.7.1 the mutex is correctly kept locked until required.
- Floating-point values are explicitly clamped to the upper and lower bounds
of the target type by ftoi and ftou instructions when targeting
SPIR-V. Similarly, NaNs are flushed to zero. Some hardware/drivers would
already do this implicitly, but behaviour for such inputs is undefined as
far as SPIR-V is concerned.
*** libvkd3d-utils
- The VKD3D\_SHADER\_CONFIG environment variable can be used to modify the
behaviour of libvkd3d-shader at run-time, analogous to the existing
VKD3D\_CONFIG environment variable for libvkd3d. See the README for a list
of supported options.
- When scanning legacy Direct3D bytecode using vkd3d\_shader\_scan(),
descriptor information for shader model 2 and 3 combined resource-sampler
pairs is returned in the vkd3d\_shader\_scan\_descriptor\_info structure.
Note that this information is not yet available for shader model 1
sources, although this will likely be added in a future release.
- The Direct3D shader assembly target supports the rasteriser ordered view
flag (\_rov) on unordered access view declarations.
- New interfaces:
- The VKD3D\_SHADER\_COMPILE\_OPTION\_BACKWARD\_COMPATIBILITY compile
option can be used to specify backward compatibility options. The
VKD3D\_SHADER\_COMPILE\_OPTION\_BACKCOMPAT\_MAP\_SEMANTIC\_NAMES flag is
the only currently supported flag, and can be used to specify that
shader model 1-3 semantic names should be mapped to their shader model
4+ system value equivalents when compiling HLSL sources.
- The VKD3D\_SHADER\_COMPILE\_OPTION\_FRAGMENT\_COORDINATE\_ORIGIN compile
option can be used to specify the origin of fragment coordinates for
SPIR-V targets. This is especially useful in OpenGL environments, where
the origin may be different than in Direct3D or Vulkan environments.
- The vkd3d\_shader\_scan\_combined\_resource\_sampler\_info structure
extends the vkd3d\_shader\_compile\_info structure, and can be used to
retrieve information about the combined resource-sampler pairs used by a
shader. This is especially useful when compiling shaders for usage in
environments without separate binding points for samplers and resources,
like OpenGL.
- vkd3d\_shader\_free\_scan\_combined\_resource\_sampler\_info() is used
to free vkd3d\_shader\_scan\_combined\_resource\_sampler\_info
structures.
### libvkd3d-utils
- Passing the D3DCOMPILE\_ENABLE\_BACKWARDS\_COMPATIBILITY flag to
D3DCompile() and D3DCompile2() will enable mapping shader model 1-3
semantic names to their shader model 4+ system value equivalents.
- New interfaces:
- D3DGetBlobPart() is used to retrieve specific parts of DXBC blobs.
- D3DGetDebugInfo() is used to retrieve debug information from DXBC blobs.
- D3DGetInputAndOutputSignatureBlob() is used to retrieve input and output
signatures from DXBC blobs.
- D3DGetInputSignatureBlob() is used to retrieve input signatures from
DXBC blobs.
- D3DGetOutputSignatureBlob() is used to retrieve output signatures from
DXBC blobs.
- D3DStripShader() is used to remove specific parts from DXBC blobs.
### vkd3d-compiler
- The --fragment-coordinate-origin option can be used to specify the
origin of fragment coordinates for SPIR-V targets.
- The --semantic-compat-map option can be used to specify that shader
model 1-3 semantic names should be mapped to their shader model 4+ system
value equivalents when compiling HLSL sources.
### vkd3d-dxbc
- The --list and --list-data options now also output the offsets of
sections inside the input data.
### build
- The minimum required version of Vulkan-Headers for this release is version
1.2.148.
- When available, the libEGL and libOpenGL libraries are used to run the
vkd3d tests in additional configurations. These libraries are not used by
vkd3d itself.
- The SONAME\_LIBDXCOMPILER configure variable can be used specify the
shared object name of the dxcompiler library. When available, it's used to
run the vkd3d tests in additional configurations. The dxcompiler library
is not used by vkd3d itself.
- Symbol D3D12CreateDevice is mistakenly not exported in release 1.7,
breaking library clients that need it. The symbol is exported again
in release 1.7.1.

View File

@@ -1,6 +1,4 @@
Akihiro Sagawa
Alexandre Julliard
Alistair Leslie-Hughes
Andrew Eikum
Andrey Gusev
Atharva Nimbalkar
@@ -10,8 +8,6 @@ Chip Davis
Conor McCarthy
David Gow
Derek Lesho
Ethan Lee
Evan Tang
Fabian Maurer
Francisco Casas
Francois Gouget
@@ -19,15 +15,12 @@ Giovanni Mascellani
Hans-Kristian Arntzen
Henri Verbeet
Isabella Bosia
Jacek Caban
Jactry Zeng
Jan Sikorski
Joshua Ashton
Józef Kucia
Martin Storsjö
Matteo Bruni
Nikolay Sivov
Petrichor Park
Philip Rebohle
Rémi Bernon
Robin Kertels

View File

@@ -8,9 +8,6 @@ OUTPUT_DIRECTORY = doc
JAVADOC_AUTOBRIEF = YES
OPTIMIZE_OUTPUT_FOR_C = YES
EXTRACT_STATIC = YES
QUIET = YES
WARN_IF_UNDOCUMENTED = NO
LATEX_BATCHMODE = YES
INPUT = @srcdir@/include/vkd3d.h \
@srcdir@/include/vkd3d_shader.h \

View File

@@ -14,8 +14,7 @@ widl_headers = \
include/vkd3d_dxgi1_4.h \
include/vkd3d_dxgibase.h \
include/vkd3d_dxgiformat.h \
include/vkd3d_dxgitype.h \
tests/dxcompiler.h
include/vkd3d_dxgitype.h
vkd3d_public_headers = \
include/vkd3d.h \
@@ -24,7 +23,6 @@ vkd3d_public_headers = \
include/vkd3d_d3d9types.h \
include/vkd3d_d3dcommon.h \
include/vkd3d_d3dcompiler.h \
include/vkd3d_d3dcompiler_types.h \
include/vkd3d_d3dx9shader.h \
include/vkd3d_dxgibase.h \
include/vkd3d_dxgiformat.h \
@@ -44,174 +42,128 @@ vkd3d_cross_tests = \
tests/hlsl_d3d12
vkd3d_shader_tests = \
tests/hlsl/abs.shader_test \
tests/hlsl/all.shader_test \
tests/hlsl/angle-unit.shader_test \
tests/hlsl/any.shader_test \
tests/hlsl/arithmetic-float-uniform.shader_test \
tests/hlsl/arithmetic-float.shader_test \
tests/hlsl/arithmetic-int-uniform.shader_test \
tests/hlsl/arithmetic-int.shader_test \
tests/hlsl/arithmetic-uint.shader_test \
tests/hlsl/array-dimension.shader_test \
tests/hlsl/array-parameters.shader_test \
tests/hlsl/array-size-expr.shader_test \
tests/hlsl/asfloat.shader_test \
tests/hlsl/asuint.shader_test \
tests/hlsl/attributes.shader_test \
tests/hlsl/bitwise.shader_test \
tests/hlsl/bool-cast.shader_test \
tests/hlsl/bool-semantics.shader_test \
tests/hlsl/cast-64-bit.shader_test \
tests/hlsl/cast-broadcast.shader_test \
tests/hlsl/cast-componentwise-compatible.shader_test \
tests/hlsl/cast-componentwise-equal.shader_test \
tests/hlsl/cast-to-float.shader_test \
tests/hlsl/cast-to-half.shader_test \
tests/hlsl/cast-to-int.shader_test \
tests/hlsl/cast-to-uint.shader_test \
tests/hlsl/cbuffer.shader_test \
tests/hlsl/ceil.shader_test \
tests/hlsl/clamp.shader_test \
tests/hlsl/clip.shader_test \
tests/hlsl/combined-samplers.shader_test \
tests/hlsl/comma.shader_test \
tests/hlsl/compute.shader_test \
tests/hlsl/conditional.shader_test \
tests/hlsl/const.shader_test \
tests/hlsl/cross.shader_test \
tests/hlsl/d3dcolor-to-ubyte4.shader_test \
tests/hlsl/ddxddy.shader_test \
tests/hlsl/discard.shader_test \
tests/hlsl/distance.shader_test \
tests/hlsl/dot.shader_test \
tests/hlsl/duplicate-modifiers.shader_test \
tests/hlsl/entry-point-semantics.shader_test \
tests/hlsl/exp.shader_test \
tests/hlsl/expr-indexing.shader_test \
tests/hlsl/float-comparison.shader_test \
tests/hlsl/floor.shader_test \
tests/hlsl/fmod.shader_test \
tests/hlsl/for.shader_test \
tests/hlsl/frac.shader_test \
tests/hlsl/function-cast.shader_test \
tests/hlsl/function-overload.shader_test \
tests/hlsl/function-return.shader_test \
tests/hlsl/function.shader_test \
tests/hlsl/fwidth.shader_test \
tests/hlsl/gather-offset.shader_test \
tests/hlsl/gather.shader_test \
tests/hlsl/getdimensions.shader_test \
tests/hlsl/half.shader_test \
tests/hlsl/hard-copy-prop.shader_test \
tests/hlsl/initializer-flatten.shader_test \
tests/hlsl/initializer-implicit-array.shader_test \
tests/hlsl/initializer-invalid-arg-count.shader_test \
tests/hlsl/initializer-local-array.shader_test \
tests/hlsl/initializer-matrix.shader_test \
tests/hlsl/initializer-multi.shader_test \
tests/hlsl/initializer-nested.shader_test \
tests/hlsl/initializer-numeric.shader_test \
tests/hlsl/initializer-objects.shader_test \
tests/hlsl/initializer-static-array.shader_test \
tests/hlsl/initializer-struct.shader_test \
tests/hlsl/intrinsic-override.shader_test \
tests/hlsl/invalid.shader_test \
tests/hlsl/is-front-face.shader_test \
tests/hlsl/ldexp.shader_test \
tests/hlsl/length.shader_test \
tests/hlsl/lerp.shader_test \
tests/hlsl/lit.shader_test \
tests/hlsl/load-level.shader_test \
tests/hlsl/log.shader_test \
tests/hlsl/logic-operations.shader_test \
tests/hlsl/loop.shader_test \
tests/hlsl/majority-pragma.shader_test \
tests/hlsl/majority-syntax.shader_test \
tests/hlsl/majority-typedef.shader_test \
tests/hlsl/math.shader_test \
tests/hlsl/matrix-indexing.shader_test \
tests/hlsl/matrix-semantics.shader_test \
tests/hlsl/max.shader_test \
tests/hlsl/minimum-precision.shader_test \
tests/hlsl/mul.shader_test \
tests/hlsl/multiple-rt.shader_test \
tests/hlsl/nested-arrays.shader_test \
tests/hlsl/nointerpolation.shader_test \
tests/hlsl/non-const-indexing.shader_test \
tests/hlsl/normalize.shader_test \
tests/hlsl/numeric-constructor-truncation.shader_test \
tests/hlsl/numeric-types.shader_test \
tests/hlsl/numthreads.shader_test \
tests/hlsl/object-field-offsets.shader_test \
tests/hlsl/object-parameters.shader_test \
tests/hlsl/object-references.shader_test \
tests/hlsl/pow.shader_test \
tests/hlsl/reflect.shader_test \
tests/hlsl/register-reservations.shader_test \
tests/hlsl/return-implicit-conversion.shader_test \
tests/hlsl/return.shader_test \
tests/hlsl/round.shader_test \
tests/hlsl/sample-bias.shader_test \
tests/hlsl/sample-grad.shader_test \
tests/hlsl/sample-level.shader_test \
tests/hlsl/sampler-offset.shader_test \
tests/hlsl/sampler.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/switch.shader_test \
tests/hlsl/swizzle-constant-prop.shader_test \
tests/hlsl/swizzle-matrix.shader_test \
tests/hlsl/swizzles.shader_test \
tests/hlsl/technique-fx_2.shader_test \
tests/hlsl/technique-fx_4.shader_test \
tests/hlsl/technique-fx_5.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-parameters.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/abs.shader_test \
tests/all.shader_test \
tests/arithmetic-float.shader_test \
tests/arithmetic-float-uniform.shader_test \
tests/arithmetic-int.shader_test \
tests/arithmetic-int-uniform.shader_test \
tests/arithmetic-uint.shader_test \
tests/array-parameters.shader_test \
tests/asuint.shader_test \
tests/bitwise.shader_test \
tests/cast-broadcast.shader_test \
tests/cast-componentwise-compatible.shader_test \
tests/cast-componentwise-equal.shader_test \
tests/cast-to-float.shader_test \
tests/cast-to-half.shader_test \
tests/cast-to-int.shader_test \
tests/cast-to-uint.shader_test \
tests/cbuffer.shader_test \
tests/compute.shader_test \
tests/conditional.shader_test \
tests/distance.shader_test \
tests/entry-point-semantics.shader_test \
tests/exp.shader_test \
tests/floor.shader_test \
tests/frac.shader_test \
tests/function-return.shader_test \
tests/hlsl-array-dimension.shader_test \
tests/hlsl-attributes.shader_test \
tests/hlsl-bool-cast.shader_test \
tests/hlsl-clamp.shader_test \
tests/hlsl-comma.shader_test \
tests/hlsl-cross.shader_test \
tests/hlsl-dot.shader_test \
tests/hlsl-duplicate-modifiers.shader_test \
tests/hlsl-for.shader_test \
tests/hlsl-function.shader_test \
tests/hlsl-function-cast.shader_test \
tests/hlsl-function-overload.shader_test \
tests/hlsl-gather-offset.shader_test \
tests/hlsl-gather.shader_test \
tests/hlsl-initializer-flatten.shader_test \
tests/hlsl-initializer-implicit-array.shader_test \
tests/hlsl-initializer-invalid-arg-count.shader_test \
tests/hlsl-initializer-local-array.shader_test \
tests/hlsl-initializer-matrix.shader_test \
tests/hlsl-initializer-nested.shader_test \
tests/hlsl-initializer-numeric.shader_test \
tests/hlsl-initializer-objects.shader_test \
tests/hlsl-initializer-static-array.shader_test \
tests/hlsl-initializer-struct.shader_test \
tests/hlsl-intrinsic-override.shader_test \
tests/hlsl-invalid.shader_test \
tests/hlsl-ldexp.shader_test \
tests/hlsl-length.shader_test \
tests/hlsl-lerp.shader_test \
tests/hlsl-majority-pragma.shader_test \
tests/hlsl-majority-typedef.shader_test \
tests/hlsl-matrix-indexing.shader_test \
tests/hlsl-mul.shader_test \
tests/hlsl-nested-arrays.shader_test \
tests/hlsl-normalize.shader_test \
tests/hlsl-numeric-constructor-truncation.shader_test \
tests/hlsl-numeric-types.shader_test \
tests/hlsl-numthreads.shader_test \
tests/hlsl-return-implicit-conversion.shader_test \
tests/hlsl-shape.shader_test \
tests/hlsl-single-numeric-initializer.shader_test \
tests/hlsl-smoothstep.shader_test \
tests/hlsl-state-block-syntax.shader_test \
tests/hlsl-static-initializer.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-transpose.shader_test \
tests/hlsl-type-names.shader_test \
tests/hlsl-vector-indexing.shader_test \
tests/hlsl-vector-indexing-uniform.shader_test \
tests/lit.shader_test \
tests/logic-operations.shader_test \
tests/majority-syntax.shader_test \
tests/math.shader_test \
tests/matrix-semantics.shader_test \
tests/max.shader_test \
tests/minimum-precision.shader_test \
tests/multiple-rt.shader_test \
tests/nointerpolation.shader_test \
tests/object-references.shader_test \
tests/pow.shader_test \
tests/preproc-if.shader_test \
tests/preproc-ifdef.shader_test \
tests/preproc-if-expr.shader_test \
tests/preproc-invalid.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/sampler.shader_test \
tests/sampler-offset.shader_test \
tests/saturate.shader_test \
tests/shader-interstage-interface.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.shader_test \
tests/uav-load.shader_test \
tests/uav-out-param.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 = \
tests/d3d12_crosstest.h \
tests/d3d12_test_utils.h \
tests/dxcompiler.h \
tests/shader_runner.h \
tests/utils.h \
tests/vulkan_procs.h
@@ -290,24 +242,24 @@ libvkd3d_shader_la_SOURCES = \
include/private/vkd3d_memory.h \
include/vkd3d_shader.h \
libs/vkd3d-shader/checksum.c \
libs/vkd3d-shader/d3d_asm.c \
libs/vkd3d-shader/d3dbc.c \
libs/vkd3d-shader/dxbc.c \
libs/vkd3d-shader/dxil.c \
libs/vkd3d-shader/glsl.c \
libs/vkd3d-shader/hlsl.c \
libs/vkd3d-shader/hlsl.h \
libs/vkd3d-shader/hlsl_codegen.c \
libs/vkd3d-shader/hlsl_constant_ops.c \
libs/vkd3d-shader/ir.c \
libs/vkd3d-shader/hlsl_sm1.c \
libs/vkd3d-shader/hlsl_sm4.c \
libs/vkd3d-shader/preproc.h \
libs/vkd3d-shader/sm4.h \
libs/vkd3d-shader/spirv.c \
libs/vkd3d-shader/tpf.c \
libs/vkd3d-shader/trace.c \
libs/vkd3d-shader/vkd3d_shader.map \
libs/vkd3d-shader/vkd3d_shader_main.c \
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_LDFLAGS = $(AM_LDFLAGS) -version-info 9:0:8
libvkd3d_shader_la_LDFLAGS = $(AM_LDFLAGS) -version-info 6:0:5
libvkd3d_shader_la_LIBADD = libvkd3d-common.la @SPIRV_TOOLS_LIBS@ -lm
if HAVE_LD_VERSION_SCRIPT
libvkd3d_shader_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-shader/vkd3d_shader.map
@@ -325,9 +277,8 @@ libvkd3d_la_SOURCES = \
include/private/vkd3d_common.h \
include/private/vkd3d_debug.h \
include/private/vkd3d_memory.h \
include/private/vkd3d_shader_utils.h \
include/private/vkd3d_test.h \
include/private/vkd3d_utf8.h \
include/private/vkd3d_test.h \
include/vkd3d_d3d12.idl \
include/vkd3d_d3dcommon.idl \
include/vkd3d_unknown.idl \
@@ -342,7 +293,7 @@ libvkd3d_la_SOURCES = \
libs/vkd3d/vkd3d_shaders.h \
libs/vkd3d/vulkan_procs.h
libvkd3d_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_SOURCE
libvkd3d_la_LDFLAGS = $(AM_LDFLAGS) -version-info 11:0:10
libvkd3d_la_LDFLAGS = $(AM_LDFLAGS) -version-info 8:0:7
libvkd3d_la_LIBADD = libvkd3d-common.la libvkd3d-shader.la @DL_LIBS@ @PTHREAD_LIBS@
if HAVE_LD_VERSION_SCRIPT
libvkd3d_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d/vkd3d.map
@@ -354,7 +305,7 @@ libvkd3d_utils_la_SOURCES = \
libs/vkd3d-utils/vkd3d_utils_main.c \
libs/vkd3d-utils/vkd3d_utils_private.h
libvkd3d_utils_la_CFLAGS = $(AM_CFLAGS) -DLIBVKD3D_UTILS_SOURCE
libvkd3d_utils_la_LDFLAGS = $(AM_LDFLAGS) -version-info 5:0:4
libvkd3d_utils_la_LDFLAGS = $(AM_LDFLAGS) -version-info 4:3:3
libvkd3d_utils_la_LIBADD = libvkd3d-common.la libvkd3d-shader.la libvkd3d.la @PTHREAD_LIBS@
if HAVE_LD_VERSION_SCRIPT
libvkd3d_utils_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libs/vkd3d-utils/vkd3d_utils.map
@@ -372,16 +323,11 @@ EXTRA_DIST += \
libs/vkd3d-shader/libvkd3d-shader.pc.in \
libs/vkd3d-utils/libvkd3d-utils.pc.in
bin_PROGRAMS = vkd3d-compiler vkd3d-dxbc
bin_PROGRAMS = vkd3d-compiler
vkd3d_compiler_SOURCES = programs/vkd3d-compiler/main.c
vkd3d_compiler_CFLAGS = $(AM_CFLAGS) @NCURSES_CFLAGS@
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
AM_DEFAULT_SOURCE_EXT = .c
@@ -393,14 +339,12 @@ TESTS = $(vkd3d_tests) $(vkd3d_cross_tests) $(vkd3d_shader_tests)
tests_d3d12_LDADD = $(LDADD) @PTHREAD_LIBS@ @DL_LIBS@
tests_d3d12_invalid_usage_LDADD = $(LDADD) @DL_LIBS@
tests_hlsl_d3d12_LDADD = $(LDADD) @DL_LIBS@
tests_shader_runner_CFLAGS = $(AM_CFLAGS) -I$(builddir)/tests @OPENGL_CFLAGS@
tests_shader_runner_LDADD = $(LDADD) @OPENGL_LIBS@ @DL_LIBS@
tests_shader_runner_LDADD = $(LDADD) @DL_LIBS@
tests_shader_runner_SOURCES = \
tests/shader_runner.c \
tests/shader_runner_d3d9.c \
tests/shader_runner_d3d11.c \
tests/shader_runner_d3d12.c \
tests/shader_runner_gl.c \
tests/shader_runner_vulkan.c
tests_vkd3d_api_LDADD = libvkd3d.la @DL_LIBS@
tests_vkd3d_shader_api_LDADD = libvkd3d-shader.la
@@ -436,7 +380,7 @@ endif
EXTRA_DIST += $(widl_headers) $(widl_headers:.h=.idl)
$(widl_headers): %.h: %.idl
if HAVE_WIDL
$(VKD3D_V_WIDL)$(WIDL) -I$(srcdir)/include -h -o $@ $<
$(VKD3D_V_WIDL)$(WIDL) -h -o $@ $<
else
@echo "widl is required to generate $@"
endif
@@ -480,10 +424,10 @@ dummy-vkd3d-version:
## Cross-compile tests
cross_implibs = crosslibs/d3d12
CROSS_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/include/private -I$(builddir)/include -I$(builddir)/tests
CROSS_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/include/private -I$(builddir)/include
CROSS_CFLAGS = -g -O2 -Wall -municode ${CROSS_CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=0 -DVKD3D_CROSSTEST=1
EXTRA_DIST += $(cross_implibs:=.cross32.def) $(cross_implibs:=.cross64.def)
EXTRA_DIST += tests/driver.c tests/shader_runner_d3d11.c tests/shader_runner_d3d9.c
EXTRA_DIST += tests/shader_runner_d3d11.c tests/shader_runner_d3d9.c
shader_runner_cross_sources = \
$(srcdir)/tests/shader_runner.c \
@@ -491,9 +435,6 @@ shader_runner_cross_sources = \
$(srcdir)/tests/shader_runner_d3d11.c \
$(srcdir)/tests/shader_runner_d3d12.c
driver_cross_sources = \
$(srcdir)/tests/driver.c
if HAVE_CROSSTARGET32
CROSS32_CC = @CROSSCC32@
CROSS32_DLLTOOL = @CROSSTARGET32@-dlltool
@@ -509,7 +450,6 @@ endif
CROSS32_FILES = $(CROSS32_EXEFILES)
if BUILD_TESTS
CROSS32_FILES += tests/shader_runner.cross32.exe
CROSS32_FILES += tests/driver.cross32.exe
endif
CLEANFILES += $(CROSS32_IMPLIBS) $(CROSS32_FILES)
@@ -532,11 +472,6 @@ tests/shader_runner.cross32.exe: $(shader_runner_cross_sources) $(CROSS32_IMPLIB
$(CROSS32_CC) $(CROSS_CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -o $@ $(shader_runner_cross_sources) $(CROSS32_IMPLIBS) -ldxgi -lgdi32 -ld3dcompiler_47 && \
$(am__mv) $$depbase.Tpo $$depbase.Po
tests/driver.cross32.exe: $(driver_cross_sources)
$(AM_V_CCLD)depbase=`echo $@ | sed 's![^/]*$$!$(DEPDIR)/&!;s!\.exe$$!!'`; \
$(CROSS32_CC) $(CROSS_CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -o $@ $(driver_cross_sources) && \
$(am__mv) $$depbase.Tpo $$depbase.Po
else
crosstest32:
endif
@@ -556,7 +491,6 @@ endif
CROSS64_FILES = $(CROSS64_EXEFILES)
if BUILD_TESTS
CROSS64_FILES += tests/shader_runner.cross64.exe
CROSS64_FILES += tests/driver.cross64.exe
endif
CLEANFILES += $(CROSS64_IMPLIBS) $(CROSS64_FILES)
@@ -579,28 +513,12 @@ tests/shader_runner.cross64.exe: $(shader_runner_cross_sources) $(CROSS64_IMPLIB
$(CROSS64_CC) $(CROSS_CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -o $@ $(shader_runner_cross_sources) $(CROSS64_IMPLIBS) -ldxgi -lgdi32 -ld3dcompiler_47 && \
$(am__mv) $$depbase.Tpo $$depbase.Po
tests/driver.cross64.exe: $(driver_cross_sources)
$(AM_V_CCLD)depbase=`echo $@ | sed 's![^/]*$$!$(DEPDIR)/&!;s!\.exe$$!!'`; \
$(CROSS64_CC) $(CROSS_CFLAGS) -MT $@ -MD -MP -MF $$depbase.Tpo -o $@ $(driver_cross_sources) && \
$(am__mv) $$depbase.Tpo $$depbase.Po
else
crosstest64:
endif
tests/crosstests.txt: FORCE
$(AM_V_GEN) for i in $(vkd3d_cross_tests) ; do echo $$i ; done > $@
tests/shader_tests.txt: FORCE
$(AM_V_GEN) for i in $(vkd3d_shader_tests) ; do echo $$i ; done > $@
crosstest-lists: tests/crosstests.txt tests/shader_tests.txt
CLEANFILES += tests/crosstests.txt tests/shader_tests.txt
FORCE:
.PHONY: crosstest crosstest32 crosstest64 crosstest-lists FORCE
crosstest: crosstest32 crosstest64 crosstest-lists
.PHONY: crosstest crosstest32 crosstest64
crosstest: crosstest32 crosstest64
if BUILD_DOC
@DX_RULES@

36
README
View File

@@ -9,14 +9,14 @@ similar, but not identical, to Direct3D 12.
Building vkd3d
==============
Vkd3d depends on SPIRV-Headers and Vulkan-Headers (>= 1.2.148).
Vkd3d depends on SPIRV-Headers and Vulkan-Headers (>= 1.2.139).
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
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
available or is not recent (>= 3.21), then you can build Wine with `make
tools/widl/widl' to avoid building all of Wine. You can then point vkd3d's
available or is not recent (>= 3.20), then you can build Wine with `make
tools/widl' to avoid building all of Wine. You can then point vkd3d's
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
@@ -47,8 +47,8 @@ commas or semicolons.
* NO_COLOR - this is an alias of NO_COLOUR.
* NO_COLOUR - when set, vkd3d-compiler and vkd3d-dxbc will default to
monochrome output, even when the output supports colour.
* NO_COLOUR - when set, vkd3d-compiler will default to monochrome output,
even when the output supports colour.
* VKD3D_CONFIG - a list of options that change the behavior of libvkd3d.
* virtual_heaps - Create descriptors for each D3D12 root signature
@@ -65,11 +65,6 @@ commas or semicolons.
* VKD3D_DISABLE_EXTENSIONS - a list of Vulkan extensions that libvkd3d should
not use even if available.
* VKD3D_SHADER_CONFIG - a list of options that change the behavior of
libvkd3d-shader.
* force_validation - Enable (additional) validation of libvkd3d-shader's
internal representation of shaders.
* VKD3D_SHADER_DEBUG - controls the debug level for log messages produced by
libvkd3d-shader. See VKD3D_DEBUG for accepted values.
@@ -87,24 +82,3 @@ commas or semicolons.
conditions in tests.
* VKD3D_TEST_BUG - set to 0 to disable bug_if() conditions in tests.
If the configuration defines 'DXCOMPILER_LIBS=-L/path/to/dxcompiler', Shader
Runner attempts to load libdxcompiler.so or dxcompiler.dll to compile test
shaders in Shader Model 6. LD_LIBRARY_PATH (linux), WINEPATH (wine) or PATH
(native windows) should include the location of dxcompiler if SM 6 shader
tests are desired. If dxcompiler is not found, Shader Runner will compile the
test shaders only in earlier shader models. The DXC source does not contain
code for adding DXBC checksums, so the official release should be installed
from:
https://github.com/microsoft/DirectXShaderCompiler/releases
================
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.

View File

@@ -1,5 +1,5 @@
AC_PREREQ([2.69])
AC_INIT([vkd3d],[1.10])
AC_INIT([vkd3d],[1.7.1])
AC_CONFIG_AUX_DIR([bin])
AC_CONFIG_MACRO_DIR([m4])
@@ -9,7 +9,6 @@ AC_ARG_VAR([WIDL], [widl IDL compiler])
AC_ARG_VAR([CROSSCC32], [32-bit Windows cross compiler])
AC_ARG_VAR([CROSSCC64], [64-bit Windows cross compiler])
AC_ARG_WITH([ncurses], AS_HELP_STRING([--with-ncurses], [Build with the ncurses library (default: test)]))
AC_ARG_WITH([opengl], AS_HELP_STRING([--with-opengl], [Build with the OpenGL library (default: test)]))
AC_ARG_WITH([spirv-tools], AS_HELP_STRING([--with-spirv-tools],
[Build with SPIRV-Tools library (default: disabled)]))
AC_ARG_WITH([xcb], AS_HELP_STRING([--with-xcb], [Build with XCB library (default: test)]))
@@ -28,7 +27,7 @@ AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_SED
AC_PROG_MKDIR_P
VKD3D_PROG_WIDL(3, 21)
VKD3D_PROG_WIDL(3, 20)
AS_IF([test "x$WIDL" = "xno"], [AC_MSG_WARN([widl is required to build header files.])])
AC_CHECK_PROGS([FLEX], [flex], [none])
@@ -65,7 +64,6 @@ AS_IF([test "x${GCC}" = "xyes"],
VKD3D_CHECK_CFLAGS([-Wunused-but-set-parameter])
VKD3D_CHECK_CFLAGS([-Wvla])
VKD3D_CHECK_CFLAGS([-Wpointer-arith])
VKD3D_CHECK_CFLAGS([-Wenum-conversion])
VKD3D_CHECK_CFLAGS([-Wl,--no-undefined])])
dnl Check for cross compilers
@@ -85,7 +83,7 @@ AS_IF([test "x$ac_cv_header_spirv_unified1_GLSL_std_450_h" != "xyes" \
-a "x$ac_cv_header_vulkan_GLSL_std_450_h" != "xyes"],
[AC_MSG_ERROR([GLSL.std.450.h not found.])])
VKD3D_CHECK_VULKAN_HEADER_VERSION([148], [AC_MSG_ERROR([Vulkan headers are too old, 1.2.148 is required.])])
VKD3D_CHECK_VULKAN_HEADER_VERSION([139], [AC_MSG_ERROR([Vulkan headers are too old, 1.2.139 is required.])])
AC_CHECK_DECL([SpvCapabilityDemoteToHelperInvocationEXT],, [AC_MSG_ERROR([SPIR-V headers are too old.])], [
#ifdef HAVE_SPIRV_UNIFIED1_SPIRV_H
@@ -122,20 +120,10 @@ AS_IF([test "x$SONAME_LIBVULKAN" = "x"],
[VKD3D_CHECK_VULKAN],
[AC_DEFINE_UNQUOTED([SONAME_LIBVULKAN],["$SONAME_LIBVULKAN"],[Define to the shared object name of the Vulkan library.])])
AC_ARG_VAR([SONAME_LIBDXCOMPILER], [shared object name for the dxcompiler library])
AC_ARG_VAR([DXCOMPILER_LIBS], [linker flags for the dxcompiler library])
AS_IF([test "x$SONAME_LIBDXCOMPILER" = "x"],
[VKD3D_CHECK_SONAME([dxcompiler], [DxcCreateInstance], [HAVE_DXCOMPILER=yes], [HAVE_DXCOMPILER=no], [$DXCOMPILER_LIBS])],
[AC_DEFINE_UNQUOTED([SONAME_LIBDXCOMPILER],["$SONAME_LIBDXCOMPILER"],[Define to the shared object name of the dxcompiler library.])])
AS_IF([test "x$with_ncurses" != "xno"],
[PKG_CHECK_MODULES([NCURSES], [ncurses],
[AC_DEFINE([HAVE_NCURSES], [1], [Define to 1 if you have ncurses.]) with_ncurses=yes],
[with_ncurses=no])])
AS_IF([test "x$with_opengl" != "xno"],
[PKG_CHECK_MODULES([OPENGL], [egl opengl],
[AC_DEFINE([HAVE_OPENGL], [1], [Define to 1 if you have OpenGL.]) with_opengl=yes],
[with_opengl=no])])
AS_IF([test "x$with_spirv_tools" = "xyes"],
[PKG_CHECK_MODULES([SPIRV_TOOLS], [SPIRV-Tools-shared],
[AC_DEFINE([HAVE_SPIRV_TOOLS], [1], [Define to 1 if you have SPIRV-Tools.])])],
@@ -154,9 +142,6 @@ VKD3D_CHECK_FUNC([HAVE_BUILTIN_POPCOUNT], [__builtin_popcount], [__builtin_popco
VKD3D_CHECK_FUNC([HAVE_BUILTIN_ADD_OVERFLOW], [__builtin_add_overflow], [__builtin_add_overflow(0, 0, (int *)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_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, 0)])
VKD3D_CHECK_FUNC([HAVE_GETTID], [gettid], [gettid()])
dnl Makefiles
case $host_os in
@@ -193,10 +178,8 @@ AS_ECHO(["
widl: ${WIDL}
Have ncurses: ${with_ncurses}
Have OpenGL: ${with_opengl}
Have SPIRV-Tools: ${with_spirv_tools}
Have xcb: ${HAVE_XCB}
Have dxcompiler: ${HAVE_DXCOMPILER}
Building demos: ${enable_demos}
Building tests: ${enable_tests}

View File

@@ -19,7 +19,7 @@
#define VK_NO_PROTOTYPES
#define VK_USE_PLATFORM_XCB_KHR
#define VKD3D_UTILS_API_VERSION VKD3D_API_VERSION_1_10
#define VKD3D_UTILS_API_VERSION VKD3D_API_VERSION_1_7
#include "config.h"
#include <vkd3d.h>
#include <vkd3d_utils.h>
@@ -113,9 +113,6 @@ struct demo_swapchain
VkDevice vk_device;
ID3D12CommandQueue *command_queue;
ID3D12Fence *present_fence;
unsigned long long present_count;
uint32_t current_buffer;
unsigned int buffer_count;
ID3D12Resource *buffers[1];
@@ -532,17 +529,6 @@ static inline struct demo_swapchain *demo_swapchain_create(ID3D12CommandQueue *c
}
swapchain->buffer_count = image_count;
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);
ID3D12CommandQueue_AddRef(swapchain->command_queue = command_queue);
@@ -588,12 +574,6 @@ static inline void demo_swapchain_present(struct demo_swapchain *swapchain)
present_desc.pImageIndices = &swapchain->current_buffer;
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);
vkQueuePresentKHR(vk_queue, &present_desc);
vkd3d_release_vk_queue(swapchain->command_queue);
@@ -609,7 +589,6 @@ static inline void demo_swapchain_destroy(struct demo_swapchain *swapchain)
unsigned int i;
ID3D12CommandQueue_Release(swapchain->command_queue);
ID3D12Fence_Release(swapchain->present_fence);
for (i = 0; i < swapchain->buffer_count; ++i)
{
ID3D12Resource_Release(swapchain->buffers[i]);

View File

@@ -888,9 +888,6 @@ static int cxg_main(void)
}
#ifdef _WIN32
/* Do not trigger -Wmissing-prototypes. */
int wmain(void);
int wmain(void)
#else
int main(void)

View File

@@ -401,9 +401,6 @@ static int cxt_main(void)
}
#ifdef _WIN32
/* Do not trigger -Wmissing-prototypes. */
int wmain(void);
int wmain(void)
#else
int main(void)

View File

@@ -1,64 +0,0 @@
=====================
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). vkd3d is also tested on macOS, with an Intel processor, using
MoltenVK as the Vulkan driver. The llvmpipe and macOS jobs are
currently allowed to fail.
Additionally, MinGW is used to build PE binaries for both vkd3d and
its crosstests, for both 32 and 64 bit. The PE crosstests are executed
on Windows 10 to check that behavior imposed by the tests corresponds
to Microsoft's D3D12 implementation. The rendering backend is
currently Window's WARP software implementation.
The testing logs are available as CI artifacts, as well as the PE
modules built by the crosstest and MinGW jobs.
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.
Finally, a runner tagged with `win10-21h2' must be available and
submit jobs to a Windows 10 virtual machine.

View File

@@ -1,27 +0,0 @@
#!/bin/bash
echo "Building $(git log -1)"
echo "---"
COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD))
set -Eeuxo pipefail
# Building with -Wno-array-bounds because MinGW headers currently emit
# a lot of those
./autogen.sh
rm -fr build
mkdir build
cd build
../configure CROSSCC64="x86_64-w64-mingw32-gcc -Wno-array-bounds -Werror" CROSSCC32="i686-w64-mingw32-gcc -Wno-array-bounds -Werror" && \
make -j$(nproc) crosstest || \
touch ../pipeline_failed
mkdir -p ../artifacts/$COMMIT
rsync -Rr config.log tests/*.txt tests/*.exe ../artifacts/$COMMIT || true
# Make the driver easily available to the Windows CI job
cp tests/driver.cross64.exe ../artifacts
git reset --hard

View File

@@ -1,26 +0,0 @@
#!/bin/bash
echo "Building $(git log -1)"
echo "---"
COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD))
set -Eeuxo pipefail
./autogen.sh
rm -fr build
mkdir build
cd build
export LD_LIBRARY_PATH=/usr/local/lib
if ../configure --enable-demos DXCOMPILER_LIBS="-L/usr/local/lib" CFLAGS="-g -O2 -Werror" CPPFLAGS="-DVKD3D_SHADER_UNSUPPORTED_DXIL" && \
make -j$(nproc) ; then
make -j$(nproc) check || \
touch ../tests_failed
else
touch ../build_failed
fi
mkdir -p ../artifacts/$COMMIT
rsync -Rr config.log doc/* test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT || true
git reset --hard

View File

@@ -1,25 +0,0 @@
#!/bin/bash
echo "Building $(git log -1)"
echo "---"
COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD))
set -Eeuxo pipefail
./autogen.sh
rm -fr build
mkdir build
cd build
if ../configure CFLAGS="-g -O2 -Wno-implicit-fallthrough -Werror" && \
make -j$(sysctl -n hw.ncpu) ; then
make -j$(sysctl -n hw.ncpu) check || \
touch ../tests_failed
else
touch ../build_failed
fi
mkdir -p ../artifacts/$COMMIT
rsync -Rr config.log test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT || true
git reset --hard

View File

@@ -1,25 +0,0 @@
#!/bin/bash
echo "Building $(git log -1)"
echo "---"
COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD))
set -Eeuxo pipefail
./autogen.sh
rm -fr build
mkdir build
cd build
mkdir vulkan-headers
cp -r /usr/include/vulkan /usr/include/vk_video /usr/include/spirv vulkan-headers
../configure --enable-demos --disable-doxygen-doc --without-ncurses --host=$HOST SONAME_LIBVULKAN="vulkan-1.dll" CPPFLAGS="-I$PWD/vulkan-headers" CFLAGS="-g -O2 -Wno-format -Wno-array-bounds -Werror" LDFLAGS="-static-libgcc" && \
make -j$(nproc) && \
make -j$(nproc) install DESTDIR="$PWD/destdir" || \
touch ../pipeline_failed
mkdir -p ../artifacts/$COMMIT
cp config.log ../artifacts/$COMMIT || true
cp destdir/usr/local/bin/* ../artifacts/$COMMIT || true
git reset --hard

View File

@@ -1,168 +0,0 @@
.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 build_failed ] ; then exit 1 ; fi
- if [ -f tests_failed ] ; then exit 2 ; fi
artifacts:
when: always
paths:
- artifacts
build-radv-64:
extends: .build-linux
tags:
- amd-gpu
variables:
VK_LOADER_DRIVERS_SELECT: 'radeon_*'
VKD3D_SHADER_CONFIG: 'force_validation'
build-llvmpipe-64:
extends: .build-linux
allow_failure:
exit_codes:
- 2
variables:
VK_LOADER_DRIVERS_SELECT: 'lvp_*'
VKD3D_SHADER_CONFIG: 'force_validation'
build-radv-32:
extends: .build-linux
tags:
- amd-gpu
variables:
VK_LOADER_DRIVERS_SELECT: 'radeon_*'
CC: 'gcc -m32'
VKD3D_SHADER_CONFIG: 'force_validation'
build-llvmpipe-32:
extends: .build-linux
allow_failure:
exit_codes:
- 2
variables:
VK_LOADER_DRIVERS_SELECT: 'lvp_*'
CC: 'gcc -m32'
VKD3D_SHADER_CONFIG: 'force_validation'
build-crosstest:
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-crosstest
- if [ -f pipeline_failed ] ; then exit 1 ; fi
artifacts:
when: always
paths:
- artifacts
.build-mingw:
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
- git rebase $CI_MERGE_REQUEST_DIFF_BASE_SHA --exec ./gitlab/build-mingw
- if [ -f pipeline_failed ] ; then exit 1 ; fi
artifacts:
when: always
paths:
- artifacts
build-mingw-64:
extends: .build-mingw
variables:
HOST: "x86_64-w64-mingw32"
build-mingw-32:
extends: .build-mingw
variables:
HOST: "i686-w64-mingw32"
build-mac:
stage: build
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
allow_failure:
exit_codes:
- 2
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 build_failed ] ; then exit 1 ; fi
- if [ -f tests_failed ] ; then exit 2 ; fi
variables:
VKD3D_DISABLE_EXTENSIONS: "VK_EXT_descriptor_indexing"
VKD3D_SHADER_CONFIG: 'force_validation'
MVK_CONFIG_LOG_LEVEL: 1
artifacts:
when: always
paths:
- artifacts

View File

@@ -1,44 +0,0 @@
# 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 curl \
git ca-certificates rsync \
doxygen doxygen-latex graphviz \
mesa-vulkan-drivers mesa-vulkan-drivers:i386 \
vulkan-tools spirv-headers \
libegl-dev libegl-dev:i386 \
libvulkan-dev libvulkan-dev:i386 \
libncurses-dev libncurses-dev:i386 \
libopengl-dev libopengl-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 --enable-win64 --without-x --without-freetype && \
make tools/widl/widl && \
cp tools/widl/widl /usr/local/bin && \
cd ../.. && \
rm -rf wine && \
apt-get clean && \
curl -L -s https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.7.2308/linux_dxc_2023_08_14.x86_64.tar.gz | tar zx -C /usr/local ./lib/libdxcompiler.so ./lib/libdxil.so && \
groupadd host-render -g 800 && \
useradd -m gitlab -G host-render
USER gitlab

View File

@@ -1,20 +0,0 @@
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"

View File

@@ -1,12 +0,0 @@
#!/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

Some files were not shown because too many files have changed in this diff Show More