Francisco Casas
0f7bb922ba
tests/shader_runner: Pass the correct buffer size to swprintf() in dxc_compiler_compile_shader().
...
swprintf() expects the length of the buffer in WCHARs instead of bytes,
so ARRAY_SIZE() is used instead of sizeof().
This caused almost all tests to terminate abruptly with the following
message, in my machine:
*** buffer overflow detected ***: terminated
2025-02-03 15:58:19 +01:00
Elizabeth Figura
f1412e422c
vkd3d-shader/hlsl: Handle error instructions in add_shader_compilation().
2025-01-29 17:58:00 +01:00
Elizabeth Figura
fbd17266cf
vkd3d-shader/hlsl: Do not abort on variable redefinition.
...
There is no harm in defining two variables with the same name.
2025-01-29 17:58:00 +01:00
Elizabeth Figura
e40d4a0e12
vkd3d-shader/hlsl: Factor out the error message into hlsl_add_var().
2025-01-29 17:58:00 +01:00
Elizabeth Figura
2863d86bcc
vkd3d-shader/hlsl: Do not define a separate scope for function parameters.
...
Remove the no longer needed code to detect redefinition in this case.
2025-01-29 17:58:00 +01:00
Elizabeth Figura
75ef230fbe
tests: Add some stress tests for scope and variable definition.
2025-01-29 17:58:00 +01:00
Shaun Ren
7d1e4a40b1
tests/hlsl: Test hull shader control point function output parameters.
2025-01-29 17:53:26 +01:00
Shaun Ren
73183d33c5
tests/hlsl: Test passthrough hull shader control point function.
2025-01-29 17:52:49 +01:00
Shaun Ren
8a5559ab17
tests/hlsl: Test the syntax of InputPatch/OutputPatch variables.
2025-01-29 17:51:18 +01:00
Shaun Ren
f064a4022a
vkd3d-shader/hlsl: Validate and record InputPatch/OutputPatch types.
2025-01-29 17:45:46 +01:00
Shaun Ren
f4d5e05d96
vkd3d-shader/hlsl: Parse InputPatch and OutputPatch objects.
2025-01-29 17:41:51 +01:00
Shaun Ren
32c081ba8c
tests/hlsl: Test invalid const variables with no initializer.
2025-01-29 17:36:58 +01:00
Shaun Ren
a77dca528a
vkd3d-shader/hlsl: Forbid declaring const variables with no initializer.
2025-01-29 17:36:58 +01:00
Elizabeth Figura
25c6d16b45
vkd3d-shader/hlsl: Use the casted value in exp().
2025-01-28 13:14:50 +01:00
Conor McCarthy
033a0d29c5
tests/hlsl: Add some arithmetic uint16 shader tests.
2025-01-28 13:13:44 +01:00
Conor McCarthy
a5d4cbddac
tests/hlsl: Pass a profile string instead of a shader type to dxc_compiler_compile_shader().
2025-01-28 12:07:43 +01:00
Elizabeth Figura
40c225095f
vkd3d-utils: Fix matrix packing precedence in D3DCompile2VKD3D().
...
D3DCOMPILE_PACK_MATRIX_ROW_MAJOR takes precedence over
D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR.
2025-01-27 15:00:26 +01:00
Conor McCarthy
f63254d905
vkd3d-shader/dxil: Handle SV_RenderTargetArrayIndex.
2025-01-27 14:52:28 +01:00
Conor McCarthy
a557ad0aea
tests/hlsl: Add a test for SV_RenderTargetArrayIndex.
2025-01-27 14:52:28 +01:00
Elizabeth Figura
d049ea640f
vkd3d-shader/hlsl: Implement broadcasts in constant folding.
...
Normally lower_broadcasts() takes care of this, but loop unrolling executes before other constant passes.
2025-01-27 14:48:03 +01:00
Elizabeth Figura
9065a1ee23
tests: Add another unrolling test.
2025-01-27 14:47:12 +01:00
Giovanni Mascellani
5bfcd81182
ci: Explicitly install SPIRV-Tools in the macOS CI environment.
2025-01-22 14:56:43 +01:00
Giovanni Mascellani
d36864500f
vkd3d-common: Write a thread id in the log on macOS too.
2025-01-22 14:54:52 +01:00
Giovanni Mascellani
343022cdc1
vkd3d-shader/spirv: Interpret the write mask as a destination swizzle for double comparison operations.
...
This fixes a failure on a shader in Wild hearts.
2025-01-22 14:51:16 +01:00
Francisco Casas
4d18fb39b6
vkd3d-shader/hlsl: Don't forbid first base type cast on var assignments.
2025-01-22 14:46:02 +01:00