diff options
| author | Luiz Neves <luizgustavobenicio@gmail.com> | 2026-11-21 18:46:50 -0300 |
|---|---|---|
| committer | Luiz Neves <luizgustavobenicio@gmail.com> | 2026-11-21 18:46:50 -0300 |
| commit | e4cacf51fa53050c2ca94a0ef3a4d3a9423cc43b (patch) | |
| tree | 8713b5f112af39df4c11187439c6f4b82848d31b /runtime/src/tls_host.cpp | |
| parent | 4e390e0871d7265e629b51aca8ff99a15a6a6845 (diff) | |
Translator: keep the buffer_load_format sub-dword merge shift below 32
buffer_load_format_* merges dword 1 above a sub-dword element with
w1 << (32 - bsh) and picks dword 0 when bsh is 0. For every dword-aligned
element, the discarded side shifts by 32, undefined in SPIR-V.
(32 - bsh) & 31 keeps it in range.
tests/semantic/test_buffer_load_format.py runs u32, u32x2/x4, uint8x4,
uint16x2/x4 and f16 loads from interpreter memory. spirv_mini_interp.py learns
the two things the format decode needs: OpConvertUToF/OpConvertSToF and GLSL
FMin/FMax (NaN operands raise UnsupportedConstruct).
Diffstat (limited to 'runtime/src/tls_host.cpp')
0 files changed, 0 insertions, 0 deletions