mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
Compare commits
3 Commits
vkd3d-1.9
...
vkd3d-1.7.
Author | SHA1 | Date | |
---|---|---|---|
|
154acd2c2b | ||
|
cb2acc35f2 | ||
|
7b9b0179ec |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,7 +10,6 @@ Makefile
|
||||
Makefile.in
|
||||
test-suite.log
|
||||
/vkd3d-compiler
|
||||
/vkd3d-dxbc
|
||||
|
||||
vkd3d-*.tar.xz
|
||||
|
||||
|
@@ -1,7 +0,0 @@
|
||||
stages:
|
||||
- image
|
||||
- build
|
||||
|
||||
include:
|
||||
- local: "/gitlab/image.yml"
|
||||
- local: "/gitlab/build.yml"
|
97
ANNOUNCE
97
ANNOUNCE
@@ -1,16 +1,12 @@
|
||||
The Wine team is proud to announce that release 1.9 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:
|
||||
|
||||
- Yet more improvements to the HLSL compiler.
|
||||
- A new utility to inspect the contents of 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.9.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:
|
||||
|
||||
@@ -21,83 +17,20 @@ for the complete list.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
What's new in vkd3d 1.9
|
||||
=======================
|
||||
What's new in vkd3d 1.7.1
|
||||
=========================
|
||||
|
||||
|
||||
*** libvkd3d
|
||||
|
||||
- Copying between depth/stencil and colour formats in
|
||||
ID3D12GraphicsCommandList::CopyResource() is supported.
|
||||
- The ID3D12Fence1 interface is supported.
|
||||
- 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.
|
||||
|
||||
*** libvkd3d-utils
|
||||
|
||||
*** 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:
|
||||
- Support for the following intrinsic functions:
|
||||
- clip()
|
||||
- ddx_coarse() and ddy_coarse()
|
||||
- ddx_fine() and ddy_fine()
|
||||
- tex1D(), tex2D(), texCUBE(), and tex3D()
|
||||
- Constant folding support for more expression types. In particular:
|
||||
- comparison operators
|
||||
- floating-point min() and max()
|
||||
- logical `and' and `or'
|
||||
- dot products
|
||||
- square roots
|
||||
- logarithms
|
||||
- Support for multi-sample texture object declarations without explicit
|
||||
sample counts in shader model 4.1 and later shaders.
|
||||
- Support for using constant expressions as sample counts in multi-sample
|
||||
texture object declarations.
|
||||
- Support for variable initialisers using variables declared earlier in the
|
||||
same declaration list. E.g., `float a = 1, b = a, c = b + 1;'.
|
||||
- The GetDimensions() texture object method is implemented.
|
||||
- Matrix swizzles are implemented.
|
||||
- Parser support for if-statement attributes like `[branch]' and
|
||||
`[flatten]'.
|
||||
- Support for the `inline' function modifier.
|
||||
|
||||
- Previously, vkd3d_shader_compile() would in some cases return VKD3D_OK
|
||||
despite compilation failing when targeting legacy Direct3D bytecode. These
|
||||
cases have been fixed.
|
||||
|
||||
- Various HLSL preprocessor fixes for edge cases related to stringification.
|
||||
|
||||
- SPIR-V target support for the `linear noperspective centroid' input
|
||||
interpolation mode.
|
||||
|
||||
- New interfaces:
|
||||
- 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.
|
||||
- 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.
|
||||
|
4
AUTHORS
4
AUTHORS
@@ -1,5 +1,4 @@
|
||||
Alexandre Julliard
|
||||
Alistair Leslie-Hughes
|
||||
Andrew Eikum
|
||||
Andrey Gusev
|
||||
Atharva Nimbalkar
|
||||
@@ -9,8 +8,6 @@ Chip Davis
|
||||
Conor McCarthy
|
||||
David Gow
|
||||
Derek Lesho
|
||||
Ethan Lee
|
||||
Evan Tang
|
||||
Fabian Maurer
|
||||
Francisco Casas
|
||||
Francois Gouget
|
||||
@@ -19,7 +16,6 @@ Hans-Kristian Arntzen
|
||||
Henri Verbeet
|
||||
Isabella Bosia
|
||||
Jactry Zeng
|
||||
Jan Sikorski
|
||||
Joshua Ashton
|
||||
JĂłzef Kucia
|
||||
Martin Storsjö
|
||||
|
285
Makefile.am
285
Makefile.am
@@ -42,157 +42,124 @@ vkd3d_cross_tests = \
|
||||
tests/hlsl_d3d12
|
||||
|
||||
vkd3d_shader_tests = \
|
||||
tests/hlsl/abs.shader_test \
|
||||
tests/hlsl/all.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-index-expr.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-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/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/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/gather-offset.shader_test \
|
||||
tests/hlsl/gather.shader_test \
|
||||
tests/hlsl/getdimensions.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/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/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/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 \
|
||||
@@ -275,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 8:0:7
|
||||
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
|
||||
@@ -310,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 \
|
||||
@@ -327,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 10:0:9
|
||||
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
|
||||
@@ -339,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 4:5:3
|
||||
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
|
||||
@@ -357,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
|
||||
|
||||
|
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
|
||||
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
|
||||
@@ -82,14 +82,3 @@ commas or semicolons.
|
||||
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_INIT([vkd3d],[1.9])
|
||||
AC_INIT([vkd3d],[1.7.1])
|
||||
|
||||
AC_CONFIG_AUX_DIR([bin])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
@@ -27,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])
|
||||
@@ -142,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
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
#define VK_NO_PROTOTYPES
|
||||
#define VK_USE_PLATFORM_XCB_KHR
|
||||
#define VKD3D_UTILS_API_VERSION VKD3D_API_VERSION_1_9
|
||||
#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]);
|
||||
|
@@ -1,51 +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); 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.
|
@@ -1,19 +0,0 @@
|
||||
#!/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
|
@@ -1,19 +0,0 @@
|
||||
#!/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
|
@@ -1,93 +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 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
|
@@ -1,41 +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 \
|
||||
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
|
@@ -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"
|
@@ -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
|
@@ -20,7 +20,6 @@
|
||||
#define __VKD3D_COMMON_H
|
||||
|
||||
#include "config.h"
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include "vkd3d_windows.h"
|
||||
#include "vkd3d_types.h"
|
||||
|
||||
@@ -29,7 +28,6 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <intrin.h>
|
||||
@@ -173,11 +171,6 @@ static inline bool vkd3d_bound_range(size_t start, size_t count, size_t limit)
|
||||
#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)
|
||||
{
|
||||
return low | ((uint16_t)high << 8);
|
||||
@@ -193,21 +186,6 @@ static inline int vkd3d_u32_compare(uint32_t x, uint32_t 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)
|
||||
{
|
||||
return 'A' <= c && c <= 'Z';
|
||||
@@ -271,7 +249,6 @@ static inline LONG InterlockedDecrement(LONG volatile *x)
|
||||
# else
|
||||
# error "InterlockedDecrement() not implemented for this platform"
|
||||
# endif
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
static inline void vkd3d_parse_version(const char *version, int *major, int *minor)
|
||||
|
@@ -91,7 +91,7 @@ const char *debugstr_w(const WCHAR *wstr, size_t wchar_size);
|
||||
|
||||
#define FIXME_ONCE VKD3D_DBG_LOG_ONCE(FIXME, WARN)
|
||||
|
||||
#define VKD3D_DEBUG_ENV_NAME(name) const char *const vkd3d_dbg_env_name = name
|
||||
#define VKD3D_DEBUG_ENV_NAME(name) const char *vkd3d_dbg_env_name = name
|
||||
|
||||
static inline const char *debugstr_guid(const GUID *guid)
|
||||
{
|
||||
|
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* 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 */
|
@@ -118,8 +118,7 @@ struct vkd3d_test_state
|
||||
bool bug_enabled;
|
||||
|
||||
const char *test_name_filter;
|
||||
char context[8][128];
|
||||
unsigned int context_count;
|
||||
char context[1024];
|
||||
};
|
||||
extern struct vkd3d_test_state vkd3d_test_state;
|
||||
|
||||
@@ -135,16 +134,6 @@ broken(bool condition)
|
||||
return condition && vkd3d_test_platform_is_windows();
|
||||
}
|
||||
|
||||
static void vkd3d_test_printf(unsigned int line, const char *msg)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
printf("%s:%u: ", vkd3d_test_name, line);
|
||||
for (i = 0; i < vkd3d_test_state.context_count; ++i)
|
||||
printf("%s: ", vkd3d_test_state.context[i]);
|
||||
printf("%s", msg);
|
||||
}
|
||||
|
||||
static void
|
||||
vkd3d_test_check_assert_that(unsigned int line, bool result, const char *fmt, va_list args)
|
||||
{
|
||||
@@ -152,12 +141,12 @@ vkd3d_test_check_assert_that(unsigned int line, bool result, const char *fmt, va
|
||||
{
|
||||
InterlockedIncrement(&vkd3d_test_state.success_count);
|
||||
if (vkd3d_test_state.debug_level > 1)
|
||||
vkd3d_test_printf(line, "Test succeeded.\n");
|
||||
printf("%s:%d%s: Test succeeded.\n", vkd3d_test_name, line, vkd3d_test_state.context);
|
||||
}
|
||||
else
|
||||
{
|
||||
InterlockedIncrement(&vkd3d_test_state.failure_count);
|
||||
vkd3d_test_printf(line, "Test failed: ");
|
||||
printf("%s:%d%s: Test failed: ", vkd3d_test_name, line, vkd3d_test_state.context);
|
||||
vprintf(fmt, args);
|
||||
}
|
||||
}
|
||||
@@ -184,9 +173,9 @@ vkd3d_test_check_ok(unsigned int line, bool result, const char *fmt, va_list arg
|
||||
if (is_todo)
|
||||
result = !result;
|
||||
if (result)
|
||||
vkd3d_test_printf(line, "Fixed bug: ");
|
||||
printf("%s:%d%s: Fixed bug: ", vkd3d_test_name, line, vkd3d_test_state.context);
|
||||
else
|
||||
vkd3d_test_printf(line, "Bug: ");
|
||||
printf("%s:%d%s: Bug: ", vkd3d_test_name, line, vkd3d_test_state.context);
|
||||
vprintf(fmt, args);
|
||||
}
|
||||
else if (is_todo)
|
||||
@@ -194,12 +183,12 @@ vkd3d_test_check_ok(unsigned int line, bool result, const char *fmt, va_list arg
|
||||
if (result)
|
||||
{
|
||||
InterlockedIncrement(&vkd3d_test_state.todo_success_count);
|
||||
vkd3d_test_printf(line, "Todo succeeded: ");
|
||||
printf("%s:%d%s: Todo succeeded: ", vkd3d_test_name, line, vkd3d_test_state.context);
|
||||
}
|
||||
else
|
||||
{
|
||||
InterlockedIncrement(&vkd3d_test_state.todo_count);
|
||||
vkd3d_test_printf(line, "Todo: ");
|
||||
printf("%s:%d%s: Todo: ", vkd3d_test_name, line, vkd3d_test_state.context);
|
||||
}
|
||||
vprintf(fmt, args);
|
||||
}
|
||||
@@ -224,7 +213,7 @@ vkd3d_test_skip(unsigned int line, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vkd3d_test_printf(line, "Test skipped: ");
|
||||
printf("%s:%d%s: Test skipped: ", vkd3d_test_name, line, vkd3d_test_state.context);
|
||||
vprintf(fmt, args);
|
||||
va_end(args);
|
||||
InterlockedIncrement(&vkd3d_test_state.skip_count);
|
||||
@@ -235,7 +224,7 @@ vkd3d_test_trace(unsigned int line, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vkd3d_test_printf(line, "");
|
||||
printf("%s:%d%s: ", vkd3d_test_name, line, vkd3d_test_state.context);
|
||||
vprintf(fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
@@ -405,25 +394,21 @@ static inline void vkd3d_test_end_bug(void)
|
||||
vkd3d_test_state.bug_level >>= 1;
|
||||
}
|
||||
|
||||
static inline void vkd3d_test_push_context(const char *fmt, ...)
|
||||
static inline void vkd3d_test_set_context(const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
if (vkd3d_test_state.context_count < ARRAY_SIZE(vkd3d_test_state.context))
|
||||
if (!fmt)
|
||||
{
|
||||
va_start(args, fmt);
|
||||
vsnprintf(vkd3d_test_state.context[vkd3d_test_state.context_count],
|
||||
sizeof(vkd3d_test_state.context), fmt, args);
|
||||
va_end(args);
|
||||
vkd3d_test_state.context[vkd3d_test_state.context_count][sizeof(vkd3d_test_state.context[0]) - 1] = '\0';
|
||||
vkd3d_test_state.context[0] = '\0';
|
||||
return;
|
||||
}
|
||||
++vkd3d_test_state.context_count;
|
||||
}
|
||||
|
||||
static inline void vkd3d_test_pop_context(void)
|
||||
{
|
||||
if (vkd3d_test_state.context_count)
|
||||
--vkd3d_test_state.context_count;
|
||||
vkd3d_test_state.context[0] = ':';
|
||||
va_start(args, fmt);
|
||||
vsnprintf(&vkd3d_test_state.context[1], sizeof(vkd3d_test_state.context) - 1, fmt, args);
|
||||
va_end(args);
|
||||
vkd3d_test_state.context[sizeof(vkd3d_test_state.context) - 1] = '\0';
|
||||
}
|
||||
|
||||
#define run_test(test_pfn) \
|
||||
|
@@ -76,8 +76,6 @@ enum vkd3d_api_version
|
||||
VKD3D_API_VERSION_1_5,
|
||||
VKD3D_API_VERSION_1_6,
|
||||
VKD3D_API_VERSION_1_7,
|
||||
VKD3D_API_VERSION_1_8,
|
||||
VKD3D_API_VERSION_1_9,
|
||||
|
||||
VKD3D_FORCE_32_BIT_ENUM(VKD3D_API_VERSION),
|
||||
};
|
||||
@@ -208,42 +206,7 @@ VKD3D_API VkPhysicalDevice vkd3d_get_vk_physical_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);
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
/**
|
||||
* 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 HRESULT vkd3d_create_image_resource(ID3D12Device *device,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user