From 7ae88f698c02bf467388e8a183510cc3db84e8b8 Mon Sep 17 00:00:00 2001 From: NiiRoZz Date: Wed, 25 Nov 2026 02:42:10 +0100 Subject: [PATCH 1/4] startup: write translation requests for console pipelines used only by ExecuteIndirect Translation requests for console graphics pipelines were written only on the direct-draw path, so a pipeline used only through list slot 61 was never requested. When slot 61 refuses a draw for lack of a matching desktop pipeline and the bound pipeline is a console one, take the draw lock and call translation_for, the direct-draw request writer: same key, same files, once per pipeline. Nothing is drawn and forwarding is unchanged. startup_indirect_requests_{warp,hardware}: a slot-57 pipeline bound and used through one refused ExecuteIndirect draw writes its request (once over two runs); bound without the call, only the stream pipeline's request exists. Co-Authored-By: Claude Fable 5.2 --- CMakeLists.txt | 4 ++ docs/startup-runtime.md | 2 +- src/startup_stubs/d3d12_draw.inl | 8 +++ src/startup_stubs/d3d12_xs_device.cpp | 6 +- tests/startup_indirect_requests_check.py | 70 ++++++++++++++++++++++++ tests/startup_stream_consumer.cpp | 35 ++++++++++++ 6 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 tests/startup_indirect_requests_check.py diff --git a/CMakeLists.txt b/CMakeLists.txt index 6abe7740dd..4f4bc7fca9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2505,6 +2505,10 @@ if(EXISTS "${INTAKE_PYTHON}") "${INTAKE_PYTHON}" -B "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_slot57_blend_draw_check.py" "$" "${backend}") set_tests_properties(startup_slot57_blend_draw_${backend} PROPERTIES TIMEOUT 90 SKIP_RETURN_CODE 77) + add_test(NAME startup_indirect_requests_${backend} COMMAND "${INTAKE_PYTHON}" -B + "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_indirect_requests_check.py" + "$" "${backend}") + set_tests_properties(startup_indirect_requests_${backend} PROPERTIES TIMEOUT 90 SKIP_RETURN_CODE 77) add_test(NAME startup_packed_target_draw_${backend} COMMAND "${INTAKE_PYTHON}" -B "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_packed_target_draw_check.py" "$" "${DXC_EXECUTABLE}" "${backend}") diff --git a/docs/startup-runtime.md b/docs/startup-runtime.md index f2785aa286..f57e481017 100644 --- a/docs/startup-runtime.md +++ b/docs/startup-runtime.md @@ -731,7 +731,7 @@ ctest --preset dev --no-tests=error -R '^startup_trap_header(_prefix_control|_pr | `X2W_XMEM_GPU_MIRROR=1` | pairs a no-access graphics reservation with the read-write reservation of the same size made just before it, and maps every physical page into both (same section) | | `X2W_D3D12_PERMISSIVE=1` | wraps the device: recording command lists, console present, view tracking | | `X2W_D3D12_RENDER=1` | draws through translated pipelines from `X2W_SHADER_CACHE` and forwards [single-record indirect Dispatch](experiments.md#gpu-written-indirect-dispatch-arguments), [DrawIndexed](experiments.md#gpu-written-indirect-indexed-draw-arguments), [Draw](experiments.md#gpu-written-indirect-draw-arguments), and [DispatchMesh](experiments.md#gpu-written-indirect-mesh-dispatch-arguments) for supported desktop pipelines and tracked placed buffers | -| `X2W_SHADER_CACHE=` | translation cache: the runtime writes source requests `req_.{a,b,root}` and, when needed, RTV variants `req_.rtv`. Run `tools/startup/gfx2hlsl.py --pending ` while the process is running. Active draws poll for an absent manifest at most once per second per pipeline and use the published translation on a subsequent draw. The translator compiles `.vs.cso` and `.ps.cso` with `fxc.exe`: `X2W_FXC`, else the Windows SDK 10.0.26100.0 copy, else the newest `Windows Kits\10\bin\\x64`, else `PATH`. When none exists it writes `.fail` naming `X2W_FXC` without publishing a new manifest. `X2W_FXC=` (empty) publishes the manifest alone. Rerun `--pending` with compilation enabled to fill in missing bytecode for an existing manifest. | +| `X2W_SHADER_CACHE=` | translation cache: the runtime writes source requests `req_.{a,b,root}` and, when needed, RTV variants `req_.rtv`. A console pipeline that an `ExecuteIndirect` draw (list slot 61) refuses writes the same request as a direct draw, once per pipeline, and draws nothing (`startup_indirect_requests_warp`). Run `tools/startup/gfx2hlsl.py --pending ` while the process is running. Active draws poll for an absent manifest at most once per second per pipeline and use the published translation on a subsequent draw. The translator compiles `.vs.cso` and `.ps.cso` with `fxc.exe`: `X2W_FXC`, else the Windows SDK 10.0.26100.0 copy, else the newest `Windows Kits\10\bin\\x64`, else `PATH`. When none exists it writes `.fail` naming `X2W_FXC` without publishing a new manifest. `X2W_FXC=` (empty) publishes the manifest alone. Rerun `--pending` with compilation enabled to fill in missing bytecode for an existing manifest. | | `X2W_DRAW_NULL_IDENTITY=1` | null descriptors read as identity values instead of zero | | `X2W_PRESENT_SIGNATURE_EVERY=` | in render mode, samples a coarse signature of the presented picture every `n` presents from the start, without a script request (`0` off). Unset, sampling starts, every 4 presents, only once a script with a `wait` asks for it: see [Waiting for the presented picture](#waiting-for-the-presented-picture) | | `X2W_D3D12_DUMP_SURFACE=` | writes the last presented surface | diff --git a/src/startup_stubs/d3d12_draw.inl b/src/startup_stubs/d3d12_draw.inl index f12dd8038b..21367bc522 100644 --- a/src/startup_stubs/d3d12_draw.inl +++ b/src/startup_stubs/d3d12_draw.inl @@ -412,6 +412,14 @@ BoundPipeline* translation_for(Wrapper* pipeline) return bound; } +// The request translation_for writes on a direct draw, for a pipeline that slot 61 refuses. +void request_translation(Wrapper* pipeline) +{ + AcquireSRWLockExclusive(&draw_lock); + translation_for(pipeline); + ReleaseSRWLockExclusive(&draw_lock); +} + bool needs_rtv_variant(DXGI_FORMAT format) { switch (format) { diff --git a/src/startup_stubs/d3d12_xs_device.cpp b/src/startup_stubs/d3d12_xs_device.cpp index 105d7b93f1..338ad3d1af 100644 --- a/src/startup_stubs/d3d12_xs_device.cpp +++ b/src/startup_stubs/d3d12_xs_device.cpp @@ -162,6 +162,7 @@ constexpr std::uint64_t view_heap_probe_floor = 65536; void log(const char* format, ...); bool first_calls(LONG& counter, LONG limit); +void request_translation(Wrapper* pipeline); std::uint64_t accepted_view_heap_descriptors(ID3D12Device* device, UINT node_mask); std::uint64_t desktop_cpu_handle(std::uint64_t handle, UINT* contiguous = nullptr, UINT* available = nullptr) @@ -2013,8 +2014,11 @@ void __stdcall list_execute_indirect(Wrapper* self, void* signature, UINT count, else if (mesh) bytes = sizeof(D3D12_DISPATCH_MESH_ARGUMENTS); else bytes = sizeof(D3D12_DRAW_ARGUMENTS); if (type != D3D12_COMMAND_LIST_TYPE_DIRECT || !pass.indirect_graphics.root || - pass.indirect_graphics.root != pass.graphics_root || pass.indirect_graphics.mesh != mesh) + pass.indirect_graphics.root != pass.graphics_root || pass.indirect_graphics.mesh != mesh) { + // A console pipeline used only here still gets the request a direct draw writes; nothing is drawn. + if (pass.pipeline && !pass.pipeline_real) request_translation(pass.pipeline); return refuse("indirect graphics requires a direct list with a matching desktop pipeline and root"); + } if (!pass.targets_bound || pass.target_count != 1 || !pass.target0 || pass.target_formats[0] != pass.indirect_graphics.target_format || pass.dsv_format != DXGI_FORMAT_UNKNOWN || !pass.viewport_set || !pass.scissor_set) diff --git a/tests/startup_indirect_requests_check.py b/tests/startup_indirect_requests_check.py new file mode 100644 index 0000000000..a5507be2dd --- /dev/null +++ b/tests/startup_indirect_requests_check.py @@ -0,0 +1,70 @@ +"""A console pipeline used only through ExecuteIndirect (list slot 61) still writes its translation request. + +usage: startup_indirect_requests_check.py + +The consumer builds the stream pipeline (slot 86, with an input layout so its request key differs), then a +device slot 57 pipeline from the same shaders and root. "slot57-indirect" binds it and records one +ExecuteIndirect draw, which the stand-in refuses (no desktop pipeline); the request must still appear with the +slot-57 shaders and root, once. "slot57-bound" binds it and records nothing: the negative control, which must +leave only the stream pipeline's request. +""" +import os +from pathlib import Path +import subprocess +import sys +import tempfile + +from startup_stream_draw_check import pixel, vertex + + +def requests(consumer, backend, directory, mode, runs=1): + cache = directory / mode + cache.mkdir() + vs, ps, root = (directory / name for name in ("vs", "ps", "root")) + vs.write_bytes(vertex()) + ps.write_bytes(pixel(False)) + env = dict(os.environ, X2W_D3D12_PERMISSIVE="1", X2W_D3D12_LIST_NOOP="1", X2W_D3D12_RENDER="1", + X2W_SHADER_CACHE=str(cache), X2W_TEST_INPUT_LAYOUT="1") + env.setdefault("X2W_D3D12_DEBUG", "0") + for _ in range(runs): + result = subprocess.run([consumer, vs, ps, root, backend, directory / "unused", mode], env=env, + capture_output=True, text=True) + if backend == "hardware" and result.returncode == 77: + print("No D3D12 feature-level 12 hardware adapter") + sys.exit(77) + if result.returncode: + raise RuntimeError(f"{mode}: consumer failed on {backend}: {result.returncode}\n{result.stderr[-2000:]}") + found = {} + for marker in sorted(cache.glob("req_*.a")): + key = marker.name[4:-2] + found[key] = {ext: (cache / f"req_{key}{ext}").read_bytes() if (cache / f"req_{key}{ext}").exists() else None + for ext in (".a", ".b", ".root", ".ia")} + return found, vs.read_bytes(), ps.read_bytes(), root.read_bytes() + + +def check(consumer, backend): + with tempfile.TemporaryDirectory() as temp: + bound, *_ = requests(consumer, backend, Path(temp), "slot57-bound") + assert len(bound) == 1, f"control: {len(bound)} requests, expected only the stream pipeline's" + stream_key, stream = next(iter(bound.items())) + assert stream[".ia"] is not None, "control: the stream request has no input layout" + + with tempfile.TemporaryDirectory() as temp: + # Two runs into one cache: the request is written once, the second run finds it. + found, vs, ps, root = requests(consumer, backend, Path(temp), "slot57-indirect", runs=2) + assert stream_key in found, "the stream pipeline's request is missing" + extra = {key: files for key, files in found.items() if key != stream_key} + assert len(extra) == 1, f"{len(extra)} indirect-only requests, expected 1" + files = next(iter(extra.values())) + # Device slot 57 records the vertex program as a and the pixel program as b. + assert files[".a"] == vs and files[".b"] == ps and files[".root"] == root and files[".ia"] is None, \ + "the indirect-only request does not carry the slot-57 shaders and root" + leftovers = list(Path(temp).rglob("*.tmp")) + assert not leftovers, f"temporary request files left: {leftovers}" + print(f"startup_indirect_requests: PASS on {backend} (control: 1 request; indirect-only: 1 more request, " + f"slot-57 shaders and root, written once over 2 runs)") + return 0 + + +if __name__ == "__main__": + sys.exit(check(*sys.argv[1:])) diff --git a/tests/startup_stream_consumer.cpp b/tests/startup_stream_consumer.cpp index b59ea97951..feb784b8fc 100644 --- a/tests/startup_stream_consumer.cpp +++ b/tests/startup_stream_consumer.cpp @@ -88,6 +88,36 @@ static bool create_slot57(void* device, const char* vs_path, const char* ps_path pipeline; } +// Binds the pipeline on a guest list and, unless bind_only, records one ExecuteIndirect draw +// (list slot 61). A console pipeline has no desktop pipeline, so the call is refused and nothing is drawn. +static bool bind_and_execute_indirect(void* device, void* pipeline, bool bind_only) +{ + auto* guest = static_cast(device); + D3D12_INDIRECT_ARGUMENT_DESC argument{}; + argument.Type = D3D12_INDIRECT_ARGUMENT_TYPE_DRAW; + const D3D12_COMMAND_SIGNATURE_DESC signature_desc{sizeof(D3D12_DRAW_ARGUMENTS), 1, &argument, 0}; + ComPtr signature; + ComPtr allocator; + if (FAILED(guest->CreateCommandSignature(&signature_desc, nullptr, IID_PPV_ARGS(&signature))) || + FAILED(guest->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&allocator)))) return false; + const auto slots = [](void* object) { return *static_cast(object); }; + using CreateList = HRESULT (WINAPI*)(void*, const void*, void*, void*, REFIID, void**); + const UINT list_desc[]{D3D12_COMMAND_LIST_TYPE_DIRECT, 2, 1, 0}; + void* list = nullptr; + if (FAILED(reinterpret_cast(slots(device)[73])(device, list_desc, allocator.Get(), nullptr, + __uuidof(ID3D12GraphicsCommandList), &list)) || !list) return false; + using Reset = HRESULT (WINAPI*)(void*, void*, void*, void*); + using Bind = void (WINAPI*)(void*, void*); + using Execute = void (WINAPI*)(void*, void*, UINT, void*, UINT64, void*, UINT64); + using Close = HRESULT (WINAPI*)(void*); + if (FAILED(reinterpret_cast(slots(list)[139])(list, allocator.Get(), nullptr, nullptr))) return false; + reinterpret_cast(slots(list)[25])(list, pipeline); + if (!bind_only) reinterpret_cast(slots(list)[61])(list, signature.Get(), 1, nullptr, 0, nullptr, 0); + const bool closed = SUCCEEDED(reinterpret_cast(slots(list)[9])(list)); + static_cast(list)->Release(); + return closed; +} + int main(int argc, char** argv) { if (argc != 4 && (argc < 6 || argc > 8) && argc != 10) return 2; @@ -112,6 +142,11 @@ int main(int argc, char** argv) DXGI_FORMAT format = DXGI_FORMAT_R8G8B8A8_UNORM; UINT export_word = 0; bool two_targets = false; + if (argc == 7 && (std::strcmp(argv[6], "slot57-indirect") == 0 || std::strcmp(argv[6], "slot57-bound") == 0)) { + // The slot-57 pipeline is used only through slot 61; "slot57-bound" binds it and records nothing (control). + if (!create_slot57(device, argv[1], argv[2], argv[3], "", pso)) return 10; + return bind_and_execute_indirect(device, pso, std::strcmp(argv[6], "slot57-bound") == 0) ? 0 : 11; + } if (argc == 8 && std::strncmp(argv[6], "slot57", 6) == 0) { // The same shaders and root through device slot 57, with the given words in state block A. // "slot57-mrt" binds a second RGBA8 target. From aa1392a3c1b88e6ea7c8bdd53b57fa4295d20471 Mon Sep 17 00:00:00 2001 From: NiiRoZz Date: Wed, 25 Nov 2026 03:57:17 +0100 Subject: [PATCH 2/4] startup: remember the requested pipeline per recording; count ExecuteIndirect requests apart; test the boundaries A recording now remembers the last pipeline slot 61 asked a translation for, so repeated refused calls skip draw_lock. The request is limited to pipelines without a desktop pipeline (own().real), not !pipeline_real, which also held for desktop pipelines usable by slot 61. Each lookup is logged (first 16), and the render totals end with 'pipelines requested by ExecuteIndirect N': only direct draws poll for a manifest, so these are shown apart. The fixture now checks three calls make one lookup, a Dispatch call with the console pipeline bound makes none, and a desktop pipeline makes none. Co-Authored-By: Claude Fable 5.2 --- CMakeLists.txt | 2 +- src/startup_stubs/d3d12_draw.inl | 10 +++- src/startup_stubs/d3d12_xs_device.cpp | 13 +++-- tests/startup_indirect_requests_check.py | 68 ++++++++++++++++-------- tests/startup_stream_consumer.cpp | 55 +++++++++++++++---- 5 files changed, 111 insertions(+), 37 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ef17c383d..b9df64dacd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -874,7 +874,7 @@ target_compile_features(startup_stream_setup_obj PRIVATE cxx_std_17) add_executable(startup_stream_consumer tests/startup_stream_consumer.cpp $ tests/startup_stream_draw.cpp tests/startup_address_srv.cpp tests/startup_root_cbv.cpp tests/startup_root_heap.cpp) target_compile_features(startup_stream_consumer PRIVATE cxx_std_17) -target_link_libraries(startup_stream_consumer PRIVATE d3d12_xs_shim startup_stub_xg_xs d3d12 dxgi) +target_link_libraries(startup_stream_consumer PRIVATE d3d12_xs_shim startup_stub_xg_xs d3d12 dxgi d3dcompiler) target_sources(startup_stream_consumer PRIVATE tests/startup_frame_copy.cpp) target_sources(startup_stream_consumer PRIVATE tests/startup_root_reset.cpp) diff --git a/src/startup_stubs/d3d12_draw.inl b/src/startup_stubs/d3d12_draw.inl index be1c43b42f..cbbf73f009 100644 --- a/src/startup_stubs/d3d12_draw.inl +++ b/src/startup_stubs/d3d12_draw.inl @@ -412,12 +412,20 @@ BoundPipeline* translation_for(Wrapper* pipeline) return bound; } -// The request translation_for writes on a direct draw, for a pipeline that slot 61 refuses. +// The request translation_for writes on a direct draw, for a pipeline that slot 61 refuses. Only direct draws poll +// for the manifest afterwards, so these pipelines are also counted apart in the render totals. +LONG indirect_requested; void request_translation(Wrapper* pipeline) { AcquireSRWLockExclusive(&draw_lock); + const bool known = translation_by_pipeline().count(pipeline) != 0; translation_for(pipeline); ReleaseSRWLockExclusive(&draw_lock); + if (!known) InterlockedIncrement(&indirect_requested); + static LONG lookups; + if (first_calls(lookups, 16)) + log("x2w-render ExecuteIndirect requests the translation of pipeline %p (%s)", static_cast(pipeline), + known ? "already known" : "new"); } bool needs_rtv_variant(DXGI_FORMAT format) diff --git a/src/startup_stubs/d3d12_xs_device.cpp b/src/startup_stubs/d3d12_xs_device.cpp index ba26f9a500..abae6d5a0c 100644 --- a/src/startup_stubs/d3d12_xs_device.cpp +++ b/src/startup_stubs/d3d12_xs_device.cpp @@ -1875,6 +1875,7 @@ struct Pass { std::vector> states; // resources this list moved out of COMMON // What the title bound, kept for draws through translated pipelines: Wrapper* pipeline = nullptr; + Wrapper* requested_pipeline = nullptr; // last pipeline slot 61 asked a translation for; repeats skip draw_lock UINT topology = 0; x2w_startup::ViewTable view_tables[16]{}; u64 source_view_heap = 0; @@ -2145,8 +2146,12 @@ void __stdcall list_execute_indirect(Wrapper* self, void* signature, UINT count, else bytes = sizeof(D3D12_DRAW_ARGUMENTS); if (type != D3D12_COMMAND_LIST_TYPE_DIRECT || !pass.indirect_graphics.root || pass.indirect_graphics.root != pass.graphics_root || pass.indirect_graphics.mesh != mesh) { - // A console pipeline used only here still gets the request a direct draw writes; nothing is drawn. - if (pass.pipeline && !pass.pipeline_real) request_translation(pass.pipeline); + // A console pipeline (no desktop pipeline) used only here still gets the request a direct draw writes; + // nothing is drawn. + if (pass.pipeline && !pass.pipeline->own().real && pass.requested_pipeline != pass.pipeline) { + pass.requested_pipeline = pass.pipeline; + request_translation(pass.pipeline); + } return refuse("indirect graphics requires a direct list with a matching desktop pipeline and root"); } if (!pass.targets_bound || pass.target_count != 1 || !pass.target0 || @@ -3771,7 +3776,7 @@ HRESULT __stdcall queue_present(Wrapper* self, UINT planes, const void* plane_pa log("x2w-render totals: resets %ld (failed %ld), closes %ld, clears %ld, target binds %ld (unresolved %ld), executes %ld, draws %ld (skipped %ld), " "translated draws %ld (not drawn %ld), pipelines translated %ld / missing %ld, null bindings %ld (entry %ld, buffer %ld, token %ld, wrapper %ld, dimension %ld), " "textures uploaded %ld (%ld KiB, unreadable %ld), heap-indexed roots deferred %ld (real draws refused: view heap %ld, " - "sampler heap %ld, both heaps %ld, state %ld)", render_resets, + "sampler heap %ld, both heaps %ld, state %ld), pipelines requested by ExecuteIndirect %ld", render_resets, render_reset_failures, render_closes, render_clears, render_target_binds, render_target_unresolved, render_executes, render_draws, render_draws_skipped, translated_draws, untranslated_draws, translation_ready, translation_missing, null_total, null_causes[0], null_causes[1], null_causes[2], null_causes[3], null_causes[4], textures_uploaded, @@ -3779,7 +3784,7 @@ HRESULT __stdcall queue_present(Wrapper* self, UINT planes, const void* plane_pa heap_root_refusals[static_cast(x2w_startup::RealRootDecision::view_heap_missing)], heap_root_refusals[static_cast(x2w_startup::RealRootDecision::sampler_heap_missing)], heap_root_refusals[static_cast(x2w_startup::RealRootDecision::both_heaps_missing)], - heap_root_refusals[static_cast(x2w_startup::RealRootDecision::state_not_restorable)]); + heap_root_refusals[static_cast(x2w_startup::RealRootDecision::state_not_restorable)], indirect_requested); if (render_mode() && frame % 300 == 0) { // Which command-list slots the title called in the last 300 frames, per frame. char line[2048]; diff --git a/tests/startup_indirect_requests_check.py b/tests/startup_indirect_requests_check.py index a5507be2dd..ef3ad1890e 100644 --- a/tests/startup_indirect_requests_check.py +++ b/tests/startup_indirect_requests_check.py @@ -2,11 +2,16 @@ usage: startup_indirect_requests_check.py -The consumer builds the stream pipeline (slot 86, with an input layout so its request key differs), then a -device slot 57 pipeline from the same shaders and root. "slot57-indirect" binds it and records one -ExecuteIndirect draw, which the stand-in refuses (no desktop pipeline); the request must still appear with the -slot-57 shaders and root, once. "slot57-bound" binds it and records nothing: the negative control, which must -leave only the stream pipeline's request. +The consumer builds the stream pipeline (slot 86, with an input layout so its request key differs), then the +pipeline under test, binds it on a guest list and records refused slot-61 calls (no root or target is bound): + + slot57-draw a device slot 57 pipeline from the same shaders and root, three Draw calls: one request with + the slot-57 shaders and root, from one lookup (the pass remembers the pipeline it asked for) + slot57-bound the same pipeline bound with no call: no request (negative control) + slot57-dispatch the same pipeline with one Dispatch call (a compute-state refusal): no request + desktop-draw a slot-86 pipeline with desktop shaders and one Draw call: no lookup + +Every slot-61 lookup logs "x2w-render ExecuteIndirect requests the translation of pipeline" (first 16). """ import os from pathlib import Path @@ -16,8 +21,10 @@ from startup_stream_draw_check import pixel, vertex +LOOKUP = "x2w-render ExecuteIndirect requests the translation of pipeline" -def requests(consumer, backend, directory, mode, runs=1): + +def run(consumer, backend, directory, mode, runs=1): cache = directory / mode cache.mkdir() vs, ps, root = (directory / name for name in ("vs", "ps", "root")) @@ -26,43 +33,62 @@ def requests(consumer, backend, directory, mode, runs=1): env = dict(os.environ, X2W_D3D12_PERMISSIVE="1", X2W_D3D12_LIST_NOOP="1", X2W_D3D12_RENDER="1", X2W_SHADER_CACHE=str(cache), X2W_TEST_INPUT_LAYOUT="1") env.setdefault("X2W_D3D12_DEBUG", "0") + logs = [] for _ in range(runs): - result = subprocess.run([consumer, vs, ps, root, backend, directory / "unused", mode], env=env, + result = subprocess.run([consumer, vs, ps, root, backend, directory / "unused", f"indirect-{mode}"], env=env, capture_output=True, text=True) if backend == "hardware" and result.returncode == 77: print("No D3D12 feature-level 12 hardware adapter") sys.exit(77) if result.returncode: raise RuntimeError(f"{mode}: consumer failed on {backend}: {result.returncode}\n{result.stderr[-2000:]}") + logs.append(result.stderr) found = {} for marker in sorted(cache.glob("req_*.a")): key = marker.name[4:-2] found[key] = {ext: (cache / f"req_{key}{ext}").read_bytes() if (cache / f"req_{key}{ext}").exists() else None for ext in (".a", ".b", ".root", ".ia")} - return found, vs.read_bytes(), ps.read_bytes(), root.read_bytes() + leftovers = list(cache.glob("*.tmp")) + assert not leftovers, f"{mode}: temporary request files left: {leftovers}" + return found, logs, vs.read_bytes(), ps.read_bytes(), root.read_bytes() + + +def lookups(log): + return [line for line in log.splitlines() if LOOKUP in line] def check(consumer, backend): with tempfile.TemporaryDirectory() as temp: - bound, *_ = requests(consumer, backend, Path(temp), "slot57-bound") - assert len(bound) == 1, f"control: {len(bound)} requests, expected only the stream pipeline's" + temp = Path(temp) + bound, logs, *_ = run(consumer, backend, temp, "slot57-bound") + assert len(bound) == 1, f"slot57-bound: {len(bound)} requests, expected only the stream pipeline's" stream_key, stream = next(iter(bound.items())) - assert stream[".ia"] is not None, "control: the stream request has no input layout" + assert stream[".ia"] is not None, "slot57-bound: the stream request has no input layout" + assert not lookups(logs[0]), "slot57-bound: a lookup without a slot-61 call" - with tempfile.TemporaryDirectory() as temp: - # Two runs into one cache: the request is written once, the second run finds it. - found, vs, ps, root = requests(consumer, backend, Path(temp), "slot57-indirect", runs=2) - assert stream_key in found, "the stream pipeline's request is missing" + dispatch, logs, *_ = run(consumer, backend, temp, "slot57-dispatch") + assert set(dispatch) == {stream_key}, f"slot57-dispatch: {len(dispatch) - 1} extra requests, expected 0" + assert not lookups(logs[0]), "slot57-dispatch: a compute-state refusal looked the pipeline up" + + _, logs, *_ = run(consumer, backend, temp, "desktop-draw") + assert "stream pipeline -> REAL desktop pipeline" in logs[0], "desktop-draw: no desktop pipeline was built" + assert not lookups(logs[0]), "desktop-draw: a desktop pipeline was looked up" + + # Two processes into one cache: the request is written once, the second process finds it. + found, logs, vs, ps, root = run(consumer, backend, temp, "slot57-draw", runs=2) + assert stream_key in found, "slot57-draw: the stream pipeline's request is missing" extra = {key: files for key, files in found.items() if key != stream_key} - assert len(extra) == 1, f"{len(extra)} indirect-only requests, expected 1" + assert len(extra) == 1, f"slot57-draw: {len(extra)} indirect-only requests, expected 1" files = next(iter(extra.values())) # Device slot 57 records the vertex program as a and the pixel program as b. assert files[".a"] == vs and files[".b"] == ps and files[".root"] == root and files[".ia"] is None, \ - "the indirect-only request does not carry the slot-57 shaders and root" - leftovers = list(Path(temp).rglob("*.tmp")) - assert not leftovers, f"temporary request files left: {leftovers}" - print(f"startup_indirect_requests: PASS on {backend} (control: 1 request; indirect-only: 1 more request, " - f"slot-57 shaders and root, written once over 2 runs)") + "slot57-draw: the request does not carry the slot-57 shaders and root" + for index, log in enumerate(logs): + seen = lookups(log) + assert len(seen) == 1, f"slot57-draw run {index + 1}: {len(seen)} lookups for 3 calls, expected 1" + assert seen[0].endswith("(new)"), f"slot57-draw run {index + 1}: {seen[0]}" + print(f"startup_indirect_requests: PASS on {backend} (slot57-draw: 1 request, 1 lookup for 3 calls, written " + f"once over 2 processes; slot57-bound, slot57-dispatch: no request; desktop-draw: no lookup)") return 0 diff --git a/tests/startup_stream_consumer.cpp b/tests/startup_stream_consumer.cpp index feb784b8fc..580f866ce7 100644 --- a/tests/startup_stream_consumer.cpp +++ b/tests/startup_stream_consumer.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -88,14 +89,15 @@ static bool create_slot57(void* device, const char* vs_path, const char* ps_path pipeline; } -// Binds the pipeline on a guest list and, unless bind_only, records one ExecuteIndirect draw -// (list slot 61). A console pipeline has no desktop pipeline, so the call is refused and nothing is drawn. -static bool bind_and_execute_indirect(void* device, void* pipeline, bool bind_only) +// Binds the pipeline on a guest list and records `calls` ExecuteIndirect calls (list slot 61) with a Draw or a +// Dispatch signature. No root or target is bound, so every call is refused and nothing is drawn. +static bool bind_and_execute_indirect(void* device, void* pipeline, bool dispatch, int calls) { auto* guest = static_cast(device); D3D12_INDIRECT_ARGUMENT_DESC argument{}; - argument.Type = D3D12_INDIRECT_ARGUMENT_TYPE_DRAW; - const D3D12_COMMAND_SIGNATURE_DESC signature_desc{sizeof(D3D12_DRAW_ARGUMENTS), 1, &argument, 0}; + argument.Type = dispatch ? D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH : D3D12_INDIRECT_ARGUMENT_TYPE_DRAW; + const D3D12_COMMAND_SIGNATURE_DESC signature_desc{ + dispatch ? UINT{sizeof(D3D12_DISPATCH_ARGUMENTS)} : UINT{sizeof(D3D12_DRAW_ARGUMENTS)}, 1, &argument, 0}; ComPtr signature; ComPtr allocator; if (FAILED(guest->CreateCommandSignature(&signature_desc, nullptr, IID_PPV_ARGS(&signature))) || @@ -112,12 +114,38 @@ static bool bind_and_execute_indirect(void* device, void* pipeline, bool bind_on using Close = HRESULT (WINAPI*)(void*); if (FAILED(reinterpret_cast(slots(list)[139])(list, allocator.Get(), nullptr, nullptr))) return false; reinterpret_cast(slots(list)[25])(list, pipeline); - if (!bind_only) reinterpret_cast(slots(list)[61])(list, signature.Get(), 1, nullptr, 0, nullptr, 0); + for (int i = 0; i < calls; ++i) reinterpret_cast(slots(list)[61])(list, signature.Get(), 1, nullptr, 0, nullptr, 0); const bool closed = SUCCEEDED(reinterpret_cast(slots(list)[9])(list)); static_cast(list)->Release(); return closed; } +// A slot-86 pipeline with desktop shaders that use no resources, over the stream root: a desktop pipeline. +static void* desktop_pipeline(void* device) +{ + static const char vs_text[] = "float4 main(uint id : SV_VertexID) : SV_Position { return float4(0, 0, 0, 1); }"; + static const char ps_text[] = "float4 main() : SV_Target { return float4(1, 0, 0, 1); }"; + ComPtr vs, ps; + if (FAILED(D3DCompile(vs_text, sizeof(vs_text) - 1, nullptr, nullptr, nullptr, "main", "vs_5_0", 0, 0, &vs, nullptr)) || + FAILED(D3DCompile(ps_text, sizeof(ps_text) - 1, nullptr, nullptr, nullptr, "main", "ps_5_0", 0, 0, &ps, nullptr))) + return nullptr; + struct alignas(void*) Root { D3D12_PIPELINE_STATE_SUBOBJECT_TYPE type; void* value; }; + struct alignas(void*) Code { D3D12_PIPELINE_STATE_SUBOBJECT_TYPE type; D3D12_SHADER_BYTECODE value; }; + struct alignas(void*) Formats { D3D12_PIPELINE_STATE_SUBOBJECT_TYPE type; D3D12_RT_FORMAT_ARRAY value; }; + struct alignas(void*) Topology { D3D12_PIPELINE_STATE_SUBOBJECT_TYPE type; D3D12_PRIMITIVE_TOPOLOGY_TYPE value; }; + struct { Root root; Code vs, ps; Formats targets; Topology topology; } stream{ + {D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_ROOT_SIGNATURE, stream_root_signature()}, + {D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_VS, {vs->GetBufferPointer(), vs->GetBufferSize()}}, + {D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PS, {ps->GetBufferPointer(), ps->GetBufferSize()}}, + {D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_RENDER_TARGET_FORMATS, {{DXGI_FORMAT_R8G8B8A8_UNORM}, 1}}, + {D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_PRIMITIVE_TOPOLOGY, D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE}}; + const D3D12_PIPELINE_STATE_STREAM_DESC desc{sizeof(stream), &stream}; + using Create = HRESULT (WINAPI*)(void*, const D3D12_PIPELINE_STATE_STREAM_DESC*, REFIID, void**); + void* pipeline = nullptr; + return SUCCEEDED(reinterpret_cast((*static_cast(device))[86])(device, &desc, __uuidof(ID3D12PipelineState), + &pipeline)) ? pipeline : nullptr; +} + int main(int argc, char** argv) { if (argc != 4 && (argc < 6 || argc > 8) && argc != 10) return 2; @@ -142,10 +170,17 @@ int main(int argc, char** argv) DXGI_FORMAT format = DXGI_FORMAT_R8G8B8A8_UNORM; UINT export_word = 0; bool two_targets = false; - if (argc == 7 && (std::strcmp(argv[6], "slot57-indirect") == 0 || std::strcmp(argv[6], "slot57-bound") == 0)) { - // The slot-57 pipeline is used only through slot 61; "slot57-bound" binds it and records nothing (control). - if (!create_slot57(device, argv[1], argv[2], argv[3], "", pso)) return 10; - return bind_and_execute_indirect(device, pso, std::strcmp(argv[6], "slot57-bound") == 0) ? 0 : 11; + if (argc == 7 && std::strncmp(argv[6], "indirect-", 9) == 0) { + // A pipeline used only through slot 61. slot57-draw: three refused Draw calls; slot57-bound: bound, no call; + // slot57-dispatch: one refused Dispatch call; desktop-draw: a desktop pipeline and one refused Draw call. + const std::string mode(argv[6] + 9); + if (mode == "desktop-draw") pso = desktop_pipeline(device); + else if (mode == "slot57-draw" || mode == "slot57-bound" || mode == "slot57-dispatch") { + if (!create_slot57(device, argv[1], argv[2], argv[3], "", pso)) return 10; + } else return 2; + if (!pso) return 10; + const int calls = mode == "slot57-draw" ? 3 : mode == "slot57-bound" ? 0 : 1; + return bind_and_execute_indirect(device, pso, mode == "slot57-dispatch", calls) ? 0 : 11; } if (argc == 8 && std::strncmp(argv[6], "slot57", 6) == 0) { // The same shaders and root through device slot 57, with the given words in state block A. From 30212b8496a5613061741e23826d998c4283afbe Mon Sep 17 00:00:00 2001 From: NiiRoZz Date: Wed, 25 Nov 2026 03:59:48 +0100 Subject: [PATCH 3/4] docs: say slot-61 requests are not polled and how the totals line counts them Co-Authored-By: Claude Fable 5.2 --- docs/startup-runtime.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/startup-runtime.md b/docs/startup-runtime.md index eead66fb0f..e963499b31 100644 --- a/docs/startup-runtime.md +++ b/docs/startup-runtime.md @@ -837,7 +837,7 @@ ctest --preset dev --no-tests=error -R '^startup_trap_header(_prefix_control|_pr | `X2W_XMEM_GPU_MIRROR=1` | pairs a no-access graphics reservation with the read-write reservation of the same size made just before it, and maps every physical page into both (same section) | | `X2W_D3D12_PERMISSIVE=1` | wraps the device: recording command lists, console present, view tracking | | `X2W_D3D12_RENDER=1` | draws through translated pipelines from `X2W_SHADER_CACHE` and forwards [single-record indirect Dispatch](experiments.md#gpu-written-indirect-dispatch-arguments), [DrawIndexed](experiments.md#gpu-written-indirect-indexed-draw-arguments), [Draw](experiments.md#gpu-written-indirect-draw-arguments), and [DispatchMesh](experiments.md#gpu-written-indirect-mesh-dispatch-arguments) for supported desktop pipelines and tracked placed buffers | -| `X2W_SHADER_CACHE=` | translation cache: the runtime writes source requests `req_.{a,b,root}` and, when needed, RTV variants `req_.rtv`. A console pipeline that an `ExecuteIndirect` draw (list slot 61) refuses writes the same request as a direct draw, once per pipeline, and draws nothing (`startup_indirect_requests_warp`). Run `tools/startup/gfx2hlsl.py --pending ` while the process is running, or start the run with `run.ps1 -Translate` (see [Translating shaders during a run](#translating-shaders-during-a-run)). Active draws poll for an absent manifest at most once per second per pipeline and use the published translation on a subsequent draw. The translator compiles `.vs.cso` and `.ps.cso` with `fxc.exe`: `X2W_FXC`, else the Windows SDK 10.0.26100.0 copy, else the newest `Windows Kits\10\bin\\x64`, else `PATH`. When none exists it writes `.fail` naming `X2W_FXC` without publishing a new manifest. `X2W_FXC=` (empty) publishes the manifest alone. Rerun `--pending` with compilation enabled to fill in missing bytecode for an existing manifest. | +| `X2W_SHADER_CACHE=` | translation cache: the runtime writes source requests `req_.{a,b,root}` and, when needed, RTV variants `req_.rtv`. A console pipeline that an `ExecuteIndirect` draw (list slot 61) refuses writes the same request as a direct draw, once per pipeline, and draws nothing (`startup_indirect_requests_warp`). Only direct draws poll for its manifest, so such a pipeline stays in the `missing` count until a direct draw uses it; the `x2w-render totals` line ends with `pipelines requested by ExecuteIndirect N`. Run `tools/startup/gfx2hlsl.py --pending ` while the process is running, or start the run with `run.ps1 -Translate` (see [Translating shaders during a run](#translating-shaders-during-a-run)). Active draws poll for an absent manifest at most once per second per pipeline and use the published translation on a subsequent draw. The translator compiles `.vs.cso` and `.ps.cso` with `fxc.exe`: `X2W_FXC`, else the Windows SDK 10.0.26100.0 copy, else the newest `Windows Kits\10\bin\\x64`, else `PATH`. When none exists it writes `.fail` naming `X2W_FXC` without publishing a new manifest. `X2W_FXC=` (empty) publishes the manifest alone. Rerun `--pending` with compilation enabled to fill in missing bytecode for an existing manifest. | | `X2W_D3D12_QUERY_SLOTS=1` | diagnostic, in render mode: binds command-list slots 28 to 30 to the hypothesised occlusion query methods (see [Occlusion queries](#occlusion-queries)). Unset, the three slots stay no-ops | | `X2W_DRAW_NULL_IDENTITY=1` | null descriptors read as identity values instead of zero | | `X2W_PRESENT_SIGNATURE_EVERY=` | in render mode, samples a coarse signature of the presented picture every `n` presents from the start, without a script request (`0` off). Unset, sampling starts, every 4 presents, only once a script with a `wait` asks for it: see [Waiting for the presented picture](#waiting-for-the-presented-picture) | From 3efc640a0aa8b41e24ca5cb438a1fecfc8f17b4e Mon Sep 17 00:00:00 2001 From: Royoo <3230853833@qq.com> Date: Wed, 25 Nov 2026 11:37:39 +0800 Subject: [PATCH 4/4] Distinguish indirect pipeline lookups from complete shader requests --- docs/startup-runtime.md | 2 +- src/startup_stubs/d3d12_draw.inl | 8 ++++---- src/startup_stubs/d3d12_xs_device.cpp | 4 ++-- tests/startup_indirect_requests_check.py | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/startup-runtime.md b/docs/startup-runtime.md index 7c200cde7e..eed0e4052b 100644 --- a/docs/startup-runtime.md +++ b/docs/startup-runtime.md @@ -869,7 +869,7 @@ ctest --preset dev --no-tests=error -R '^startup_trap_header(_prefix_control|_pr | `X2W_XMEM_GPU_MIRROR=1` | pairs a no-access graphics reservation with the read-write reservation of the same size made just before it, and maps every physical page into both (same section) | | `X2W_D3D12_PERMISSIVE=1` | wraps the device: recording command lists, console present, view tracking | | `X2W_D3D12_RENDER=1` | draws through translated pipelines from `X2W_SHADER_CACHE` and forwards [single-record indirect Dispatch](experiments.md#gpu-written-indirect-dispatch-arguments), [DrawIndexed](experiments.md#gpu-written-indirect-indexed-draw-arguments), [Draw](experiments.md#gpu-written-indirect-draw-arguments), and [DispatchMesh](experiments.md#gpu-written-indirect-mesh-dispatch-arguments) for supported desktop pipelines and tracked placed buffers | -| `X2W_SHADER_CACHE=` | translation cache: the runtime writes source requests `req_.{a,b,root}` and, when needed, RTV variants `req_.rtv`. A console pipeline that an `ExecuteIndirect` draw (list slot 61) refuses writes the same request as a direct draw, once per pipeline, and draws nothing (`startup_indirect_requests_warp`). Only direct draws poll for its manifest, so such a pipeline stays in the `missing` count until a direct draw uses it; the `x2w-render totals` line ends with `pipelines requested by ExecuteIndirect N`. Run `tools/startup/gfx2hlsl.py --pending ` while the process is running, or start the run with `run.ps1 -Translate` (see [Translating shaders during a run](#translating-shaders-during-a-run)). Active draws poll for an absent manifest at most once per second per pipeline and use the published translation on a subsequent draw. The translator compiles `.vs.cso` and `.ps.cso` with `fxc.exe`: `X2W_FXC`, else the Windows SDK 10.0.26100.0 copy, else the newest `Windows Kits\10\bin\\x64`, else `PATH`. When none exists it writes `.fail` naming `X2W_FXC` without publishing a new manifest. `X2W_FXC=` (empty) publishes the manifest alone. Rerun `--pending` with compilation enabled to fill in missing bytecode for an existing manifest. | +| `X2W_SHADER_CACHE=` | translation cache: the runtime writes source requests `req_.{a,b,root}` and, when needed, RTV variants `req_.rtv`. A console pipeline that an `ExecuteIndirect` draw (list slot 61) refuses writes the same request as a direct draw, once per pipeline, and draws nothing (`startup_indirect_requests_warp`). Only direct draws poll for its manifest, so such a pipeline stays in the `missing` count until a direct draw uses it; the `x2w-render totals` line counts `pipelines first looked up by ExecuteIndirect N`. This is a per-process lookup count. Check for the ready marker `req_.a` to confirm a complete request is available. Run `tools/startup/gfx2hlsl.py --pending ` while the process is running, or start the run with `run.ps1 -Translate` (see [Translating shaders during a run](#translating-shaders-during-a-run)). Active draws poll for an absent manifest at most once per second per pipeline and use the published translation on a subsequent draw. The translator compiles `.vs.cso` and `.ps.cso` with `fxc.exe`: `X2W_FXC`, else the Windows SDK 10.0.26100.0 copy, else the newest `Windows Kits\10\bin\\x64`, else `PATH`. When none exists it writes `.fail` naming `X2W_FXC` without publishing a new manifest. `X2W_FXC=` (empty) publishes the manifest alone. Rerun `--pending` with compilation enabled to fill in missing bytecode for an existing manifest. | | `X2W_D3D12_QUERY_SLOTS=1` | diagnostic, in render mode: binds command-list slots 28 to 30 to the hypothesised occlusion query methods (see [Occlusion queries](#occlusion-queries)). Unset, the three slots stay no-ops | | `X2W_DRAW_NULL_IDENTITY=1` | null descriptors read as identity values instead of zero | | `X2W_PRESENT_SIGNATURE_EVERY=` | in render mode, samples a coarse signature of the presented picture every `n` presents from the start, without a script request (`0` off). Unset, sampling starts, every 4 presents, only once a script with a `wait` asks for it: see [Waiting for the presented picture](#waiting-for-the-presented-picture) | diff --git a/src/startup_stubs/d3d12_draw.inl b/src/startup_stubs/d3d12_draw.inl index cbbf73f009..2284509e2e 100644 --- a/src/startup_stubs/d3d12_draw.inl +++ b/src/startup_stubs/d3d12_draw.inl @@ -413,18 +413,18 @@ BoundPipeline* translation_for(Wrapper* pipeline) } // The request translation_for writes on a direct draw, for a pipeline that slot 61 refuses. Only direct draws poll -// for the manifest afterwards, so these pipelines are also counted apart in the render totals. -LONG indirect_requested; +// for the manifest afterwards. Count first lookups separately from published request files. +LONG indirect_first_lookups; void request_translation(Wrapper* pipeline) { AcquireSRWLockExclusive(&draw_lock); const bool known = translation_by_pipeline().count(pipeline) != 0; translation_for(pipeline); ReleaseSRWLockExclusive(&draw_lock); - if (!known) InterlockedIncrement(&indirect_requested); + if (!known) InterlockedIncrement(&indirect_first_lookups); static LONG lookups; if (first_calls(lookups, 16)) - log("x2w-render ExecuteIndirect requests the translation of pipeline %p (%s)", static_cast(pipeline), + log("x2w-render ExecuteIndirect looks up translation for pipeline %p (%s)", static_cast(pipeline), known ? "already known" : "new"); } diff --git a/src/startup_stubs/d3d12_xs_device.cpp b/src/startup_stubs/d3d12_xs_device.cpp index a77bd26121..7f9e592a51 100644 --- a/src/startup_stubs/d3d12_xs_device.cpp +++ b/src/startup_stubs/d3d12_xs_device.cpp @@ -3787,7 +3787,7 @@ HRESULT __stdcall queue_present(Wrapper* self, UINT planes, const void* plane_pa log("x2w-render totals: resets %ld (failed %ld), closes %ld, clears %ld, target binds %ld (unresolved %ld), executes %ld, draws %ld (skipped %ld), " "translated draws %ld (not drawn %ld), pipelines translated %ld / missing %ld, null bindings %ld (entry %ld, buffer %ld, token %ld, wrapper %ld, dimension %ld), " "textures uploaded %ld (%ld KiB, unreadable %ld), heap-indexed roots deferred %ld (real draws refused: view heap %ld, " - "sampler heap %ld, both heaps %ld, state %ld), pipelines requested by ExecuteIndirect %ld", render_resets, + "sampler heap %ld, both heaps %ld, state %ld), pipelines first looked up by ExecuteIndirect %ld", render_resets, render_reset_failures, render_closes, render_clears, render_target_binds, render_target_unresolved, render_executes, render_draws, render_draws_skipped, translated_draws, untranslated_draws, translation_ready, translation_missing, null_total, null_causes[0], null_causes[1], null_causes[2], null_causes[3], null_causes[4], textures_uploaded, @@ -3795,7 +3795,7 @@ HRESULT __stdcall queue_present(Wrapper* self, UINT planes, const void* plane_pa heap_root_refusals[static_cast(x2w_startup::RealRootDecision::view_heap_missing)], heap_root_refusals[static_cast(x2w_startup::RealRootDecision::sampler_heap_missing)], heap_root_refusals[static_cast(x2w_startup::RealRootDecision::both_heaps_missing)], - heap_root_refusals[static_cast(x2w_startup::RealRootDecision::state_not_restorable)], indirect_requested); + heap_root_refusals[static_cast(x2w_startup::RealRootDecision::state_not_restorable)], indirect_first_lookups); if (render_mode() && frame % 300 == 0) { // Slot-61 calls since the start, by outcome, then by signature kind (zero kinds left out). static const char* const outcomes[] = {"forwarded", "refused graphics-pipeline", "compute-pipeline", diff --git a/tests/startup_indirect_requests_check.py b/tests/startup_indirect_requests_check.py index ef3ad1890e..46f9a747e6 100644 --- a/tests/startup_indirect_requests_check.py +++ b/tests/startup_indirect_requests_check.py @@ -11,7 +11,7 @@ slot57-dispatch the same pipeline with one Dispatch call (a compute-state refusal): no request desktop-draw a slot-86 pipeline with desktop shaders and one Draw call: no lookup -Every slot-61 lookup logs "x2w-render ExecuteIndirect requests the translation of pipeline" (first 16). +Every slot-61 lookup logs "x2w-render ExecuteIndirect looks up translation for pipeline" (first 16). """ import os from pathlib import Path @@ -21,7 +21,7 @@ from startup_stream_draw_check import pixel, vertex -LOOKUP = "x2w-render ExecuteIndirect requests the translation of pipeline" +LOOKUP = "x2w-render ExecuteIndirect looks up translation for pipeline" def run(consumer, backend, directory, mode, runs=1):