Commit Graph

2658 Commits

Author SHA1 Message Date
Anna (navi) Figueiredo Gomes
7658f03883 vkd3d-shader/fx: Implement ConstructGSWithSO(). 2025-12-09 16:41:08 +01:00
Anna (navi) Figueiredo Gomes
ffc8f98bba vkd3d-shader/fx: Implement shader initializers. 2025-12-09 16:29:29 +01:00
Anna (navi) Figueiredo Gomes
6e15664bff vkd3d-shader/fx: Implement shader assignment. 2025-12-09 16:21:48 +01:00
Anna (navi) Figueiredo Gomes
b986bfa2fe tests/hlsl: Add effect CompileShader() tests. 2025-12-09 15:46:45 +01:00
Anna (navi) Figueiredo Gomes
b17923b5ba vkd3d-shader/hlsl: Store parsed values in hlsl_ir_compile().
Makes emitting shaders from fx.c easier, and brings parsing failures
upfront.

Non-effect target profiles don't perform any type checks on
ConstructGSWithSO(), nor use shader objects in any way, but they do
check if the argument count is correct.

So we create a GeometryShader object with NULL decl and profile when
targeting non-effect profiles, so our type checks still work and
implicit conversions aren't attempted.
2025-12-09 15:44:30 +01:00
Henri Verbeet
d0318ca14b vkd3d-shader/ir: Lower VSIR_OP_DP2ADD instructions. 2025-12-08 17:42:03 +01:00
Henri Verbeet
79ddfedbde tests/d3dbc: Add some tests for dp2add instructions.
These are adapted from Wine's dp2add_ps_test() d3d9 test by Jason Green.
2025-12-08 17:42:03 +01:00
Shaun Ren
b31dc058b9 vkd3d-shader/hlsl: Validate groupshared variables. 2025-12-08 17:01:57 +01:00
Shaun Ren
d2d50efaea tests/hlsl: Add more TGSM tests. 2025-12-08 17:01:57 +01:00
Shaun Ren
654a29b788 tests/hlsl: Add some structured copy tests. 2025-12-08 17:01:51 +01:00
Giovanni Mascellani
7c6c176a7c tests: Do not put storage buffer descriptors in the descriptor pool.
They are never used.
2025-12-03 15:11:23 +01:00
Giovanni Mascellani
f9f8b3a5a4 tests/d3dbc: Relax the precision for some nrm tests.
That's needed on my NVIDIA RTX 4060 Mobile.
2025-12-02 14:31:19 +01:00
Henri Verbeet
e0c23624f2 vkd3d-shader/ir: Lower VSIR_OP_LRP instructions. 2025-12-02 14:29:01 +01:00
Henri Verbeet
355a88b564 tests/d3dbc: Add some tests for lrp instructions. 2025-12-02 14:29:01 +01:00
Giovanni Mascellani
63c71efb6e tests/hlsl: Fix the render target format for arithmetic-float-uniform.shader_test. 2025-12-02 14:27:34 +01:00
Giovanni Mascellani
e99b29d203 tests/hlsl: Test the default denormalized mode. 2025-12-02 14:14:12 +01:00
Henri Verbeet
fdfb74b20b vkd3d-shader/ir: Lower VSIR_OP_NRM instructions. 2025-11-27 21:59:34 +01:00
Henri Verbeet
2b31efe03a tests/d3dbc: Add some tests for nrm instructions.
These are adapted from Wine's test_nrm_instruction() d3d9 test by
Paul Gofman.
2025-11-27 21:59:34 +01:00
Conor McCarthy
cb8da3125b vkd3d: Implement sampler min/max reduction filtering. 2025-11-26 16:06:24 +01:00
Henri Verbeet
dc7cdec9a5 tests/hlsl: Add a sampler min/max reduction filtering test.
The Metal runner could in principle support this feature using
MTLSamplerDescriptor.reductionMode, but that requires macOS 26.0/Tahoe,
which is newer than my current setup.
2025-11-26 16:06:24 +01:00
Evan Tang
96872b941e tests/d3d12: Add some missing UAV barriers after UAV clears.
Much like e.g. commits a686fa7750 and
93d2bb2d5d.

Direct3D 12 doesn't guarantee any implicit barriers after UAV clears,
but unfortunately missing these is often easy to go unnoticed.
2025-11-25 20:33:52 +01:00
Giovanni Mascellani
8a0e578f64 tests/d3d12: Avoid a warning about passing a pointer to a const uninitialized object.
I've seen this with clang version 21.1.5.
2025-11-25 20:22:08 +01:00
Giovanni Mascellani
2215117d72 tests/shader_runner_vulkan: Support explicit descriptor mapping. 2025-11-25 20:19:54 +01:00
Francisco Casas
41c593ef46 tests/hlsl: Test clip/cull distance semantics as arrays.
Arrays are allowed for clip/cull distance semantics. Their maximum size
is 2 since that's the maximum amount of registers allowed for clip/cull
distances.

Indirect addressing of these arrays is allowed on shader model 6.

These tests are introduced after the transformation of clip/cull
input/outputs into arrays in vsir since otherwise they segfault.
2025-11-25 19:58:24 +01:00
Francisco Casas
0dabfdee63 vkd3d-shader/ir: Transform clip/cull inputs/outputs into arrays.
Takes care of transforming clip/cull system values from the Direct3D
convention of 2 4-component registers, into the SPIR-V/GLSL convention
of 8-element scalar float arrays.

This fixes SPIR-V validation errors in clip-cull-distance.shader_test,
as well as segfaults on Mesa 25.1.1-arch1.2 if those shaders are
executed regardless.

We create indexable temporaries of the appropriate size, and replace
accesses to clip/cull I/O signature elements with accesses to those
temporaries. The existing clip/cull signature elements are then replaced
with new scalar signature element arrays, and we copy the contents of
those I/O signature elements to/from the corresponding temporaries at
the start/end of the vsir program.

It is worth pointing out that the current implementation assumes that
every instance of the control point phase of a hull shader only writes
to the output registers of its control point, given by
vOutputControlPointID, and not to other control points. Shader
compilation will fail if that constraint is violated.
2025-11-25 19:49:11 +01:00