Commit Graph

7965 Commits

Author SHA1 Message Date
Giovanni Mascellani
715d23ebbb vkd3d-shader/ir: Validate IGE instructions. 2025-07-14 18:12:22 +02:00
Giovanni Mascellani
9f455667eb vkd3d-shader/ir: Validate IEQ instructions. 2025-07-14 18:12:22 +02:00
Giovanni Mascellani
c29e8188ff vkd3d-shader/ir: Validate IADD instructions. 2025-07-14 18:12:22 +02:00
Giovanni Mascellani
4d1fabd350 vkd3d-shader/ir: Validate HTAN instructions. 2025-07-14 18:12:22 +02:00
Giovanni Mascellani
e954f75862 vkd3d-shader/ir: Validate HSIN instructions. 2025-07-14 18:12:22 +02:00
Giovanni Mascellani
5dd452a5c7 vkd3d-shader/ir: Validate HCOS instructions. 2025-07-14 18:12:22 +02:00
Giovanni Mascellani
cc42581a34 tests/hlsl: Test uint64 comparisons. 2025-07-14 18:12:03 +02:00
Giovanni Mascellani
395d456386 tests/hlsl: Test int64 comparisons. 2025-07-14 18:10:20 +02:00
Giovanni Mascellani
98b0ca544a vkd3d-shader/ir: Test the data type when validating comparison operations.
I had forgot that bit.
2025-07-14 18:06:55 +02:00
Elizabeth Figura
0c3250122c vkd3d-shader/spirv: Do not use OpCopyMemory for partial writemasks in spirv_compiler_emit_mov().
This fixes instructions like "mov r0.xy, r1.xyzw".
2025-06-26 17:44:34 +02:00
Elizabeth Figura
f2238deea9 tests/hlsl: Add tests for cube textures. 2025-06-26 17:40:10 +02:00
Elizabeth Figura
e312207124 tests/shader_runner: Add support for cube resources. 2025-06-26 17:38:55 +02:00
Elizabeth Figura
b58ff893a5 tests/hlsl: Add tests for 3D textures. 2025-06-26 17:32:10 +02:00
Elizabeth Figura
587c2dc76e tests/shader_runner: Add support for 3D resources. 2025-06-26 17:31:34 +02:00
Henri Verbeet
04d3996b07 demos/teapot: Add an fps counter. 2025-06-26 16:09:42 +02:00
Henri Verbeet
22ebccfeb7 vkd3d-shader/ir: Create SSA values with the corresponding dimension in vsir_program_lower_udiv(). 2025-06-26 16:08:32 +02:00
Henri Verbeet
043f6f21b0 vkd3d-shader/ir: Create SSA values with the corresponding dimension in vsir_program_lower_sm4_sincos().
For example, in the final test from trigonometry.shader_test, we have:

    sincos r1.x <v4:float>, null <float>, l(3.00000000e+01) <s:float>

which currently gets turned into

    mov sr0.xyzw <v4:float>, l(3.00000000e+01) <s:float>
    sin r1.x <v4:float>, sr0.xyzw <v4:float>

That doesn't seem ideal, and should possibly be rejected by the
validator, but ends up working out well enough for the SPIR-V backend.
It's a bit more problematic to deal with for the GLSL backend.
2025-06-26 16:02:38 +02:00
Francisco Casas
96cd4cc954 vkd3d-shader/ir: Avoid a compiler warning in vsir_block_list_init().
The following warning appears during compilation with
gcc 15.1.1 20250425:

  In function 'vsir_block_list_init',
      inlined from 'vsir_block_init' at vkd3d/libs/vkd3d-shader/ir.c:3821:5,
      inlined from 'vsir_cfg_init' at vkd3d/libs/vkd3d-shader/ir.c:4285:28:
  vkd3d/libs/vkd3d-shader/ir.c:3758:5: warning: 'memset' writing 24 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
   3758 |     memset(list, 0, sizeof(*list));
        |     ^
  In function 'vsir_cfg_init':
  lto1: note: destination object is likely at address zero

looking at the code in vsir_cfg_init() this seems like an spurious
warning. Looking on the internet, these bogus warnings with memset()
seem to be a common occurrence.

memset() is replaced with a zero value assignment to avoid this.
2025-06-26 15:56:43 +02:00
Francisco Casas
3376015d88 vkd3d-shader/hlsl: Update the enum hlsl_sampler_dim comment. 2025-06-26 15:55:58 +02:00
Giovanni Mascellani
3c469edc8e vkd3d-shader/ir: Validate GEU instructions. 2025-06-25 16:53:19 +02:00
Giovanni Mascellani
e267ea9551 vkd3d-shader/ir: Validate GEO instructions. 2025-06-25 16:52:28 +02:00
Giovanni Mascellani
8feeb07900 vkd3d-shader/ir: Validate FREM instructions. 2025-06-25 16:51:58 +02:00
Giovanni Mascellani
32cab7c81e vkd3d-shader/ir: Validate FRC instructions. 2025-06-25 16:51:02 +02:00
Giovanni Mascellani
afec7cc96b vkd3d-shader/ir: Validate EXP instructions. 2025-06-25 16:50:03 +02:00
Giovanni Mascellani
8cf7a12502 vkd3d-shader/ir: Validate EQU instructions. 2025-06-25 16:48:45 +02:00