diff options
| author | ezwinxdlmao <194417877+ezwinxdlmao@users.noreply.github.com> | 2026-11-22 12:52:59 +0200 |
|---|---|---|
| committer | ezwinxdlmao <194417877+ezwinxdlmao@users.noreply.github.com> | 2026-11-22 16:33:18 +0200 |
| commit | cd6e21be84e5f4dc5f2dad990c24909d16eed7ee (patch) | |
| tree | 09d36edfe27727037ce83f8426cc6c17dcad1240 /scripts/run_gpu_tests.py | |
| parent | 003e78129303643a3fdc9e5f0e31a01b09759236 (diff) | |
Translator: tbuffer_store_format_* with the instruction's format
tbuffer_store_format_* and its d16 forms were Unsupported, though every
tbuffer_load_format_* form translates. They now go through buffer_store
with the instruction's format, as the loads go through
buffer_load_format:
- only that format is encoded, with no branch on the V#'s FORMAT;
- the bounds check uses its element size;
- a V# whose FORMAT is 0 (INVALID) still disables the store, as measured.
(@Vonsek covers the MTBUF loads and @opit80 the raw MUBUF accesses
through such a V#.)
The format parsing the loads did inline becomes mtbuf_format(), shared by
both: no modifier is GFX10's default BUF_FMT_8_UNORM, and a format
FORMATS has no encoder for stays Unsupported. read_before_write_vgprs
now counts a tbuffer store's data VGPRs as reads, as for buffer_store.
cs_tbuffer_store.asm stores into 13 sentinel-filled regions through V#s
whose format differs from the instruction's or is 0, and reads them
back. Every
expected word was measured by running the same body natively on a
Radeon 680M (gfx1035, RDNA2); wave32 and wave64 gave the same 52 words:
- the instruction's format decides the encoding, the element and the
bounds;
- components the format has but the store doesn't give are 0, and extra
ones are dropped;
- the default format is one byte, and its neighbours are kept;
- a FORMAT-0 V# leaves the region untouched.
check.py and run_gpu_tests.py compare the dump. The semantic fixture
runs through the interpreter in tests/semantic/test_tbuffer_store.py,
which fails on the old translator (Unsupported). It also fails on
versions that take the bounds from the V#'s element (5 words differ),
take the format from the V#, fill missing components with anything
but 0 (1 word), or drop the FORMAT-0 guard (2 words).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts/run_gpu_tests.py')
| -rw-r--r-- | scripts/run_gpu_tests.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index 7209c364c..0bddf0fc7 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -25,7 +25,7 @@ sys.path.insert(0, os.path.join(ROOT, "tools")) | |||
| 25 | import mc_command # noqa: E402 | 25 | import mc_command # noqa: E402 |
| 26 | sys.path.insert(0, SHADER_DIR) | 26 | sys.path.insert(0, SHADER_DIR) |
| 27 | from build import CLIP_CASES, clip_container, shader_source | 27 | from build import CLIP_CASES, clip_container, shader_source |
| 28 | from check import Skip, clip_test, fmt_1010102_test, fmt_sint32_test, fmt_xy_xyz_test | 28 | from check import Skip, clip_test, fmt_1010102_test, fmt_sint32_test, fmt_xy_xyz_test, tbuffer_store_test |
| 29 | from compute_fixture import compute_header | 29 | from compute_fixture import compute_header |
| 30 | from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) | 30 | from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) |
| 31 | from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES, | 31 | from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES, |
| @@ -839,6 +839,10 @@ def run_suite(a, work: str) -> int: | |||
| 839 | # TEST-185: xy/xyz format loads and stores, words measured natively on a Radeon 680M (the .asm header) | 839 | # TEST-185: xy/xyz format loads and stores, words measured natively on a Radeon 680M (the .asm header) |
| 840 | problem = fmt_xy_xyz_test(a.build, spirv_dir, cs_env) | 840 | problem = fmt_xy_xyz_test(a.build, spirv_dir, cs_env) |
| 841 | results.append((name, not problem, problem or "128/128 dumped words exact")) | 841 | results.append((name, not problem, problem or "128/128 dumped words exact")) |
| 842 | elif name == "cs_tbuffer_store": | ||
| 843 | # tbuffer_store_format_*: the instruction's format, words measured natively on a Radeon 680M (the .asm header) | ||
| 844 | problem = tbuffer_store_test(a.build, spirv_dir, cs_env) | ||
| 845 | results.append((name, not problem, problem or "128/128 dumped words exact")) | ||
| 842 | elif name == "cs_global_neg_offset": | 846 | elif name == "cs_global_neg_offset": |
| 843 | # Negative global_load/global_store offsets (cs_global_neg_offset.asm): 40 groups give a 0x2800-byte | 847 | # Negative global_load/global_store offsets (cs_global_neg_offset.asm): 40 groups give a 0x2800-byte |
| 844 | # heap holding both the right addresses and the 4096-lower ones. One thread, no wave64 requirement. | 848 | # heap holding both the right addresses and the 4096-lower ones. One thread, no wave64 requirement. |