diff --git a/README.md b/README.md index a24bec923b..8e24b5725c 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ The control-flow CPU translator supports [source-built string memory transfers]( | gfx1013 image atomics | Lower [2D `R32_UINT` `image_atomic_add`, `umax` and `cmpswap`](docs/experiments.md#gfx1013-2d-image-atomics) with the gfx1030 lowering and compare every texel of a three-mip texture, including contended adds. | `ctest --preset dev --no-tests=error -R '^compute_store_aot_gfx1013_image_atomics_'` | | gfx1013 image gathers | Lower [one 2D `image_gather4_l` with a constant sampler and a known integer LOD](docs/experiments.md#gfx1013-2d-explicit-lod-image-gathers) on an RGBA32 FLOAT view. Compare all four taps at three mips and on a view that starts at mip 1. | `ctest --preset dev --no-tests=error -R '^compute_store_aot_gfx1013_gather4_l_'` | | Startup compute mip-zero gather | Dispatch a [gfx1013 `image_gather4_lz`](docs/experiments.md#compute-mip-zero-gather) and compare four texels from the first visible mip against a CPU reference. | `ctest --preset dev --no-tests=error -R '^startup_compute_gather_lz'` | -| Startup compute FP32 array image store | Bind a [2D-array UAV](docs/experiments/startup-compute-array-uav.md) through the startup runtime, verify the nonzero first slice and per-lane EXEC, and compare every texel after the fence. | `ctest --preset dev --no-tests=error -R '^startup_compute_dispatch_array_'` | +| Startup compute FP32 and packed D16 array image store | Bind a [2D-array UAV](docs/experiments/startup-compute-array-uav.md) through the startup runtime, verify the nonzero first slice and per-lane EXEC, and compare every texel after the fence. | `ctest --preset dev --no-tests=error -R '^startup_compute_dispatch_array_'` | | Startup compute D16 image store | Write [four packed half-floats](docs/experiments.md#startup-compute-d16-image-store) per active thread and check all three mips. | `ctest --preset dev --no-tests=error -R '^startup_compute_image_store_d16'` | | Startup explicit-LOD 2D gather | Dispatch and draw [gfx1013 `image_gather4_l`](docs/experiments.md#explicit-lod-2d-gather) across explicit mips, view offsets, clamped edges, and dynamic per-lane LOD against CPU references. | `ctest --preset dev --no-tests=error -R '^startup_compute_gather_l'` | | Startup compute buffer atomics | Dispatch [gfx1013 32-bit MUBUF raw buffer atomics](docs/experiments.md#startup-compute-raw-buffer-atomics) with thread contention, `glc` old-value returns, `cmpswap` order, and `EXEC` masking. | `ctest --preset dev --no-tests=error -R '^startup_compute_buffer_atomics'` | diff --git a/docs/experiments.md b/docs/experiments.md index f1304d3101..d744ea7bb9 100644 --- a/docs/experiments.md +++ b/docs/experiments.md @@ -15146,12 +15146,13 @@ ctest --preset release --no-tests=error -R '^startup_compute_gather_lz(_warp|_ha ### Startup compute D16 image store -The startup compute translator accepts a 2D `image_store d16` with all four -DMASK bits set, full-width X/Y and eight intact image descriptor words from a -fixed table offset. The R/G half-floats occupy the low/high halves of the first +The startup compute translator accepts 2D and 2D-array `image_store d16` +with all four DMASK bits set, full-width X/Y (and layer for an array), and eight +intact image descriptor words from a fixed table offset. The R/G half-floats occupy the low/high halves of the first data VGPR. B/A occupy the second. The translator widens the four halves for a typed UAV store under the lane's EXEC bit. The version 2 compute manifest -records `uav N tex2d float table P O channels 4`. Raw buffer and texture UAVs +records `uav N tex2d float table P O channels 4` or, for an array, +`uav N tex2da float table P O channels 4`. Raw buffer and texture UAVs share a register index space. The consumer must validate the bound view against its dimension and float type. [AMD RDNA 2 ISA, ยงยง8.2.1 and 8.2.5](https://docs.amd.com/api/khub/documents/Et~wpu9g~Ffl7d9q0QZ~Og/content) @@ -15161,7 +15162,10 @@ write 16 texels to mip zero of an RGBA16_FLOAT UAV. Each run compares all 1,344 half-words across three mips, including signed zeros, subnormals and untouched texels. A second program masks out the second row. Omitting the store, swapping R/G, swapping the packed registers and dropping the EXEC guard produce 64, 32, -64 and 32 differences respectively. Slot-67 runtime binding is tracked in #2274. +64 and 32 differences respectively. Slot-67 2D runtime binding is tracked in #2274. +The [array UAV runtime fixture](experiments/startup-compute-array-uav.md) also +checks packed D16 through the production slot-67/slot-14 path with a nonzero +FirstArraySlice, all six physical slices and five negative controls. ```powershell cmake --build --preset release --target offscreen_check @@ -15175,8 +15179,8 @@ dim:SQ_RSRC_IMG_2D_ARRAY with three full-width address VGPRs for x, y and layer. It emits an RWTexture2DArray store under the lane EXEC bit and records uav N tex2da float table P O channels 4 in the version 2 manifest. The [startup runtime array UAV binding](experiments/startup-compute-array-uav.md) -consumes this manifest. Pixel arrays, -packed D16 arrays and the 1D, 3D and cube store forms remain refused. +consumes this manifest for full-mask FP32 and packed D16 compute stores. +Pixel arrays and the 1D, 3D and cube store forms remain refused. The standalone GPU fixture writes the same four words into mip zero of layer 1 and layer 3 of a four-layer allocation. It compares all 5,376 words and detects diff --git a/docs/experiments/startup-compute-array-uav.md b/docs/experiments/startup-compute-array-uav.md index 6a52449004..dfd17b2d3c 100644 --- a/docs/experiments/startup-compute-array-uav.md +++ b/docs/experiments/startup-compute-array-uav.md @@ -1,9 +1,11 @@ -# Startup compute FP32 array UAV binding +# Startup compute FP32 and packed D16 array UAV binding Refs [#2742](https://github.com/R0Y00/Xbox2Windows/issues/2742). Depends on the full-mask FP32 compute array image store lowering in -[#2744](https://github.com/R0Y00/Xbox2Windows/pull/2744). Pixel and packed-half -array stores remain refused. +[#2744](https://github.com/R0Y00/Xbox2Windows/pull/2744) and the production +binding in [#2777](https://github.com/R0Y00/Xbox2Windows/pull/2777). Packed +D16 compute stores reuse that binding and the existing 2D two-VGPR lowering; +no new manifest or runtime path is needed. Pixel array stores remain refused. The production startup compute manifest consumer accepts `uav N tex2da float table P O channels 4`. It requires an explicitly described @@ -22,11 +24,24 @@ partial EXEC are checked for both layers. The wrong-layer and dropped-EXEC controls must differ by 128 and 32 words respectively. A mismatched 2D view must be refused with all 1,024 words untouched. +The packed D16 case uses the same 32x8 six-slice allocation with +RGBA16_FLOAT and a 256-byte row pitch. Packed VGPRs 0xc0003c00 and +0x7bff3800 produce half encodings 0x3c00, 0xc000, 0x3800 and 0x7bff +(R/G/B/A). The reference compares all 6,144 raw halfwords after the fence. +For each relative layer (1 and 3), full and partial EXEC must have no +mismatches. The wrong-layer, dropped-EXEC, swapped first two halves, swapped +VGPRs and omitted-store controls must differ by 128, 32, 32, 64 and 64 +halfwords respectively; each mutated output is also compared with its own +CPU reference. An incompatible RGBA16_FLOAT 2D view must be refused with +1,024 halfwords unchanged. Before translation, all six slices must remain +unchanged. The source-built instruction sequences for both layers and EXEC +variants are checked against LLVM 15 with the D16 translation controls. + Reproduce on Windows (source-built fixtures only): ```powershell cmake --build --preset dev --target startup_stream_consumer offscreen_check -ctest --preset dev --no-tests=error -j 1 -R '^startup_compute_dispatch_array_(warp|hardware)$' -V +ctest --preset dev --no-tests=error -j 1 -R '^startup_compute_dispatch_array(_d16)?_(warp|hardware)$' -V ``` No game input, retail program coverage, title execution or guest diff --git a/tests/cmake/startup_compute_dispatch_array.cmake b/tests/cmake/startup_compute_dispatch_array.cmake index e601ef99d1..ad9b4f92b1 100644 --- a/tests/cmake/startup_compute_dispatch_array.cmake +++ b/tests/cmake/startup_compute_dispatch_array.cmake @@ -4,5 +4,9 @@ if(EXISTS "${INTAKE_PYTHON}" AND TARGET startup_stream_consumer) "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_compute_dispatch_array_check.py" "$" "${DXC_EXECUTABLE}" ${adapter}) set_tests_properties(startup_compute_dispatch_array_${adapter} PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77) + add_test(NAME startup_compute_dispatch_array_d16_${adapter} COMMAND "${INTAKE_PYTHON}" -B + "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_compute_dispatch_array_check.py" "$" + "${DXC_EXECUTABLE}" ${adapter} --d16) + set_tests_properties(startup_compute_dispatch_array_d16_${adapter} PROPERTIES TIMEOUT 180 SKIP_RETURN_CODE 77) endforeach() endif() diff --git a/tests/startup_compute_dispatch_array_check.py b/tests/startup_compute_dispatch_array_check.py index 37ae6e9b60..343640ad87 100644 --- a/tests/startup_compute_dispatch_array_check.py +++ b/tests/startup_compute_dispatch_array_check.py @@ -1,4 +1,4 @@ -"""Startup FP32 array UAV binding through the production slot-67 / slot-14 path (#2742).""" +"""Startup FP32 and packed D16 array UAV binding through the production slot-67 / slot-14 path (#2742).""" import os from pathlib import Path import subprocess @@ -6,6 +6,7 @@ import tempfile import startup_compute_image_store_check as A +import startup_compute_image_store_d16_check as D import startup_compute_dispatch_texture_check as T from startup_compute_request_check import DATA, prepare from startup_compute_translate_check import state_a @@ -14,35 +15,40 @@ WORDS = WIDTH * HEIGHT * 4 -def reference(layer=None, rows=2, layers=LAYERS): - result = [0xbf000000 | (z << 12) | i for z in range(layers) for i in range(WORDS)] +def reference(layer=None, rows=2, layers=LAYERS, d16=False, values=None): + result = ([0x5000 + i for i in range(layers * WORDS)] if d16 else + [0xbf000000 | (z << 12) | i for z in range(layers) for i in range(WORDS)]) + if values is None: + values = D.ARRAY_VALUES if d16 else A.ARRAY_VALUES if layer is not None: for y in range(rows): for x in range(4 * A.fixture.GROUPS): at = (FIRST + layer) * WORDS + (y * WIDTH + x) * 4 - result[at:at + 4] = A.ARRAY_VALUES + result[at:at + 4] = values return result -def check(directory, consumer, dxc, adapter, layer, masked): +def check(directory, consumer, dxc, adapter, layer, masked, d16=False): cache, env = prepare(directory) env.update(X2W_D3D12_LIST_NOOP="1", X2W_D3D12_DEBUG="1") if adapter == "hardware": env["X2W_TEST_DISPATCH_HARDWARE"] = "1" (directory / "compute_root").write_bytes(T.C.root_blob(3, table_range=True)) env["X2W_TEST_COMPUTE_ROOT"] = str(directory / "compute_root") - program = A.array_program(layer) - if masked: + program = D.array_program(layer, masked) if d16 else A.array_program(layer) + if masked and not d16: assert program.count(A.ARRAY_STORE) == 1 program = program.replace(A.ARRAY_STORE, A.MASK + A.ARRAY_STORE) (directory / "program").write_bytes(program) (directory / "data").write_bytes(DATA) (directory / "state").write_bytes(state_a(A.fixture.GROUP, A.RSRC2)) - layout = "<%dI" % (WORDS * LAYERS) - mode = "texture-array" + layout = ("<%dH" if d16 else "<%dI") % (WORDS * LAYERS) + mode = "texture-array-d16" if d16 else "texture-array" + unit = "halves" if d16 else "words" + store = D.ARRAY_LINE if d16 else A.ARRAY_LINE got, result = T.run(directory, consumer, env, mode, layout) print(result.stdout, end="") - assert got == reference(), "untranslated dispatch wrote the texture" + assert got == reference(d16=d16), "untranslated dispatch wrote the texture" assert len(T.lines(result, "Dispatch(2, 1, 1) refused: no translation")) == 1, result.stderr[-3000:] key = int(T.lines(result, "x2w-draw compute request")[0].split()[3], 16) T.translate(cache, dxc, key) @@ -52,54 +58,68 @@ def check(directory, consumer, dxc, adapter, layer, masked): cso = cache / f"{key:016x}.cs.cso" source = hlsl.read_text() assert "RWTexture2DArray w0 : register(u0);" in source - expected = reference(layer, 1 if masked else 2) + expected = reference(layer, 1 if masked else 2, d16=d16) + assert store in source + assert sum(a != b for a, b in zip(reference(d16=d16), expected, strict=True)) == (32 if masked else 64) got, result = T.run(directory, consumer, env, mode, layout) assert len(T.lines(result, "Dispatch(2, 1, 1) translated")) == 1, result.stderr[-3000:] debug = T.clean(result) wrong = sum(a != b for a, b in zip(got, expected)) assert wrong == 0, (layer, masked, wrong) print(f"{adapter}: relative layer {layer}, physical layer {FIRST + layer}, partial EXEC={masked}: " - f"{len(got)} words, mismatches={wrong}; debug layer: {debug}", flush=True) + f"{len(got)} {unit}, mismatches={wrong}; debug layer: {debug}", flush=True) # The actual runtime must refuse a plain 2D view of the same format before dispatch. - got, result = T.run(directory, consumer, env, "texture-array-2d", "<%dI" % WORDS) - assert got == reference(layers=1) + got, result = T.run(directory, consumer, env, "texture-store" if d16 else "texture-array-2d", + ("<%dH" if d16 else "<%dI") % WORDS) + assert got == reference(layers=1, d16=d16) refusal = T.lines(result, "Dispatch(2, 1, 1) refused:") assert len(refusal) == 1 and refusal[0].endswith("an output texture view is not a 2D array"), result.stderr[-3000:] assert not T.lines(result, "Dispatch(2, 1, 1) translated") - print(f"{adapter}: incompatible 2D UAV refused; {len(got)} words unchanged", flush=True) + print(f"{adapter}: incompatible 2D UAV refused; {len(got)} {unit} unchanged", flush=True) # Negative controls run through the same production binding, not the offscreen shortcut. - guard = "if (exec & 1) " + A.ARRAY_LINE + guard = "if (exec & 1) " + store if masked: assert source.count(guard) == 1 - mutant = source.replace(guard, A.ARRAY_LINE) - label, count = "dropped EXEC", 32 + cases = [("dropped EXEC", source.replace(guard, store), reference(layer, d16=d16), 32)] else: index = "uint3(v8, v9, v10)" assert source.count(index) == 1 delta = "+ 1u" if layer == 1 else "- 1u" - mutant = source.replace(index, f"uint3(v8, v9, v10 {delta})") - label, count = "wrong layer", 128 - hlsl.write_text(mutant, encoding="ascii") - subprocess.run([dxc, "-Gis", "-T", "cs_6_0", "-E", "main", "-Fo", cso, hlsl], check=True) - got, result = T.run(directory, consumer, env, mode, layout) - assert len(T.lines(result, "Dispatch(2, 1, 1) translated")) == 1, result.stderr[-3000:] - T.clean(result) - wrong = sum(a != b for a, b in zip(got, expected)) - assert wrong == count, (layer, label, wrong, count) - print(f"{adapter}: {label} control: {len(got)} words, mismatches={wrong} (expected {count})", flush=True) + cases = [("wrong layer", source.replace(index, f"uint3(v8, v9, v10 {delta})"), + reference(2, d16=d16), 128)] + if d16 and layer == 1: + parts = ", ".join(D.PARTS) + assert source.count(parts) == 1 and source.count(store) == 1 + for label, order, count in (("swap halves", (1, 0, 2, 3), 32), + ("swap VGPRs", (2, 3, 0, 1), 64)): + cases.append((label, source.replace(parts, ", ".join(D.PARTS[i] for i in order)), + reference(layer, d16=True, values=tuple(D.ARRAY_VALUES[i] for i in order)), count)) + cases.append(("omit store", source.replace(store, ""), reference(d16=True), 64)) + for label, mutant, control_reference, count in cases: + assert mutant != source + predicted = sum(a != b for a, b in zip(control_reference, expected, strict=True)) + assert predicted == count, (layer, label, predicted, count) + hlsl.write_text(mutant, encoding="ascii") + subprocess.run([dxc, "-Gis", "-T", "cs_6_0", "-E", "main", "-Fo", cso, hlsl], check=True) + got, result = T.run(directory, consumer, env, mode, layout) + assert len(T.lines(result, "Dispatch(2, 1, 1) translated")) == 1, result.stderr[-3000:] + T.clean(result) + wrong = sum(a != b for a, b in zip(got, expected, strict=True)) + assert wrong == predicted and got == control_reference, (layer, label, wrong, predicted) + print(f"{adapter}: {label} control: {len(got)} {unit}, mismatches={wrong} (expected {predicted})", flush=True) -def main(consumer, dxc, adapter): +def main(consumer, dxc, adapter, d16=False): with tempfile.TemporaryDirectory() as temp: for layer in (1, 3): for masked in (False, True): - check(Path(temp) / f"layer-{layer}-{masked}", consumer, dxc, adapter, layer, masked) - print(f"startup_compute_dispatch_array: PASS on {adapter}") + check(Path(temp) / f"layer-{layer}-{masked}", consumer, dxc, adapter, layer, masked, d16) + print(f"startup_compute_dispatch_array{'_d16' if d16 else ''}: PASS on {adapter}") if __name__ == "__main__": - if len(sys.argv) != 4 or sys.argv[3] not in ("warp", "hardware"): + if len(sys.argv) not in (4, 5) or sys.argv[3] not in ("warp", "hardware") or (len(sys.argv) == 5 and sys.argv[4] != "--d16"): sys.exit(__doc__) - main(*sys.argv[1:]) + main(*sys.argv[1:4], d16=len(sys.argv) == 5) diff --git a/tests/startup_compute_image_store_check.py b/tests/startup_compute_image_store_check.py index aebf9fe3e7..1623afee8e 100644 --- a/tests/startup_compute_image_store_check.py +++ b/tests/startup_compute_image_store_check.py @@ -136,8 +136,6 @@ def encoded(line, hex_words): assert not set(ARRAY_VALUES) & set(G.D.INLINE_FLOAT_LITERALS), G.D.INLINE_FLOAT_LITERALS # The array address is exactly x, y and layer: a two- or four-register address is refused. array_mods = ['dmask:0xf', 'dim:SQ_RSRC_IMG_2D_ARRAY'] - refused('compute image_store d16 requires a 2D image', - lambda: pipe.cs.op_image_store(['v[14:15]', 'v[8:10]', 's[24:31]'], array_mods + ['d16'])) for address in ('v[8:9]', 'v[8:11]'): refused('x, y and layer expected', lambda: pipe.cs.op_image_store(['v[14:17]', address, 's[24:31]'], array_mods)) diff --git a/tests/startup_compute_image_store_d16_check.py b/tests/startup_compute_image_store_d16_check.py index a16a78d0c4..9c7fd55160 100644 --- a/tests/startup_compute_image_store_d16_check.py +++ b/tests/startup_compute_image_store_d16_check.py @@ -4,6 +4,7 @@ import tempfile import compute_mimg_float_store_d16_check as fixture +import startup_compute_image_store_check as A from startup_gfx2hlsl_compute_check import G, TGID_X, TGID_Y, assemble, refused, root_blob, tidig @@ -16,6 +17,50 @@ LINE = f'w0[uint2(v8, v9)] = float4({", ".join(PARTS)});' +# Reuse the assembled FP32 array x/y/layer prologue. The packed values +# are four distinct finite nonzero half encodings, low half first. +ARRAY_VALUES = (0x3c00, 0xc000, 0x3800, 0x7bff) +ARRAY_DATA = bytes.fromhex('7fc08cbf ff021c7e003c00c0 ff021e7e0038ff7b') +ARRAY_STORE = bytes.fromhex('280f20f0080e0680') +ARRAY_LINE = LINE.replace('uint2(v8, v9)', 'uint3(v8, v9, v10)') +ARRAY_SOURCE = A.ARRAY_SOURCE.split('s_waitcnt', 1)[0] + """\ +s_waitcnt lgkmcnt(0) +v_mov_b32_e32 v14, 0xc0003c00 +v_mov_b32_e32 v15, 0x7bff3800 +{mask}image_store v[14:15], v[8:10], s[24:31] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY d16 +s_endpgm +""" + + +def array_program(layer, masked=False): + return A.ARRAY_PROLOGUE + A.ARRAY_SLICE[layer] + ARRAY_DATA + (MASK if masked else b'') + ARRAY_STORE + A.ARRAY_END + + +def array_controls(llvm_mc): + for layer in (1, 3): + for masked in (False, True): + code = array_program(layer, masked) + if llvm_mc: + source = ARRAY_SOURCE.format(layer=layer, mask='v_cmpx_eq_u32_e32 0, v1\n' if masked else '') + assert assemble(llvm_mc, source) == code, (layer, masked) + pipe = G.ComputePipeline(code, root_blob(3), RSRC2, fixture.GROUP) + hlsl = pipe.hlsl_cs() + assert 'RWTexture2DArray w0 : register(u0);' in hlsl + assert ('if (exec & 1) ' if masked else '') + ARRAY_LINE in hlsl + assert ('if (exec & 1) ' + ARRAY_LINE in hlsl) == masked + assert f'v10 = 0x{layer:08x}u;' in hlsl + assert 'uav 0 tex2da float table 1 64 channels 4' in pipe.manifest().splitlines() + mods = ['dmask:0xf', 'dim:SQ_RSRC_IMG_2D_ARRAY', 'd16'] + for data in ('v14', 'v[14:16]', 'v[14:17]', 'v[255:256]'): + refused('two VGPRs expected', lambda: pipe.cs.op_image_store([data, 'v[8:10]', 's[24:31]'], mods)) + for addr in ('v[8:9]', 'v[8:11]'): + refused('x, y and layer expected', lambda: pipe.cs.op_image_store(['v[14:15]', addr, 's[24:31]'], mods)) + refused('fixed table image descriptor', lambda: pipe.cs.op_image_store(['v[14:15]', 'v[8:10]', 's[28:35]'], mods)) + refused('typed UAV store writes all four channels', lambda: pipe.cs.op_image_store(['v14', 'v[8:10]', 's[24:31]'], ['dmask:0x3', *mods[1:]])) + refused('modifier a16', lambda: pipe.cs.op_image_store(['v[14:15]', 'v[8:10]', 's[24:31]'], mods + ['a16'])) + print('Compute packed D16 array translation and refusal checks passed' + ('; LLVM assembly matched' if llvm_mc else '')) + + def pipeline(body): return G.ComputePipeline(PREFIX + body + END, root_blob(3), RSRC2, fixture.GROUP) @@ -74,6 +119,7 @@ def encoded(line, hex_words): if offset == 64: for body in (read + STORE, STORE + read): refused('used for a load and a store', lambda: pipeline(load + wait + body)) + array_controls(llvm_mc) print('Compute D16 store, EXEC, raw/texture binding order, alias and refusal checks passed') diff --git a/tests/startup_stream_consumer.cpp b/tests/startup_stream_consumer.cpp index 34840c464b..eddf880ff0 100644 --- a/tests/startup_stream_consumer.cpp +++ b/tests/startup_stream_consumer.cpp @@ -403,7 +403,7 @@ static int texture_slot67(void* device, const std::string& mode) { constexpr UINT width = 32, height = 8; const bool fp32 = mode == "texture-array" || mode == "texture-array-2d"; - const UINT layers = mode == "texture-array" ? 6 : 1; + const UINT layers = mode == "texture-array" || mode == "texture-array-d16" ? 6 : 1; const UINT pitch = width * (fp32 ? 16 : 8), slice_bytes = pitch * height, bytes = slice_bytes * layers; const auto word = [](const void* value) { return reinterpret_cast(value); }; const auto make = [&](D3D12_HEAP_TYPE type, const D3D12_RESOURCE_DESC& desc, D3D12_RESOURCE_STATES state) { diff --git a/tools/startup/gfx2hlsl.py b/tools/startup/gfx2hlsl.py index ba1dd592c2..4d8a8811b8 100644 --- a/tools/startup/gfx2hlsl.py +++ b/tools/startup/gfx2hlsl.py @@ -7186,7 +7186,7 @@ def fixed_table_image(self, operand, name): return self.descriptor(operand) def op_image_store(self, ops, mods): - """Write a full 2D texel or, for compute FP32, a full 2D-array texel. + """Write a full 2D texel or, for compute, a full 2D-array texel. MIMG opcode 0x08 (LLVM AMDGPU MIMGInstructions.td, IMAGE_STORE via MIMG_Store): VDATA is the source, VADDR the integer texel address (x, y for dim 2D, x, y, layer for dim 2D-array) and SRSRC @@ -7216,8 +7216,6 @@ def op_image_store(self, ops, mods): array = dims[0] == 'SQ_RSRC_IMG_2D_ARRAY' if dims[0] != 'SQ_RSRC_IMG_2D' and (not array or self.kind != 'cs'): raise Unsupported('%s on %s: only 2D images are lowered' % (name, dims[0])) - if array and d16: - raise Unsupported('compute image_store d16 requires a 2D image') try: mask = int(masks[0], 0) except ValueError: