vkd3d/tests
Francisco Casas ef7cf9b1ad vkd3d-shader/hlsl: Support resource arrays when writting SM4.
The new fixmes can be triggered in presence of object components within
structs (for SM5).

In shaders such as this one:

    struct apple
    {
        Texture2D tex : TEX;
        float4 color : COLOR;
    };

    float4 main(struct apple input) : sv_target
    {
        return input.tex.Load(int3(1, 2, 3));
    }

Or this one:

    struct
    {
        Texture2D tex;
        float4 color;
    } s;

    float4 main() : sv_target
    {
        return s.tex.Load(int3(1, 2, 3));
    }
2023-05-08 20:24:15 +02:00
..
.gitignore tests: Add some C HLSL preprocessor tests. 2020-11-24 22:28:11 +01:00
abs.shader_test vkd3d-shader/hlsl: Parse the abs() intrinsic. 2021-09-20 20:53:01 +02:00
all.shader_test vkd3d-shader/hlsl: Support all() intrinsic. 2023-02-20 21:59:37 +01:00
any.shader_test tests: Add tests for any() intrinsic. 2023-04-19 20:46:53 +02:00
arithmetic-float-uniform.shader_test tests: Test float operations with uniform inputs. 2022-10-19 21:59:18 +02:00
arithmetic-float.shader_test tests: Test sign rules for float modulus. 2022-10-19 21:59:18 +02:00
arithmetic-int-uniform.shader_test tests: Test sign rules for integer division and modulus. 2022-10-19 21:59:18 +02:00
arithmetic-int.shader_test tests: Test sign rules for integer division and modulus. 2022-10-19 21:59:18 +02:00
arithmetic-uint.shader_test vkd3d-shader/hlsl: Fold constant modulus. 2022-04-15 21:18:20 +02:00
array-parameters.shader_test vkd3d-shader/hlsl: Find compatible function overloads. 2023-02-20 21:59:53 +01:00
asfloat.shader_test vkd3d-shader/hlsl: Implement asfloat(). 2023-05-02 20:46:16 +02:00
asuint.shader_test tests: Fix a typo in asuint() test shader. 2023-05-02 20:46:16 +02:00
bitwise.shader_test tests: Mark some tests as requiring shader model 4.0. 2022-03-08 17:45:21 +01:00
bool-semantics.shader_test vkd3d-shader/hlsl: Normalize bools when loading from uniforms or vertex input. 2023-05-01 22:18:36 +02:00
cast-broadcast.shader_test vkd3d-shader/hlsl: Find compatible function overloads. 2023-02-20 21:59:53 +01:00
cast-componentwise-compatible.shader_test tests: Add additional tests for explicit casts with flat matrices and vectors. 2022-10-26 23:53:12 +02:00
cast-componentwise-equal.shader_test vkd3d-shader/hlsl: Find compatible function overloads. 2023-02-20 21:59:53 +01:00
cast-to-float.shader_test vkd3d-shader/hlsl: Write SM4 casts from bool. 2022-07-05 22:43:18 +02:00
cast-to-half.shader_test vkd3d-shader/hlsl: Treat half as float for casts. 2023-04-06 17:51:55 +02:00
cast-to-int.shader_test vkd3d-shader/hlsl: Normalize bools when loading from uniforms or vertex input. 2023-05-01 22:18:36 +02:00
cast-to-uint.shader_test vkd3d-shader/hlsl: Normalize bools when loading from uniforms or vertex input. 2023-05-01 22:18:36 +02:00
cbuffer.shader_test vkd3d-shader/hlsl: Handle uppercase regset names in packoffset(). 2023-04-19 20:45:50 +02:00
compute.shader_test vkd3d-shader/hlsl: Write SM4 dcl_thread_group instructions. 2022-11-08 20:53:08 +01:00
conditional.shader_test tests: Simplify "probe" directive syntax and parsing a bit. 2022-04-20 23:01:04 +02:00
d3d12_crosstest.h tests/shader_runner: Use the global test_options structure. 2023-03-10 21:13:05 +01:00
d3d12_invalid_usage.c tests/shader_runner: Use the global test_options structure. 2023-03-10 21:13:05 +01:00
d3d12_test_utils.h tests: Add a test for compute thread IDs. 2023-01-25 22:10:30 +01:00
d3d12.c tests/d3d12: Test register relative addressing in vertex and pixel shaders. 2023-05-03 21:12:09 +02:00
ddxddy.shader_test tests: Add tests for ddx(), ddy() intrinsics. 2023-04-28 21:03:43 +02:00
distance.shader_test vkd3d-shader/hlsl: Support distance() intrinsic. 2023-03-08 20:14:22 +01:00
entry-point-semantics.shader_test vkd3d-shader/hlsl: Error out when a semantic is used with incompatible types. 2023-05-01 22:18:24 +02:00
exp.shader_test vkd3d-shader/tests: Add some exp()/exp2() tests. 2023-01-26 21:52:29 +01:00
expr-indexing.shader_test tests: Test indexing of non-loads. 2023-04-13 23:05:25 +02:00
floor.shader_test tests: Mark some tests as requiring shader model 4.0. 2022-03-08 17:45:21 +01:00
fmod.shader_test vkd3d-shader/hlsl: Add support for fmod() intrinsic. 2023-05-08 20:21:52 +02:00
frac.shader_test vkd3d-shader/hlsl: Support frac() intrinsic. 2023-01-25 22:10:05 +01:00
function-return.shader_test vkd3d-shader/hlsl: Write SM4 break instructions. 2023-02-15 21:53:21 +01:00
hlsl_d3d12.c include: Make test context information nestable. 2023-04-04 21:59:58 +02:00
hlsl-array-dimension.shader_test tests: Always compile HLSL shaders. 2022-11-08 20:52:57 +01:00
hlsl-array-size-expr.shader_test vkd3d-shader/hlsl: Partially implement static expressions evaluation. 2023-05-02 20:46:08 +02:00
hlsl-attributes.shader_test vkd3d-shader/hlsl: Parse function attributes. 2022-11-08 20:53:03 +01:00
hlsl-bool-cast.shader_test vkd3d-shader/hlsl: Normalize bools when loading from uniforms or vertex input. 2023-05-01 22:18:36 +02:00
hlsl-clamp.shader_test vkd3d-shader/hlsl: Convert elementwise intrinsics args to the proper common type. 2023-01-11 16:02:56 +01:00
hlsl-comma.shader_test tests: Import comma tests from Wine. 2020-10-02 19:04:03 +02:00
hlsl-cross.shader_test vkd3d-shader/hlsl: Implement cross() intrinsic function. 2021-11-22 16:25:05 +01:00
hlsl-d3dcolor-to-ubyte4.shader_test vkd3d-shader/hlsl: Implement D3DCOLORtoUBYTE4() function. 2023-04-28 21:04:13 +02:00
hlsl-discard.shader_test tests: Add a simple test for "discard". 2023-04-26 22:46:52 +02:00
hlsl-dot.shader_test vkd3d-shader/hlsl: Use mul only for two scalars for dot(). 2023-02-15 21:53:15 +01:00
hlsl-duplicate-modifiers.shader_test vkd3d-shader/hlsl: Lower matrix casts. 2022-06-09 19:13:22 +02:00
hlsl-for.shader_test vkd3d-shader/hlsl: Ignore "unroll" attribute for loops. 2023-04-21 20:55:48 +02:00
hlsl-function-cast.shader_test tests: Always compile HLSL shaders. 2022-11-08 20:52:57 +01:00
hlsl-function-overload.shader_test tests: Always compile HLSL shaders. 2022-11-08 20:52:57 +01:00
hlsl-function.shader_test vkd3d-shader/hlsl: Always load from a synthetic copy in add_load_component(). 2023-04-13 23:05:39 +02:00
hlsl-gather-offset.shader_test tests: Add tests for texture gather methods. 2022-01-26 18:36:28 +01:00
hlsl-gather.shader_test tests: Always compile HLSL shaders. 2022-11-08 20:52:57 +01:00
hlsl-initializer-flatten.shader_test vkd3d-shader/hlsl: Support all complex initalizers. 2022-04-27 21:45:41 +02:00
hlsl-initializer-implicit-array.shader_test vkd3d-shader/hlsl: Support initialization of implicit size arrays. 2022-08-23 15:57:54 -05:00
hlsl-initializer-invalid-arg-count.shader_test vkd3d-shader/hlsl: Support all complex initalizers. 2022-04-27 21:45:41 +02:00
hlsl-initializer-local-array.shader_test vkd3d-shader/hlsl: Support all complex initalizers. 2022-04-27 21:45:41 +02:00
hlsl-initializer-matrix.shader_test vkd3d-shader/hlsl: Lower matrix casts. 2022-06-09 19:13:22 +02:00
hlsl-initializer-nested.shader_test vkd3d-shader/hlsl: Support all complex initalizers. 2022-04-27 21:45:41 +02:00
hlsl-initializer-numeric.shader_test vkd3d-shader/hlsl: Support complex numeric initializers. 2022-04-15 21:18:15 +02:00
hlsl-initializer-objects.shader_test vkd3d-shader/hlsl: Replace loads with constants in copy prop. 2023-01-24 18:10:45 +01:00
hlsl-initializer-static-array.shader_test vkd3d-shader/hlsl: Support all complex initalizers. 2022-04-27 21:45:41 +02:00
hlsl-initializer-struct.shader_test vkd3d-shader/hlsl: Support all complex initalizers. 2022-04-27 21:45:41 +02:00
hlsl-intrinsic-override.shader_test vkd3d-shader/hlsl: Always load from a synthetic copy in add_load_component(). 2023-04-13 23:05:39 +02:00
hlsl-invalid.shader_test vkd3d-shader/hlsl: Partially implement static expressions evaluation. 2023-05-02 20:46:08 +02:00
hlsl-is-front-face.shader_test tests: Add a test for SV_IsFrontFace. 2023-04-13 23:05:00 +02:00
hlsl-ldexp.shader_test vkd3d-shader/hlsl: Convert elementwise intrinsics args to the proper common type. 2023-01-11 16:02:56 +01:00
hlsl-length.shader_test vkd3d-shader/hlsl: Write SM4 square root instructions. 2022-10-17 17:58:12 +02:00
hlsl-lerp.shader_test vkd3d-shader/hlsl: Convert elementwise intrinsics args to the proper common type. 2023-01-11 16:02:56 +01:00
hlsl-majority-pragma.shader_test vkd3d-shader/hlsl: Apply latent majority modifiers to typedefs as well. 2023-02-28 22:07:00 +01:00
hlsl-majority-typedef.shader_test vkd3d-shader/hlsl: Parse the mul() intrinsic. 2022-06-09 19:13:29 +02:00
hlsl-matrix-indexing.shader_test vkd3d-shader/hlsl: Support column-major matrix indexing in the lhs. 2023-04-13 23:05:41 +02:00
hlsl-mul.shader_test tests: Test for common type conversion for element-wise intrinsics. 2023-01-11 16:02:53 +01:00
hlsl-nested-arrays.shader_test tests: Add some tests for nested arrays. 2021-03-05 18:00:55 +01:00
hlsl-normalize.shader_test tests: Set ULPs to 2 in normalize() test. 2022-10-17 17:58:50 +02:00
hlsl-numeric-constructor-truncation.shader_test vkd3d-shader/hlsl: Parse matrix constructors. 2022-04-27 21:45:45 +02:00
hlsl-numeric-types.shader_test vkd3d-shader/hlsl: Allow storing to matrices. 2022-05-02 11:30:18 +02:00
hlsl-numthreads.shader_test vkd3d-shader/hlsl: Inline function calls. 2023-02-13 22:16:53 +01:00
hlsl-return-implicit-conversion.shader_test vkd3d-shader/hlsl: Inline function calls. 2023-02-13 22:16:53 +01:00
hlsl-shape.shader_test vkd3d-shader/hlsl: Split matrix operations. 2022-06-09 19:13:27 +02:00
hlsl-single-numeric-initializer.shader_test tests: Test single numeric initializers. 2022-02-04 16:45:57 +01:00
hlsl-smoothstep.shader_test vkd3d-shader/hlsl: Convert elementwise intrinsics args to the proper common type. 2023-01-11 16:02:56 +01:00
hlsl-state-block-syntax.shader_test vkd3d-shader/hlsl: Parse state blocks in variable definitions. 2021-10-01 19:32:26 +02:00
hlsl-static-initializer.shader_test vkd3d-shader/hlsl: Inline function calls. 2023-02-13 22:16:53 +01:00
hlsl-storage-qualifiers.shader_test vkd3d-shader/hlsl: Inline function calls. 2023-02-13 22:16:53 +01:00
hlsl-struct-array.shader_test tests: Mark some more tests as requiring shader model 4.0. 2022-04-07 18:32:21 +02:00
hlsl-struct-assignment.shader_test tests: Import HLSL struct assignment tests from Wine. 2020-10-05 20:52:46 +02:00
hlsl-struct-semantics.shader_test tests: Try to avoid using SV_Position from shaders which can be tested with SM1. 2022-04-08 11:49:31 +02:00
hlsl-ternary.shader_test vkd3d-shader/hlsl: Add support for ternary operator. 2023-04-06 17:51:46 +02:00
hlsl-transpose.shader_test vkd3d-shader/hlsl: Support transpose() intrinsic. 2023-01-11 16:02:50 +01:00
hlsl-trunc.shader_test vkd3d-shader/hlsl: Partially implement trunc(). 2023-04-28 21:04:11 +02:00
hlsl-type-names.shader_test vkd3d-shader/hlsl: Improve handling of builtin alias type "vector". 2023-04-03 17:59:08 +02:00
hlsl-vector-indexing-uniform.shader_test tests: Always compile HLSL shaders. 2022-11-08 20:52:57 +01:00
hlsl-vector-indexing.shader_test vkd3d-shader/hlsl: Make single-component swizzles retrieve a scalar. 2023-01-26 21:52:18 +01:00
lit.shader_test vkd3d-shader/hlsl: Support lit() intrinsic. 2023-02-21 21:09:52 +01:00
log.shader_test vkd3d-shader/hlsl: Support log() intrinsic. 2023-04-13 23:04:44 +02:00
logic-operations.shader_test vkd3d-shader/hlsl: Write SM4 logic or instructions. 2022-07-05 22:43:28 +02:00
majority-syntax.shader_test vkd3d-shader/hlsl: Check for majority modifiers on non-matrices in apply_type_modifiers(). 2023-02-20 21:59:42 +01:00
math.shader_test tests: Use SM1-compatible uniform layouts in shader tests. 2022-03-08 17:45:16 +01:00
matrix-semantics.shader_test vkd3d-shader/hlsl: Error out when an output semantic is used more than once. 2023-05-01 22:18:22 +02:00
max.shader_test vkd3d-shader/hlsl: Convert elementwise intrinsics args to the proper common type. 2023-01-11 16:02:56 +01:00
minimum-precision.shader_test vkd3d-shader/hlsl: Reinterpret minimum precision types as their regular counterparts. 2023-01-25 22:10:23 +01:00
multiple-rt.shader_test tests: Add a test for multiple render targets. 2022-06-09 19:13:12 +02:00
nointerpolation.shader_test tests: Add a test for the "nointerpolation" modifier. 2022-03-22 18:41:43 +01:00
object-field-offsets.shader_test vkd3d-shader/hlsl: Fix numeric offset of object fields. 2023-04-13 23:05:07 +02:00
object-parameters.shader_test tests: Test objects as parameters. 2023-05-08 20:24:14 +02:00
object-references.shader_test vkd3d-shader/hlsl: Support resource arrays when writting SM4. 2023-05-08 20:24:15 +02:00
pow.shader_test vkd3d-shader/hlsl: Use add_unary_arithmetic_expr() in intrinsic_pow(). 2023-01-11 16:02:59 +01:00
preproc-if-expr.shader_test vkd3d-shader/preproc: Allow capital U and L after integer constants as well. 2022-02-02 21:06:21 +01:00
preproc-if.shader_test tests: Add some basic tests for #if and related preprocessor directives. 2020-11-23 22:07:44 +01:00
preproc-ifdef.shader_test tests: Add some tests for #ifdef and defined(). 2020-11-23 22:07:47 +01:00
preproc-invalid.shader_test tests: Add some tests for shaders which fail to preprocess. 2020-11-24 22:27:59 +01:00
preproc-macro.shader_test tests: Add some tests for macro expansion. 2020-11-24 22:27:53 +01:00
preproc-misc.shader_test tests: Add some more miscellaneous preprocessor tests. 2020-11-24 22:28:05 +01:00
reflect.shader_test vkd3d-shader/hlsl: Support reflect() intrinsic. 2023-02-20 21:59:23 +01:00
register-reservations.shader_test vkd3d-shader/hlsl: Support resource arrays when writting SM4. 2023-05-08 20:24:15 +02:00
return.shader_test vkd3d-shader/hlsl: Write SM4 break instructions. 2023-02-15 21:53:21 +01:00
round.shader_test tests: Avoid using non-float uniforms where possible. 2022-03-08 17:45:18 +01:00
sampler-offset.shader_test vkd3d-shader/hlsl: Replace loads with constants in copy prop. 2023-01-24 18:10:45 +01:00
sampler.shader_test vkd3d-shader/hlsl: Track objects sampling dimension. 2023-05-08 20:24:15 +02:00
saturate.shader_test tests: Avoid using non-float uniforms where possible. 2022-03-08 17:45:18 +01:00
shader_runner_d3d9.c tests: Disable culling in shader runners. 2023-04-13 23:05:00 +02:00
shader_runner_d3d11.c tests: Disable culling in shader runners. 2023-04-13 23:05:00 +02:00
shader_runner_d3d12.c tests: Test objects as parameters. 2023-05-08 20:24:14 +02:00
shader_runner_vulkan.c tests: Remove rtv clears in Vulkan runner. 2023-04-26 22:46:52 +02:00
shader_runner.c tests: Test bool semantics. 2023-05-01 22:18:33 +02:00
shader_runner.h tests/shader_runner: Use the global test_options structure. 2023-03-10 21:13:05 +01:00
shader-interstage-interface.shader_test tests: Make test_shader_interstage_interface() into a shader test. 2022-04-05 17:50:22 +02:00
side-effects.shader_test vkd3d-shader/hlsl: Evaluate index before array. 2023-04-13 23:05:43 +02:00
sign.shader_test vkd3d-shader/hlsl: Add support for sign() intrinsic. 2023-05-01 22:18:41 +02:00
sqrt.shader_test vkd3d-shader/hlsl: Support rsqrt() intrinsic. 2023-03-08 20:14:20 +01:00
step.shader_test vkd3d-shader/hlsl: Parse step() intrinsic. 2023-01-19 19:16:17 +01:00
swizzle-constant-prop.shader_test vkd3d-shader/hlsl: Fold swizzle chains. 2023-01-24 18:10:53 +01:00
swizzles.shader_test tests: Add tests for assignments to self with swizzles. 2023-01-26 21:52:18 +01:00
texture-load-offset.shader_test vkd3d-shader/hlsl: Replace loads with constants in copy prop. 2023-01-24 18:10:45 +01:00
texture-load-typed.shader_test tests: Mark some more tests as requiring shader model 4.0. 2022-04-07 18:32:21 +02:00
texture-load.shader_test vkd3d-shader/hlsl: Parse texture index expressions. 2022-10-19 21:59:55 +02:00
trigonometry.shader_test vkd3d-shader/hlsl: Support cos() intrinsic. 2023-01-19 19:16:15 +01:00
uav-load.shader_test vkd3d-shader/hlsl: Write SM4 dcl_thread_group instructions. 2022-11-08 20:53:08 +01:00
uav-out-param.shader_test vkd3d-shader/hlsl: Inline function calls. 2023-02-13 22:16:53 +01:00
uav.shader_test vkd3d-shader/hlsl: Support resource arrays when writting SM4. 2023-05-08 20:24:15 +02:00
utils.h tests: Read integer uniforms with strtol() and strtoul(). 2023-04-03 18:00:14 +02:00
vkd3d_api.c tests: Distinguish between cross and non-cross Win32 builds. 2023-01-24 18:10:15 +01:00
vkd3d_common.c vkd3d-common: Move vkd3d_write_mask_is_contiguous() from vkd3d-shader. 2019-07-05 17:52:04 +02:00
vkd3d_shader_api.c include: Make test context information nestable. 2023-04-04 21:59:58 +02:00
vulkan_procs.h tests: Add a basic shader test for compute shaders. 2022-10-19 21:59:29 +02:00
writemask-assignop-0.shader_test tests: Add some tests for fused assignment operations with writemasks. 2021-03-15 20:39:13 +01:00
writemask-assignop-1.shader_test tests: Add some tests for fused assignment operations with writemasks. 2021-03-15 20:39:13 +01:00
writemask-assignop-2.shader_test tests: Add some tests for fused assignment operations with writemasks. 2021-03-15 20:39:13 +01:00
writemask-assignop-3.shader_test tests: Add some tests for fused assignment operations with writemasks. 2021-03-15 20:39:13 +01:00