Commit Graph

1363 Commits

Author SHA1 Message Date
Francisco Casas
e6b7b38a29 tests: Test current failure when propagating swizzles.
The included test fails because copy_propagation_transform_swizzle()
is using the value recorded for the variable when the swizzle is being
read, and not the swizzle's load.
2023-11-29 22:53:16 +01:00
Zebediah Figura
d1ce069ea6 tests/shader_runner: Remove an unnecessary local variable declaration.
Found with -Wshadow.
2023-11-28 00:09:51 +01:00
Alistair Leslie-Hughes
5c134d44d6 include: D3D12_RT_FORMAT_ARRAY remove typedef to make header compatible with windows.
windows d3d12.idl doesn't have this as a typedef.
2023-11-28 00:09:20 +01:00
Giovanni Mascellani
f0a16d84ce ci: Execute the shader runner on the correct test data on Windows. 2023-11-23 22:37:21 +01:00
Henri Verbeet
beb3f6e0c2 tests: Introduce an OpenGL shader runner. 2023-11-22 22:08:11 +01:00
Francisco Casas
4e1bf5e163 vkd3d-shader/hlsl: Discern between signed and unsigned ints when parsing. 2023-11-22 22:08:05 +01:00
Francisco Casas
1ee9e23e00 tests: Test overloads with signed and unsigned numeric values. 2023-11-22 22:08:05 +01:00
Francisco Casas
9a8f6e0edb vkd3d-shader/hlsl: Parse integers with the 'u' postfix. 2023-11-22 22:08:04 +01:00
Francisco Casas
3f09cdcaa1 tests: Test integers with the 'u' postfix. 2023-11-22 22:08:04 +01:00
Conor McCarthy
eb05e434ff vkd3d-shader/dxil: Implement the DXIL LOAD instruction. 2023-11-22 22:07:59 +01:00
Henri Verbeet
73c563ffb7 vkd3d-shader/d3dbc: Adjust the token count for DEF and DEFI instructions in shader_sm1_skip_opcode().
This was broken by commit e390bc35e2c9b0a2110370f916033eea2366317e; that
commit fixed the source count for these instructions, but didn't adjust
shader_sm1_skip_opcode(). Note that this only affects shader model 1;
later versions have a token count embedded in the initial opcode token.
2023-11-20 22:07:29 +01:00
Akihiro Sagawa
aed2d142cf vkd3d-shader/hlsl: Add degrees() function. 2023-11-20 22:07:19 +01:00
Akihiro Sagawa
e493627130 vkd3d-shader/hlsl: Add radians() function. 2023-11-20 22:07:17 +01:00
Conor McCarthy
63b8972b0e tests: Test CreatePipelineState().
Based on vkd3d-proton patches by Hans-Kristian Arntzen and Philip
Rebohle.
2023-11-15 21:48:44 +01:00
Conor McCarthy
3c4631a4d4 vkd3d-shader/dxil: Implement the DXIL VSELECT instruction. 2023-11-15 21:48:35 +01:00
Conor McCarthy
130e7bdf0f tests/shader-runner: Add tests for 64-bit casts. 2023-11-15 21:48:33 +01:00
Conor McCarthy
38e85079aa tests/shader-runner: Add a test for float comparisons. 2023-11-15 21:48:30 +01:00
Conor McCarthy
d957247c67 tests/shader-runner: Run d3d11 tests with a mimimum shader model of 4.0.
Passing less than 4.0 breaks the use of [require] with
'shader model < 4.0'.
2023-11-15 21:48:28 +01:00
Henri Verbeet
9de793f180 vkd3d-shader: Implement scanning combined resource/sampler information. 2023-11-13 23:19:23 +01:00
Nikolay Sivov
41a72a4eae tests: Fix some spelling mistakes. 2023-11-13 23:19:14 +01:00
Conor McCarthy
d3b90cc877 vkd3d-shader/dxil: Implement the DXIL CMP2 instruction. 2023-11-10 20:23:50 +01:00
Zebediah Figura
514d179b70 vkd3d-shader/hlsl: Do not consider scalars and 1-dimensional vectors to be equivalent in function parameters. 2023-11-09 21:15:14 +01:00
Zebediah Figura
3e35570221 tests: Add some more tests for function overloads. 2023-11-09 21:15:08 +01:00
Conor McCarthy
90d178bf12 vkd3d-shader/dxil: Implement the DXIL CAST instruction. 2023-11-09 21:14:42 +01:00
Zebediah Figura
0805ce121e tests: Add more semantics to test_nop_tessellation_shaders().
To act as a regression test for 852eefc01d.
2023-11-08 22:49:51 +01:00
Nikolay Sivov
4778d051df vkd3d-shader: Add constant folding for 'floor'.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-08 22:49:40 +01:00
Nikolay Sivov
494f681bf6 vkd3d-shader/tpf: Add support for ceil().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-08 22:49:38 +01:00
Nikolay Sivov
e57bf3db0b tests: Add some tests for ceil().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-08 22:49:37 +01:00
Nikolay Sivov
522a0dfb56 vkd3d-shader/hlsl: Add tex2Dlod() function.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-08 22:49:26 +01:00
Francisco Casas
0ef25ad137 vkd3d-shader/tpf: Support relative addressing for indexable temps in SM4.
For relative addressing, the vkd3d_shader_registers must point to
another vkd3d_shader_src_param. For now, use the sm4_instruction to save
them, since the only purpose of this struct is to be used as paramter
for write_sm4_instruction.
2023-11-07 22:25:49 +01:00
Francisco Casas
915f9f1373 tests: Add aditional relative addressing tests. 2023-11-07 22:25:44 +01:00
Francisco Casas
3deb3b5a21 tests: Rename array-index-expr.shader_test as non-const-indexing.shader_test. 2023-11-07 22:25:42 +01:00
Conor McCarthy
749df8dec2 vkd3d-shader/dxil: Implement the DXIL BINOP instruction. 2023-11-06 23:09:03 +01:00
Conor McCarthy
7419f4e31d vkd3d-shader/dxil: Allow empty struct types. 2023-11-02 18:23:12 +01:00
Nikolay Sivov
dbcc4c4e40 vkd3d-shader/hlsl: Parse empty technique declarations.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-02 18:23:07 +01:00
Nikolay Sivov
53b0101a53 vkd3d-shader/hlsl: Use case-insensitive match for the "technique" keyword.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-02 18:23:06 +01:00
Nikolay Sivov
ea8ff5394c vkd3d-shader/hlsl: Add a keyword for fx_5_0 techniques.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-02 18:23:05 +01:00
Nikolay Sivov
c588f33822 tests: Add some tests for using technique blocks when compiling for pixel/vertex profiles.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-02 18:23:04 +01:00
Nikolay Sivov
ecdc3f39d4 vkd3d-shader: Accept 'loop' attribute, on loops.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-01 21:47:49 +01:00
Nikolay Sivov
26784672d8 vkd3d-shader: Check loop [unroll] attribute for conflict with other attributes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-01 21:47:49 +01:00
Nikolay Sivov
b8047fd650 tests: Add some tests for loop attributes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-01 21:47:49 +01:00
Giovanni Mascellani
c691ad8869 tests: Immediately transition buffers after creation in the shader runner.
The resource could be destructed before the command list left open
is executed; instead, we immediately perform the transition.
2023-11-01 21:47:44 +01:00
Giovanni Mascellani
46b7fccfd7 tests: Immediately transition textures after creation in the shader runner.
The resource could be destructed before the command list left open
is executed; instead, we immediately perform the transition.
2023-11-01 21:47:43 +01:00
Giovanni Mascellani
ca7fa0c015 tests: Immediately transition resources after readback in the shader runner.
The resource could be destructed before the command list left open
is executed; instead, we immediately perform the transition.
2023-11-01 21:47:41 +01:00
Conor McCarthy
589670180a vkd3d-shader/dxil: Implement the DXIL EXTRACTVAL instruction. 2023-11-01 21:47:34 +01:00
Nikolay Sivov
8e5c8c1725 tests: Add some tests for 'technique' token behaviour.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:59:45 +01:00
Nikolay Sivov
214d44fb11 tests: Add [effect] section support.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:59:45 +01:00
Nikolay Sivov
ea554b91d7 tests: Remove unused parameter from mul() tests functions. 2023-10-31 21:59:29 +01:00
Francisco Casas
ab463f74bd tests: Test array indexing with multiple swizzles. 2023-10-31 21:59:11 +01:00
Nikolay Sivov
bc2a4ee66a vkd3d-shader/tpf: Write out 'switch' statements.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:59:05 +01:00
Nikolay Sivov
68c14079a6 vkd3d-shader/hlsl: Add a pass to normalize switch cases blocks.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:59:04 +01:00
Nikolay Sivov
72623031a2 vkd3d-shader/hlsl: Validate break/continue context.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:59:01 +01:00
Nikolay Sivov
ec8dfa467f vkd3d-shader/hlsl: Add initial support for parsing 'switch' statements.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:58:57 +01:00
Nikolay Sivov
ebb5aacabf tests: Add some tests for the 'switch' statements.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:58:57 +01:00
Giovanni Mascellani
f462d237c1 ci: Run shader tests on Windows. 2023-10-31 21:58:53 +01:00
Giovanni Mascellani
dbc5e7d07c ci: Run cross tests on Windows.
A driver program is introduced to coordinate test running on Windows,
similarly to what "make test" does on Linux and macOS.
2023-10-31 21:58:51 +01:00
Henri Verbeet
f75bdd6e21 vkd3d-utils: Implement D3DStripShader(). 2023-10-19 23:07:50 +02:00
Henri Verbeet
96556a8834 vkd3d-shader/hlsl: Add support for RWTexture2DArray. 2023-10-19 23:07:31 +02:00
Henri Verbeet
6fe781ff50 tests: Add basic RWTexture2DArray tests. 2023-10-19 23:07:31 +02:00
Henri Verbeet
2c71c18879 vkd3d-shader/hlsl: Add support for RWTexture1DArray. 2023-10-19 23:07:30 +02:00
Henri Verbeet
ae9d29a377 tests: Add basic RWTexture1DArray tests. 2023-10-19 23:07:29 +02:00
Henri Verbeet
b63c853688 vkd3d-utils: Implement D3DGetBlobPart().
This was largely adapted from Wine's d3dcompiler_43, with some style
adjustments.
2023-10-18 20:58:22 +02:00
Giovanni Mascellani
0dc40d7c1e tests: Skip processing resources according to [require] directives. 2023-10-18 20:58:19 +02:00
Giovanni Mascellani
d69c04471e tests: Do not test matrix majority on SM1-3.
I'm not sure of what's happening here, but it seems that this change
fixes a crash when running on Windows in the CI. Since most of the
test excludes SM1-3 anyway, this shouldn't be a big loss.
2023-10-18 20:58:18 +02:00
Giovanni Mascellani
ca51c359ec tests: Fix the usage of require directives.
They are reset each time "[require]" is encountered.
2023-10-18 20:58:17 +02:00
Giovanni Mascellani
ead98ef329 tests: Remove an irrelevant input from a test.
The irrelevant input caused the test to fail on D3D12 for reasons
unrelated to the test's goal.
2023-10-18 20:58:16 +02:00
Giovanni Mascellani
671548494f tests: Do not test integral types for SM1-3. 2023-10-18 20:58:16 +02:00
Giovanni Mascellani
90f9407b80 tests: Do not use global half values.
They are not allowed by the native compiler, except in compatibility
mode.
2023-10-18 20:58:14 +02:00
Henri Verbeet
803e5183cc tests: Specify argument types for dxcompiler_create(). 2023-10-17 22:18:36 +02:00
Henri Verbeet
47d4097efa vkd3d-utils: Check for a NULL 'blob' pointer in D3DCreateBlob(). 2023-10-16 22:36:58 +02:00
Giovanni Mascellani
eaf35c394d tests: Skip test_atomic_instructions() on WARP.
Pipeline creation fails with E_INVALIDARG, atomics are likely not
supported on WARP.
2023-10-16 22:36:52 +02:00
Giovanni Mascellani
0d4a5f1860 tests: Skip test_unbounded_resource_arrays() on WARP.
Most reads on WARP are off by a few units. I haven't investigated
the reason.
2023-10-16 22:36:50 +02:00
Giovanni Mascellani
fe88dafdbd tests: Skip test_execute_indirect() on WARP.
The device is eventually lost, indirect commands are likely not
supported on WARP.
2023-10-16 22:36:49 +02:00
Giovanni Mascellani
ee3c4b6555 tests: Skip test_get_copyable_footprints() on WARP.
There are 12025 failures with WARP. I haven't investigated them.
2023-10-16 22:36:47 +02:00
Giovanni Mascellani
d72e30f1d1 tests: Skip test_null_vbv() on WARP.
On WARP 0xffffffff is read instead of zero.
2023-10-16 22:36:45 +02:00
Giovanni Mascellani
14c9be697f tests: Acknowledge some double operations being broken on WARP. 2023-10-16 22:36:45 +02:00
Giovanni Mascellani
3f87cf9d7f tests: Acknowledge WARP giving a GPU handle to a non-shader-visible descriptor heap.
WARP has no GPU, so it probably treats GPU handles just like CPU handles.
2023-10-16 22:36:43 +02:00
Giovanni Mascellani
862dcf27a6 tests: Acknowledge WARP accepting some unusual CreateCommittedResource() configuration.
A software implementation can conceivably satisfy some requests that
cannot work on real hardware.
2023-10-16 22:36:41 +02:00
Conor McCarthy
e0d0a04b79 vkd3d-shader/dxil: Handle multi-row signature elements. 2023-10-16 22:36:38 +02:00
Henri Verbeet
e53178f395 tests: Use the same viewport origin and front-face orientation in the Vulkan and D3D runners.
I.e., top-left origin, and clockwise front-facing. These end up cancelling
each other out when drawing full-screen quads, but that's not necessarily true
for other geometry.
2023-10-16 22:36:22 +02:00
Giovanni Mascellani
c1de65a99b tests: Fail if dxcompiler is not available at runtime. 2023-10-16 22:36:17 +02:00
Conor McCarthy
57280673e5 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.
2023-10-11 22:21:14 +02:00
Conor McCarthy
d211160b89 tests/shader-runner: Replace immediate shader type strings with an enum. 2023-10-11 22:21:14 +02:00
Conor McCarthy
0ef0735999 tests/shader-runner: Do not exit if a 'require' directive is not met.
Tests are skipped until the next 'require' directive, which restores
the defaults before the new requirements are read.
2023-10-11 22:21:14 +02:00
Conor McCarthy
192f4dcb2b tests/shader-runner: Handle individual keywords in shader directives.
Matching all possible combinations of keywords becomes too complex
if more keywords are added.
2023-10-11 22:21:14 +02:00
Nikolay Sivov
9c6c7cb78f vkd3d: Add partial implementation for CreateCommittedResource1(). 2023-10-10 22:11:46 +02:00
Nikolay Sivov
8479ceedfc vkd3d-shader/hlsl: Propagate structure fields modifiers when copying shader inputs.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:29 +02:00
Nikolay Sivov
1930b51d97 vkd3d-shader/hlsl: Allow interpolation modifiers on structure fields.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:27 +02:00
Nikolay Sivov
de860c3cbf vkd3d-shader/hlsl: Parse 'centroid' and 'noperspective' modifiers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:24 +02:00
Nikolay Sivov
4b8a4809d1 tests: Add a test for interpolation modifiers specified on structure fields.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:24 +02:00
Nikolay Sivov
c5414fa92f vkd3d-shader/tpf: Write 'continue' instruction.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:17 +02:00
Nikolay Sivov
0e5749e78e vkd3d-shader/hlsl: Allow 'break' instructions in loops.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:12 +02:00
Nikolay Sivov
89f493b900 tests: Add some tests for 'break'/'continue' in loops.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:12 +02:00
Nikolay Sivov
6ba75fd92f vkd3d: Add partial implementation for CreateHeap1().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:07 +02:00
Nikolay Sivov
7c378cc6f9 vkd3d-shader/hlsl: Remove conditional branching when condition is a compile time constant.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:16:09 +02:00
Nikolay Sivov
8ebccad3c9 vkd3d-shader/hlsl: Add constant folding for rshift.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:15:54 +02:00
Nikolay Sivov
6e74819eb7 vkd3d-shader/hlsl: Add constant folding for lshift.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:15:52 +02:00
Francisco Casas
e64e08b2b7 tests: Test register reservations on structs for SM5. 2023-10-05 16:15:30 +02:00
Nikolay Sivov
b5c0c9c22f vkd3d-shader/hlsl: Add fwidth() function.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:15:10 +02:00
Conor McCarthy
39be40ce94 tests: Destroy the test context in test_readback_map_stability(). 2023-10-02 22:25:10 +02:00
Henri Verbeet
5503a025d9 tests: Add some missing vkd3d_test_pop_context() calls to test_shader_instructions(). 2023-09-28 23:13:04 +02:00
Giovanni Mascellani
4374d45655 tests: Work around a MoltenVK bug in test_tgsm(). 2023-09-26 22:07:43 +02:00
Petrichor Park
976fd67f51 vkd3d-shader/hlsl: Implement intrinsic tan.
This commit also extends the trigonometry tests a little bit to make
sure that tan works right.
2023-09-25 22:07:13 +02:00
Giovanni Mascellani
ca05e57e67 tests: Mark a bug as resolved on Mesa. 2023-09-22 11:06:57 +02:00
Giovanni Mascellani
d640b213b2 tests: Do not crash if the render target doesn't support MSAA 8.
This currently happens on MoltenVK.
2023-09-22 11:06:50 +02:00
Giovanni Mascellani
6dfdbb5c26 tests: Do not crash if a pipeline statistics query heap cannot be created.
This currently happens on MoltenVK.
2023-09-22 11:06:44 +02:00
Giovanni Mascellani
d742770499 tests: Compile HLSL shaders at runtime in test_draw_depth_only(). 2023-09-22 11:06:41 +02:00
Giovanni Mascellani
4557ad36b0 tests: Compile HLSL shaders at runtime in test_draw_depth_no_ps(). 2023-09-22 11:06:41 +02:00
Giovanni Mascellani
b7c951ba78 tests: Compile HLSL shaders at runtime in test_scissor(). 2023-09-22 11:06:41 +02:00
Giovanni Mascellani
15c5ef5bb5 tests: Compile HLSL shaders at runtime in test_fractional_viewports(). 2023-09-22 11:06:40 +02:00
Giovanni Mascellani
49bbd98a04 vkd3d-shader/hlsl: Correctly fold casts from float.
I.e., without invoking undefined behavior in the compiler. The rules
are desumed from the the MSDN documentation for ftoi and ftou.
2023-09-22 11:06:28 +02:00
Nikolay Sivov
6d1ba83856 vkd3d-shader/hlsl: Use conditional moves for arithmetic operators instead of branching.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-22 11:06:22 +02:00
Zebediah Figura
9417c7cfb7 vkd3d-shader/d3dbc: Translate sm1 fragment outputs to system values. 2023-09-21 19:16:31 +02:00
Zebediah Figura
1615e5a76b vkd3d-shader/dxbc: Map sm4 fragment outputs to system values based on their name. 2023-09-21 19:16:29 +02:00
Henri Verbeet
419c6364db tests: Add a small test for vkd3d_shader_build_varying_map().
There's probably room for improvement, but this at least verifies the
function can be called.
2023-09-19 21:30:37 +02:00
Giovanni Mascellani
b8f2c3e1f4 tests: Relax the precision of some tests so that they pass on MoltenVK. 2023-09-18 21:04:06 +02:00
Nikolay Sivov
177ea3bcbd vkd3d-shader/hlsl: Produce 2D resource declarations and loads for tex1D().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-13 23:11:11 +02:00
Giovanni Mascellani
61b403a032 tests: Compile HLSL shaders at runtime in test_unknown_dsv_format(). 2023-09-13 23:11:04 +02:00
Giovanni Mascellani
264ff9e2da tests: Compile HLSL shaders at runtime in test_unknown_rtv_format(). 2023-09-13 23:11:04 +02:00
Giovanni Mascellani
b1cae0dd1e tests: Compile HLSL shaders at runtime in test_multiple_render_targets(). 2023-09-13 23:11:04 +02:00
Giovanni Mascellani
f7354ff9e3 tests: Compile HLSL shaders at runtime in test_create_compute_pipeline_state(). 2023-09-13 23:11:04 +02:00
Zebediah Figura
e847df9528 tests: Check the result of vkCreateGraphicsPipelines(). 2023-09-13 23:10:46 +02:00
Francisco Casas
39563aa5b3 vkd3d-shader/hlsl: Lower matrix swizzles. 2023-09-13 23:10:38 +02:00
Francisco Casas
60a3279318 tests: Test matrix swizzles. 2023-09-13 23:10:37 +02:00
Nikolay Sivov
cab1f57e01 tests: Add a test for fmod() with vector arguments.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-07 19:15:26 +02:00
Nikolay Sivov
1002a6b357 vkd3d-shader/tpf: Use 'movc' to implement ternary operator.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-07 19:15:25 +02:00
Nikolay Sivov
c5d680d141 vkd3d-shader/hlsl: Add tex1D() function.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-07 19:15:06 +02:00
Zebediah Figura
a597dc8755 vkd3d-shader/hlsl: Define lit() in HLSL. 2023-08-30 22:49:03 +02:00
Nikolay Sivov
c39c5b3907 vkd3d-shader/hlsl: Add texCUBE() function.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-29 22:07:56 +02:00
Nikolay Sivov
269747dbf3 tests: Enable compiler backwards compatibility mode only for shaders that require it.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-28 20:40:06 +02:00
Nikolay Sivov
18c1477464 vkd3d-shader/hlsl: Ignore 'inline' modifier for functions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-28 20:39:53 +02:00
Nikolay Sivov
30be83f911 tests: Add some 'inline' function modifier tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-28 20:39:53 +02:00
Evan Tang
f374934281 tests: Test CopyResource depth to color. 2023-08-24 21:43:59 +02:00
Nikolay Sivov
1153f6bb34 vkd3d-shader/hlsl: Parse "if" statement attributes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-24 21:43:49 +02:00
Nikolay Sivov
9605993af3 tests: Add some tests for "if" statement attributes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-24 21:43:49 +02:00
Zebediah Figura
926575a6f3 vkd3d-shader/hlsl: Force sm1 inputs to be 4-component only for vertex shaders.
Pixel shaders still have an appropriate writemask.
2023-08-24 21:43:44 +02:00
Nikolay Sivov
4f2e07a45d vkd3d-shader/hlsl: Allow 'const' modifier without initializer in the global scope.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-15 21:51:50 +02:00
Nikolay Sivov
7fd10bb6bc tests: Add some tests for a 'const' modifier.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-15 21:51:50 +02:00
Francisco Casas
37cfbe47d7 vkd3d-shader/hlsl: Sort synthetic separated samplers first for SM4. 2023-08-15 21:51:31 +02:00
Francisco Casas
948c4145f5 tests: Test texture allocation ordering in complex scenarios. 2023-08-15 21:51:26 +02:00
Nikolay Sivov
25ff56769b vkd3d-shader: Add constant folding for the 'dot' operation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-14 18:38:15 +02:00
Zebediah Figura
bad72d1874 vkd3d-shader/d3dbc: Make sure all inter-stage varyings have a unique register index.
spirv will need this.
2023-08-03 21:20:22 +09:00
Zebediah Figura
b4bb3931c5 vkd3d-shader/preproc: Append spaces between tokens in macro invocations. 2023-08-02 20:19:21 +09:00
Zebediah Figura
250a24bd3f vkd3d-shader/preproc: Strip whitespace when stringifying. 2023-08-02 20:19:20 +09:00
Zebediah Figura
6fc3ae2b5c vkd3d-shader/preproc: Stringify text immediately in macro invocations. 2023-08-02 20:19:19 +09:00
Zebediah Figura
3a235b57f6 vkd3d-shader/preproc: Expand macro arguments in macro invocations.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55361
2023-08-02 20:19:17 +09:00
Zebediah Figura
9b98489155 vkd3d-shader/preproc: Parse hash marks as two separate tokens when not in stringification contexts. 2023-08-02 20:19:15 +09:00
Conor McCarthy
1e178efa01 tests/d3d12: Add tests for GetResourceTiling().
Based on vkd3d-proton patches by Philip Rebohle and
Hans-Kristian Arntzen.
2023-07-31 21:07:56 +09:00
Nikolay Sivov
bfdd5c142d vkd3d-shader/tpf: Add support for writing 'resinfo' instruction.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-07-31 21:07:50 +09:00
Nikolay Sivov
18731d71a6 tests: Add some tests for GetDimensions().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-07-31 21:07:46 +09:00