Giovanni Mascellani
10d8760134
vkd3d-shader/ir: Validate register id and index for RESOURCE registers.
2025-04-02 19:06:43 +02:00
Giovanni Mascellani
2377db33db
vkd3d-shader: Represent descriptor information in the vsir program.
2025-03-18 15:38:01 +01:00
Giovanni Mascellani
4308fa3f68
vkd3d-shader/spirv: Do not steal the instruction array from the vsir program.
...
There is no need, and it only complicates tracking ownership.
2025-03-18 15:37:57 +01:00
Giovanni Mascellani
fc520e7b4c
vkd3d-shader/spirv: Do not store duplicate references to the signatures.
...
They are already available through the program.
2025-03-18 15:34:16 +01:00
Giovanni Mascellani
5ce03258b5
vkd3d-shader/spirv: Immediately store a reference to the program in the SPIR-V generator.
...
So it doesn't have to be passed around uselessly.
2025-03-18 15:34:04 +01:00
Giovanni Mascellani
549659dab6
vkd3d-shader/spirv: Run the vsir passes before creating the SPIR-V generator.
...
This makes it more similar to the MSL and GLSL generators. It also looks
like a cleaner design, the backend is supposed to get access to the vsir
program after it has gone through the pipeline.
2025-03-18 15:33:27 +01:00
Nikolay Sivov
fb5d53bf57
vkd3d-shader/fx: Add a helper to escape printed strings.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com >
2025-03-17 14:46:18 +01:00
Henri Verbeet
5d55a5894c
vkd3d-shader/spirv: Handle "BitEnum" operands.
2025-03-10 14:47:03 +01:00
Henri Verbeet
00039ba629
vkd3d-shader/spirv: Handle "ValueEnum" operands.
2025-03-10 14:47:03 +01:00
Henri Verbeet
321154d25a
vkd3d-shader/spirv: Handle "LiteralString" operands.
2025-03-10 14:47:03 +01:00
Henri Verbeet
0e092aef70
vkd3d-shader/spirv: Handle "LiteralInteger" operands.
2025-03-10 14:47:03 +01:00
Henri Verbeet
8afeb13035
vkd3d-shader/spirv: Handle "IdResultType" operands.
2025-03-10 14:47:03 +01:00
Henri Verbeet
b9e78f2e2e
vkd3d-shader/spirv: Handle "IdResult" operands.
2025-03-10 14:47:03 +01:00
Henri Verbeet
e83f4f40f9
vkd3d-shader/spirv: Handle "IdRef" operands.
2025-03-10 14:47:03 +01:00
Henri Verbeet
bebc550f02
vkd3d-shader/spirv: Implement outputting opcode names.
2025-03-10 14:47:00 +01:00
Henri Verbeet
997f3f8266
vkd3d-shader/spirv: Implement outputting instruction offsets.
2025-03-10 14:45:06 +01:00
Giovanni Mascellani
8c785f1dc9
vkd3d-shader/spirv: Emit immediate words for unhandled instructions.
...
The assembler can parse these to reconstruct the original bytecode.
2025-03-10 14:45:06 +01:00
Henri Verbeet
5ab5a721a1
vkd3d-shader/spirv: Do not sign-extend *ptr in vkd3d_spirv_build_string().
...
"char" is (potentially) signed, so casting it to uint32_t will
sign-extend it. Because we use |= to assign it to "word", and don't
otherwise mask out the higher bits either, we effectively set subsequent
bytes in the same word to 0xff for input bytes > 0x7f. That potentially
includes the \0 terminator. For example, "é" (U+00e9) is "\xc3\xa9"
when encoded as UTF-8, and would get us 0xffffffc3 instead of
0x0000a9c3.
2025-03-05 14:10:58 +01:00
Giovanni Mascellani
8297ea9aa6
vkd3d/device: Require VK_KHR_zero_initialize_workgroup_memory when appropriate.
...
That extension (and the corresponding feature) must be enabled when
the Initializer operand is used for workgroup variables.
2025-02-26 16:11:50 +01:00
Henri Verbeet
fe4143ad19
vkd3d-shader/dxil: Generate I/O signatures with 16-bit component types for native 16-bit shaders.
...
Which incidentally matches the I/O signatures from the DXBC container.
2025-02-24 15:10:08 +01:00
Henri Verbeet
985d317e0e
Release 1.15.
2025-02-19 12:00:00 +01:00
Giovanni Mascellani
343022cdc1
vkd3d-shader/spirv: Interpret the write mask as a destination swizzle for double comparison operations.
...
This fixes a failure on a shader in Wild hearts.
2025-01-22 14:51:16 +01:00
Shaun Ren
4fbfb44681
vkd3d-shader/spirv: Emit the tessellator domain for domain shaders.
...
Commit 1ed8d907b3
inadvertently dropped
emitting the tessellator domain for domain shaders. Although Vulkan
environments allow us to write the tessellator domain from the hull
shader, the domain shader, or both, that's not generally true for OpenGL
environments.
2025-01-20 15:50:04 +01:00
Francisco Casas
8056058aa1
vkd3d-shader: Avoid passing NULL to memset(). (ubsan)
...
Otherwise ubsan reports errors such as:
libs/vkd3d-shader/spirv.c:7266:5: runtime error: null pointer passed as argument 1, which is declared to never be null
2025-01-10 19:51:55 +01:00
Elizabeth Figura
efe686105d
vkd3d-shader/spirv: Correctly implement DTOU.
2024-12-18 17:30:16 +01:00