diff options
| author | ezwinxdlmao <194417877+ezwinxdlmao@users.noreply.github.com> | 2026-11-22 12:18:24 +0200 |
|---|---|---|
| committer | ezwinxdlmao <194417877+ezwinxdlmao@users.noreply.github.com> | 2026-11-22 12:31:42 +0200 |
| commit | d5c0e163198fd79e211a543b904f0b3ee8d3b553 (patch) | |
| tree | d36ad28b50b1b4eb44fc567e5aa35341c1460583 /runtime/src/thread_stacks.cpp | |
| parent | f85582e23d4ab9e19acbf694358f137d6b8531b1 (diff) | |
Tests: GPU test for the xy/xyz typed buffer loads and stores (TEST-185)
buffer_load_format_xy/xyz, tbuffer_load_format_xy/xyz and
buffer_store_format_xy/xyz were checked only on the CPU. The new
cs_fmt_xy_xyz.asm runs 12 loads and 9 stores on one thread, and
check.py and run_gpu_tests.py compare 128 dumped words.
Every expected word was measured by running the same body natively on a
Radeon 680M (gfx1035, RDNA2), through tools/hw_oracle's kernel wrapper
with s[0:3] set to the V# vk_compute_test passes. Wave32 and wave64 gave
the same words. What the hardware does:
- Loads write only their 2 or 3 VGPRs. A missing channel repeats one the
format has (SHADER-86), and tbuffer loads take the instruction's format.
- Bounds: the whole element must end inside num_records, even when the
loaded components do. Such a load reads 0, and such a store writes
nothing.
- A store with fewer components than its format writes the whole
element, with 0 for the rest. Into a one-channel format only x is
written.
The translation already does all of this. The test catches a store that
fills the missing components with anything but 0, a bounds check on the
first dword only, and an xy/xyz load that writes four VGPRs: each of
these, made in a scratch copy of the translator, failed 6, 16 and 18
words.
check.py's dump comparison becomes dump_test, shared with
fmt_1010102_test, whose messages are unchanged. docs/design.md records
the measured rules in the typed-load, format-store and bounds rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/thread_stacks.cpp')
0 files changed, 0 insertions, 0 deletions