Module: vkd3d Branch: master Commit: 57280673e51f6b60487e91369bd57213a8243a56 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/57280673e51f6b60487e91369bd572...
Author: Conor McCarthy cmccarthy@codeweavers.com Date: Thu Sep 14 19:29:24 2023 +1000
tests/shader-runner: Test shaders with dxcompiler.
The location of dxcompiler should be set during configuration with 'DXCOMPILER_LIBS=-L/path/to/dxcompiler', and then at runtime with LD_LIBRARY_PATH, WINEPATH or PATH as applicable.
A new 'fail(sm<6)' decoration is needed on many shader declarations because dxcompiler succeeds on many shaders which fail with fxc. The opposite case is less common and is flagged with 'fail(sm>=6)'. A few tests cause dxcompiler to crash or hang, so these are avoided using [require], which now skips tests until reset instead of exiting. Also, 'todo(sm<6)' and 'todo(sm>=6)' are used to separate checking of results.
---
Makefile.am | 10 +- README | 10 + configure.ac | 7 + tests/dxcompiler.idl | 168 ++++++++++++++ tests/hlsl/abs.shader_test | 8 +- tests/hlsl/all.shader_test | 14 +- tests/hlsl/any.shader_test | 36 +-- tests/hlsl/arithmetic-float-uniform.shader_test | 12 +- tests/hlsl/arithmetic-float.shader_test | 2 +- tests/hlsl/arithmetic-int-uniform.shader_test | 16 +- tests/hlsl/arithmetic-int.shader_test | 17 +- tests/hlsl/arithmetic-uint.shader_test | 12 +- tests/hlsl/array-dimension.shader_test | 7 +- tests/hlsl/array-index-expr.shader_test | 16 +- tests/hlsl/array-parameters.shader_test | 2 +- tests/hlsl/array-size-expr.shader_test | 2 +- tests/hlsl/asfloat.shader_test | 16 +- tests/hlsl/asuint.shader_test | 14 +- tests/hlsl/attributes.shader_test | 20 +- tests/hlsl/bool-cast.shader_test | 4 +- tests/hlsl/bool-semantics.shader_test | 2 +- .../hlsl/cast-componentwise-compatible.shader_test | 14 +- tests/hlsl/cast-componentwise-equal.shader_test | 10 +- tests/hlsl/cast-to-float.shader_test | 9 +- tests/hlsl/cast-to-half.shader_test | 8 +- tests/hlsl/cast-to-int.shader_test | 8 +- tests/hlsl/cast-to-uint.shader_test | 8 +- tests/hlsl/cbuffer.shader_test | 56 +++-- tests/hlsl/clamp.shader_test | 6 +- tests/hlsl/clip.shader_test | 8 +- tests/hlsl/combined-samplers.shader_test | 3 + tests/hlsl/compute.shader_test | 2 +- tests/hlsl/conditional.shader_test | 26 ++- tests/hlsl/const.shader_test | 4 +- tests/hlsl/cross.shader_test | 13 +- tests/hlsl/d3dcolor-to-ubyte4.shader_test | 12 +- tests/hlsl/ddxddy.shader_test | 8 +- tests/hlsl/discard.shader_test | 4 +- tests/hlsl/distance.shader_test | 2 +- tests/hlsl/dot.shader_test | 10 +- tests/hlsl/duplicate-modifiers.shader_test | 4 + tests/hlsl/entry-point-semantics.shader_test | 22 +- tests/hlsl/exp.shader_test | 4 +- tests/hlsl/expr-indexing.shader_test | 14 +- tests/hlsl/floor.shader_test | 18 +- tests/hlsl/fmod.shader_test | 16 +- tests/hlsl/for.shader_test | 4 +- tests/hlsl/frac.shader_test | 2 +- tests/hlsl/function-cast.shader_test | 9 +- tests/hlsl/function-overload.shader_test | 2 +- tests/hlsl/function-return.shader_test | 24 +- tests/hlsl/function.shader_test | 8 +- tests/hlsl/fwidth.shader_test | 2 +- tests/hlsl/gather-offset.shader_test | 12 +- tests/hlsl/gather.shader_test | 12 +- tests/hlsl/getdimensions.shader_test | 4 +- tests/hlsl/initializer-implicit-array.shader_test | 55 +++-- tests/hlsl/initializer-objects.shader_test | 4 +- tests/hlsl/intrinsic-override.shader_test | 24 +- tests/hlsl/invalid.shader_test | 12 +- tests/hlsl/is-front-face.shader_test | 4 +- tests/hlsl/ldexp.shader_test | 4 +- tests/hlsl/length.shader_test | 10 +- tests/hlsl/lerp.shader_test | 4 +- tests/hlsl/lit.shader_test | 37 ++- tests/hlsl/load-level.shader_test | 6 +- tests/hlsl/log.shader_test | 6 +- tests/hlsl/loop.shader_test | 8 +- tests/hlsl/majority-pragma.shader_test | 30 +-- tests/hlsl/majority-syntax.shader_test | 4 +- tests/hlsl/majority-typedef.shader_test | 2 +- tests/hlsl/math.shader_test | 7 +- tests/hlsl/matrix-indexing.shader_test | 10 +- tests/hlsl/matrix-semantics.shader_test | 16 +- tests/hlsl/max.shader_test | 12 +- tests/hlsl/nested-arrays.shader_test | 4 +- tests/hlsl/nointerpolation.shader_test | 10 +- tests/hlsl/normalize.shader_test | 10 +- tests/hlsl/numeric-types.shader_test | 6 +- tests/hlsl/numthreads.shader_test | 10 +- tests/hlsl/object-field-offsets.shader_test | 6 +- tests/hlsl/object-parameters.shader_test | 18 +- tests/hlsl/object-references.shader_test | 18 +- tests/hlsl/pow.shader_test | 6 +- tests/hlsl/reflect.shader_test | 12 +- tests/hlsl/register-reservations.shader_test | 22 +- tests/hlsl/return-implicit-conversion.shader_test | 2 +- tests/hlsl/return.shader_test | 34 +-- tests/hlsl/round.shader_test | 18 +- tests/hlsl/sample-bias.shader_test | 6 +- tests/hlsl/sample-grad.shader_test | 6 +- tests/hlsl/sample-level.shader_test | 6 +- tests/hlsl/sampler-offset.shader_test | 6 +- tests/hlsl/sampler.shader_test | 8 +- tests/hlsl/saturate.shader_test | 12 +- tests/hlsl/shader-interstage-interface.shader_test | 2 +- tests/hlsl/side-effects.shader_test | 5 + tests/hlsl/sign.shader_test | 20 +- tests/hlsl/smoothstep.shader_test | 2 +- tests/hlsl/sqrt.shader_test | 4 +- tests/hlsl/state-block-syntax.shader_test | 20 +- tests/hlsl/static-initializer.shader_test | 6 +- tests/hlsl/step.shader_test | 2 +- tests/hlsl/storage-qualifiers.shader_test | 29 ++- tests/hlsl/struct-array.shader_test | 2 +- tests/hlsl/swizzle-constant-prop.shader_test | 6 +- tests/hlsl/swizzle-matrix.shader_test | 6 +- tests/hlsl/swizzles.shader_test | 6 +- tests/hlsl/ternary.shader_test | 10 +- tests/hlsl/texture-load-offset.shader_test | 4 +- tests/hlsl/texture-load-typed.shader_test | 17 ++ tests/hlsl/texture-load.shader_test | 6 +- tests/hlsl/texture-ordering.shader_test | 3 + tests/hlsl/trigonometry.shader_test | 8 +- tests/hlsl/trunc.shader_test | 20 +- tests/hlsl/type-names.shader_test | 6 +- tests/hlsl/uav-load.shader_test | 2 +- tests/hlsl/uav-out-param.shader_test | 4 +- tests/hlsl/uav-rwbuffer.shader_test | 8 +- tests/hlsl/uav-rwstructuredbuffer.shader_test | 2 +- tests/hlsl/uav-rwtexture.shader_test | 22 +- tests/hlsl/uniform-parameters.shader_test | 35 +++ tests/hlsl/uniform-semantics.shader_test | 4 +- tests/hlsl/vector-indexing-uniform.shader_test | 2 +- tests/hlsl/vector-indexing.shader_test | 4 +- tests/hlsl/writemask-assignop-0.shader_test | 2 +- tests/hlsl/writemask-assignop-1.shader_test | 2 +- tests/shader_runner.c | 257 +++++++++++++++++++-- tests/shader_runner.h | 10 +- tests/shader_runner_d3d11.c | 2 +- tests/shader_runner_d3d12.c | 42 +++- tests/shader_runner_d3d9.c | 2 +- tests/shader_runner_vulkan.c | 2 +- 133 files changed, 1268 insertions(+), 556 deletions(-)