Commit Graph

5 Commits

Author SHA1 Message Date
4f2628f83f rdna2spirv: 64-bit buffer addresses without Int64 (SHADER-423)
lower_addr64 rewrites the assembled module's 64-bit address arithmetic (the zero-extend, shift-by-32, OR/AND, add and
subtract with carry, narrowing, sign-extension, 64-bit bitcasts and pair compares the address idiom uses) into uint
pairs and an OpBitcast of a 2x32 vector to the PhysicalStorageBuffer pointer, and drops OpCapability Int64 when
nothing else needs it, so translated shaders run on devices without shaderInt64. --int64-addresses keeps the 64-bit
form. Semantic tests for the lowering, the interpreters learn the pair pointer form, design.md row.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
2026-11-24 16:26:16 +02:00
70c1c54cbf Merge origin/main into buffer-formats-all-v2
Conflicts in tools/rdna2spirv.py and docs/design.md. Main had meanwhile fixed three of the older
stores this branch found (SHADER-358: f16 toward zero; SHADER-364: exact NORM rounding and the
DST_SEL-dependent routing of a two-component format), so the merge keeps main's mem_f16,
encode_norm_bits and 2-component swizzle, applies them to the new SCALED kinds as well, and passes
the swizzled channels into the shared typed-store encode function (Gen.format_encode_call, now 29
parameters). Gen.norm_encode_exact and EXACT_NORM_CODES go: encode_norm_bits does the same job.
The three expectedFailure tests pass now and pin the older stores to the oracle's words; cs_fmt_all's
16_16_SINT store is (x, 0) through its identity-selector V#. design.md keeps one Typed buffer formats
row; test_buffer_store_format's unsupported-format example is BUF_FMT_INVALID (8_USCALED is
supported now).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 19:33:56 +01:00
2700799f60 test(semantic): add SPIR-V OpImageWrite emission, OOB zero-clamp, and negative controls 2026-11-22 16:54:59 +01:00
d28d2c8355 test(semantic): add SIMD multi-lane tests for tbuffer_store_format_xyzw bounds checking 2026-11-22 16:52:33 +01:00
7481027587 test(semantic): add reference oracle for typed buffer format packing and conversions 2026-11-22 16:50:51 +01:00