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
Giovanni Mascellani
52b9ef0426
vkd3d-shader/spirv: Support precise flags on SAMPLE_INFO instructions.
2025-07-29 12:31:36 +02:00
Giovanni Mascellani
53754f0583
vkd3d-shader/spirv: Support precise flags on RESINFO instructions.
2025-07-29 12:31:23 +02:00
Giovanni Mascellani
bdccdd9996
vkd3d-shader/d3d-asm: Emit precise flags for a number of opcodes.
...
I've seen them specifically on RESINFO, but it general it makes
sense to print them for any opcode that expects a bit field in
the flags.
2025-07-29 12:28:09 +02:00
Giovanni Mascellani
f7866df201
vkd3d-shader/dxil: Emit gather offsets as signed.
...
This is important for the MSL generator, otherwise invalid MSL
is emitted.
2025-07-28 16:32:40 +02:00
Giovanni Mascellani
3cf35ce22e
vkd3d-shader/msl: Convert the results of load and sample operations to the destination data type.
...
This should eventually go away when we properly enforce vsir typing,
but since for the moment we're resolving to hack, let's at least
make it compatible with DXIL.
2025-07-28 16:31:57 +02:00
Giovanni Mascellani
7df92b6e50
vkd3d-shader/msl: Reject shaders with duplicate I/O target locations.
...
We'll have to handle them eventually, but let's avoid generating
invalid code in the meantime.
2025-07-28 16:27:58 +02:00
Giovanni Mascellani
9476a235b2
vkd3d-shader/msl: Use the union type for SAMPLEMASK registers.
...
Function msl_print_assignment() doesn't currently handle bitcasts
when the left operand has a specific (rather than a union) type.
We could also fix the function, and maybe it wouldn't be a bad
idea anyway, but using the union type seems more in the spirit
of the MSL backend anyway.
2025-07-28 16:27:58 +02:00
Giovanni Mascellani
16b06c295b
vkd3d-shader/msl: Emit indexable temps with the appropriate component count.
2025-07-28 16:27:58 +02:00
Giovanni Mascellani
6ed0bd0bab
vkd3d-shader/msl: Ignore the interpolation mode for output variables.
...
They are meaningless, but some frontends (e.g., DXIL) set them
nevertheless.
2025-07-28 16:27:58 +02:00
Francisco Casas
19bc3ec104
vkd3d-shader/ir: Validate flags in RESINFO operations.
2025-07-28 16:26:16 +02:00
Francisco Casas
3a0a96b851
vkd3d-shader/ir: Validate flags in SAMPLE_INFO operations.
2025-07-28 16:26:16 +02:00
Nikolay Sivov
a4f5225229
vkd3d: Return success from d3d12_device_EnumerateMetaCommands().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com >
2025-07-28 16:24:04 +02:00
Nikolay Sivov
2c49f04411
vkd3d-shader/fx: Do not attempt to parse expressions without code section.
2025-07-28 16:22:13 +02:00
Nikolay Sivov
dcd1747f12
vkd3d-shader/fx: Handle regular shader blobs when parsing the state data.
...
For the pass shader states this blob will contain compiled shaders, for other
state types it will contain expression code. Complex state data is stored separately,
tracing it back to actual state type will require keeping track of already parsed states.
2025-07-28 16:21:32 +02:00
Henri Verbeet
9b0087a111
vkd3d-shader/spirv: Emit OpLine instructions.
2025-07-28 16:11:29 +02:00
Henri Verbeet
b3cac7b86d
vkd3d-shader: Call vsir_program_scan() for d3d-asm targets in vsir_program_compile().
...
Like we do for every other target.
2025-07-28 16:11:06 +02:00