Commit Graph

913 Commits

Author SHA1 Message Date
321154d25a vkd3d-shader/spirv: Handle "LiteralString" operands. 2025-03-10 14:47:03 +01:00
0e092aef70 vkd3d-shader/spirv: Handle "LiteralInteger" operands. 2025-03-10 14:47:03 +01:00
8afeb13035 vkd3d-shader/spirv: Handle "IdResultType" operands. 2025-03-10 14:47:03 +01:00
b9e78f2e2e vkd3d-shader/spirv: Handle "IdResult" operands. 2025-03-10 14:47:03 +01:00
e83f4f40f9 vkd3d-shader/spirv: Handle "IdRef" operands. 2025-03-10 14:47:03 +01:00
bebc550f02 vkd3d-shader/spirv: Implement outputting opcode names. 2025-03-10 14:47:00 +01:00
997f3f8266 vkd3d-shader/spirv: Implement outputting instruction offsets. 2025-03-10 14:45:06 +01:00
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
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
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
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
985d317e0e Release 1.15. 2025-02-19 12:00:00 +01:00
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
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
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
efe686105d vkd3d-shader/spirv: Correctly implement DTOU. 2024-12-18 17:30:16 +01:00
4130ce5bb9 vkd3d-shader/spirv: Correctly implement DTOI. 2024-12-18 17:30:16 +01:00
f416713608 vkd3d-shader/spirv: Correctly implement DTOF. 2024-12-18 17:30:16 +01:00
64126a00c3 vkd3d-shader/ir: Give more meaningful names to I/O normalisation levels.
The previous names "not normalised" and "fully normalised" have meanings
which are likely to change with time. OTOH including a description of the
normalisation level in the enumerant seems excessive. Relating
normalisation levels to shader model versions might be a reasonable
compromise.
2024-12-12 17:21:49 +01:00
b484288a82 vkd3d-shader/spirv: Parse SPIR-V instructions. 2024-12-09 16:09:16 +01:00
ac2901d2cb vkd3d-shader/spirv: Parse the SPIR-V instruction schema. 2024-12-09 16:09:16 +01:00
9b4f5dab77 vkd3d-shader/spirv: Parse the SPIR-V id bound. 2024-12-09 16:09:16 +01:00
3f548ccf9c vkd3d-shader/spirv: Parse the SPIR-V generator magic number. 2024-12-09 16:09:16 +01:00
e218dae281 vkd3d-shader/spirv: Parse the SPIR-V version number. 2024-12-09 16:08:33 +01:00
6cac18e395 vkd3d-shader/spirv: Parse the SPIR-V magic number. 2024-12-09 15:41:24 +01:00