Elizabeth Figura
322c91e3f8
vkd3d-shader/ir: Introduce a vsir DCE pass.
2025-10-06 14:38:32 +02:00
Elizabeth Figura
62b7c5b5e6
vkd3d-shader/hlsl: Use the semantic.resource_type field for texture DCL instructions.
...
ins->resource_type is intended for VKD3D_SM5_MODIFIER_RESOURCE_TYPE, which is
not used for DCL instructions. At the same time, the validator checks
semantic.resource_type, and would break on HLSL shaders.
2025-10-06 14:22:58 +02:00
Francisco Casas
bdba25d028
vkd3d-shader: Store a vkd3d_result in struct vkd3d_shader_parser.
2025-10-02 23:40:51 +02:00
Petrichor Park
e35604dbf0
vkd3d-shader/hlsl: Implement the firstbitlow() intrinsic.
2025-09-22 11:26:42 +02:00
Petrichor Park
e6d840170d
vkd3d-shader/hlsl: Implement the firstbithigh() intrinsic.
2025-09-22 11:26:42 +02:00
Petrichor Park
e49beca0d5
vkd3d-shader/hlsl: Implement the countbits() intrinsic.
2025-09-22 11:26:42 +02:00
Henri Verbeet
47f2ec1a08
vkd3d-shader/ir: Require default swizzles on vec4 immediate constants.
...
The SPIR-V, GLSL and MSL backends implicitly handle swizzles on
immediate constants, but the TPF and d3d-asm backends assume a default
swizzle. In principle there's no reason those couldn't support swizzles
on immediate constants, but they're a little pointless.
2025-09-18 11:35:05 +02:00
Francisco Casas
5a563ce05d
vkd3d-shader/ir: Move icbs from struct vkd3d_shader_instruction_array to struct vsir_program.
2025-09-17 11:48:19 +02:00
Henri Verbeet
2b5dc156c7
vkd3d-shader/hlsl: vsir constant buffer sizes are specified in bytes.
2025-09-11 16:09:46 +02:00
Victor Chiletto
8698874628
vkd3d-shader/hlsl: Emit vsir structured loads.
2025-09-04 13:39:03 +02:00
Victor Chiletto
9bf94ff034
vkd3d-shader/hlsl: Emit texture declarations for SRV structured buffers.
2025-09-04 13:29:51 +02:00
Henri Verbeet
3b41d99fa9
vkd3d-shader/tpf: Store a pointer to the vsir program in struct vkd3d_shader_sm4_parser.
2025-08-21 16:28:28 +02:00
Shaun Ren
fa560b589e
vkd3d-shader/hlsl: Emit dcl_tgsm_raw instructions for raw groupshared variables.
2025-08-05 16:09:45 +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
Henri Verbeet
b3e367b099
vkd3d-shader/tpf: Update the comment describing the data type mapping in init_sm4_lookup_tables().
...
"R", "S", and "U" were removed, and "*" was added.
2025-07-24 19:12:49 +02:00
Henri Verbeet
f02405350e
vkd3d-shader/ir: Consistently use VSIR_DATA_U32 for resinfo_uint destination operands.
...
Much like we do for sample_info_uint.
2025-07-23 17:23:40 +02:00
Henri Verbeet
b88be5b92b
vkd3d-shader/ir: Consistently use VSIR_DATA_U32 for sample_info_uint destination operands.
...
The HLSL compiler already did this; the TPF and DXIL parsers did not.
Previously spirv_compiler_emit_sample_info() was unable to correctly
handle VSIR_DATA_U32 destinations; the new version is arguably simpler
as well.
2025-07-23 17:23:40 +02:00
Henri Verbeet
aebe64ecac
vkd3d-shader/ir: Rename VKD3D_DATA_UNUSED to VSIR_DATA_UNUSED.
2025-07-23 17:19:28 +02:00
Henri Verbeet
f74b56622a
vkd3d-shader/ir: Rename VKD3D_DATA_CONTINUED to VSIR_DATA_CONTINUED.
2025-07-23 17:19:28 +02:00
Henri Verbeet
ca24aada9a
vkd3d-shader/ir: Rename VKD3D_DATA_MIXED to VSIR_DATA_MIXED.
2025-07-23 17:19:28 +02:00
Henri Verbeet
b055a16e03
vkd3d-shader/ir: Rename VKD3D_DATA_OPAQUE to VSIR_DATA_OPAQUE.
2025-07-23 17:19:28 +02:00
Henri Verbeet
ed695cc551
vkd3d-shader/ir: Rename VKD3D_DATA_SNORM to VSIR_DATA_SNORM.
2025-07-23 17:19:28 +02:00
Henri Verbeet
ed27427508
vkd3d-shader/ir: Rename VKD3D_DATA_UNORM to VSIR_DATA_UNORM.
2025-07-23 17:19:28 +02:00
Giovanni Mascellani
bb51b976df
vkd3d-shader/ir: Use size_t in the parameter allocator.
...
The idea is to, by default, use size_t for any quantity that is
a memory size or an array index.
2025-07-23 17:16:38 +02:00
Giovanni Mascellani
7e76e62db7
vkd3d-shader/tpf: Use iterators in tpf_write_program().
2025-07-22 16:52:24 +02:00