Commit Graph

7965 Commits

Author SHA1 Message Date
Francisco Casas
8717fe9c47 vkd3d-shader/dxil: Use iterators in sm6_parser_globals_init(). 2025-08-04 14:40:17 +02:00
Giovanni Mascellani
3817df1164 tests/shader_runner_metal: Run the Metal shader runner with DXIL shaders. 2025-08-04 14:34:23 +02:00
Giovanni Mascellani
d898923b1c tests/shader_runner_metal: Allow checking shader model 5.1 too. 2025-08-04 14:34:23 +02:00
Giovanni Mascellani
1d71cf9af1 vkd3d-shader/msl: Allocate SSA registers to temporaries. 2025-08-04 14:34:23 +02:00
Giovanni Mascellani
bec000b88e vkd3d-shader: Enable converting DXIL to MSL.
Only trivial shaders work so far.
2025-08-04 14:34:01 +02:00
Conor McCarthy
691dd49e49 vkd3d-shader/dxil: Handle SV_PrimitiveId outputs. 2025-08-04 11:54:46 +02:00
Conor McCarthy
1293db7536 tests/hlsl: Add a test for SV_PrimitiveId inputs and outputs. 2025-08-04 11:54:46 +02:00
Henri Verbeet
bd3d0f3495 vkd3d-shader/ir: Use vsir_program_append() in vsir_program_ensure_ret().
I think this is slightly nicer. It also happens to avoid a
-Warray-bounds warning on some versions of gcc that suggests the "ins"
pointer returned by vsir_program_iterator_next() may be NULL.
2025-07-31 15:01:29 +02:00
Conor McCarthy
b9fe19701c vkd3d-shader/dxil: Handle SV_ViewportArrayIndex. 2025-07-31 14:55:33 +02:00
Conor McCarthy
cd8cea6913 tests: Replace test_ps_viewport_index() with a shader runner test.
Mainly to allow testing the functionality in question with DXIL shaders
as well.
2025-07-31 14:55:33 +02:00
Henri Verbeet
55fe8df979 vkd3d: Set the maximum viewport count in d3d12_pipeline_state_get_or_create_pipeline().
VK_DYNAMIC_STATE_VIEWPORT and VK_DYNAMIC_STATE_SCISSOR specify that
viewports and scissor rectangles are dynamic state, but not their
counts.

It took a while to notice this issue because the existing code seemed to
largely work as intended on hardware implementations, but tests using
the additional viewports would fail on llvmpipe.
2025-07-31 14:55:33 +02:00
Henri Verbeet
74d8c23f71 include: Remove some redudant TAG_* definintions from vkd3d_shader_util.h.
We already have all of these in vkd3d_common.h.
2025-07-31 14:54:59 +02:00
Elizabeth Figura
d0ce3e61bf tests/hlsl: Add a regression test for packed SV_IsFrontFace.
This tests f0906e9c5c.
2025-07-31 14:54:15 +02:00
Elizabeth Figura
75cb4336ec vkd3d-shader/ir: Record the previous temp count before allocating any SSA values.
Due to the unintentional placement of this line, we were inadvertently
allocating every SSA value to a unique temp register, overflowing limits.
2025-07-30 15:36:38 +02:00
Henri Verbeet
67fd9bb76b vkd3d-shader/ir: Free program parameters on failure in vsir_program_init() if needed. 2025-07-30 15:35:54 +02:00
Henri Verbeet
f6a9def564 vkd3d-shader/spirv: Update the SPIR-V grammar JSON to the vulkan-sdk-1.4.313.0 release. 2025-07-30 15:11:19 +02:00
Henri Verbeet
bb2979aa4c vkd3d-shader/hlsl: Generate vsir signatures in hlsl_emit_vsir(). 2025-07-29 13:15:22 +02:00
Henri Verbeet
49b857c5b7 vkd3d-shader/hlsl: Initialise the vsir program in hlsl_emit_vsir(). 2025-07-29 13:15:22 +02:00
Henri Verbeet
dbaecb3f36 vkd3d-shader/hlsl: Introduce hlsl_compile_effect().
The goal being to allow hlsl_compile_shader() to return a vsir program.
2025-07-29 13:14:30 +02:00
Giovanni Mascellani
6805612918 vkd3d-shader: Use the structure names when creating the parameter allocators.
So that it doesn't depend on the instruction array implementation.
2025-07-29 13:13:53 +02:00
Giovanni Mascellani
247fbd869a vkd3d-shader/ir: Use iterators in vsir_program_ensure_ret(). 2025-07-29 13:12:58 +02:00
Giovanni Mascellani
812f6faa11 vkd3d-shader/ir: Use iterators in vsir_program_normalize_addr(). 2025-07-29 12:53:00 +02:00
Giovanni Mascellani
50afaf4ac6 vkd3d-shader: Use iterators in vsir_program_scan(). 2025-07-29 12:53:00 +02:00
Giovanni Mascellani
aba355896f vkd3d-shader/hlsl: Reject geometry shaders with instance count.
We currently emit a warning and miscompile them.
2025-07-29 12:51:06 +02:00
Giovanni Mascellani
22f84317c0 vkd3d-shader/ir: Check that GSINSTID registers have dimension VEC4.
I had set it to SCALAR in an earlier commit, but I hadn't noticed
it failed validation.

Also fix the HLSL compiler to emit them accordingly.

Fixes: dfc18781cc
2025-07-29 12:51:06 +02:00