Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/pipeline_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,29 @@ On Windows with an RTX 5090 (driver 621.14), a synthetic three-compute, one-vert
sample reported zero application-cache hits on its first run and five on the seeded run. On Mesa
llvmpipe the same five pipelines succeeded both times and neither run reported a hit.

### The cache and the runtime's device

The runtime seeds its `VkPipelineCache` from the cache this tool saves, so a pipeline hits there only when the
driver gives it the same cache key in both programs. Measured on Windows with an RX 9070 XT (driver
32.0.32029.2010) and one synthetic compute shader, reading the application-cache-hit bit:

- `robustBufferAccess`, `scalarBlockLayout` and `robustImageAccess` are each part of the key. The runtime's
device enables none of them, so the checker's does not either. Nothing else that differs between the two
devices changed the key on RX 9070 XT: the checker's other features, the runtime's extensions, the application name.
- On Windows 11 with an Intel RaptorLake-S iGPU, clearing those three features alone makes the checker's cache hit
on the runtime's device. On an NVIDIA GeForce RTX 5060 Laptop GPU (driver 621.24), NVIDIA also hashes
`VK_EXT_mesh_shader` (with `meshShaderQueries` enabled, matching the runtime since `#577`) and
`VK_KHR_maintenance8` into the pipeline cache key even for compute shaders, so the checker enables both whenever
supported and keeps `meshShaderQueries` on.
- The executable's file name is part of the key; its folder is not. A copy of the checker under another name
misses the cache the original wrote, and the runtime's device hits the checker's cache only from a program
with the checker's file name. So on this driver a cache written by `vk_pipeline_check.exe` does not hit in
`gta6rt.exe`, and one written by a copy of the checker named `gta6rt.exe` does.

The `pipeline_cache_seed` test embeds a synthetic minimal compute shader and runs a copy of the checker under the
test program's own file name, then creates the same pipeline on the runtime's device from the saved cache. It is
skipped where the driver reports no hit even for a cache the device wrote itself, as llvmpipe does.

## Wave64-emulated corpus (`--wave64-emulate`)

A GPU that only runs 32-wide subgroups (NVIDIA, Intel) needs the corpus translated with
Expand Down
11 changes: 11 additions & 0 deletions runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2219,6 +2219,17 @@ if(TARGET Vulkan::Headers)
set_tests_properties(d3d12_indirect_dispatch_count PROPERTIES SKIP_RETURN_CODE 77)
endif()

# The cache vk_pipeline_check saves has to hit on the runtime's device (docs/pipeline_check.md): the test
# compiles an embedded synthetic compute shader through a same-named copy of the checker, then creates the
# same pipeline on the runtime's device from the saved cache.
add_executable(pipeline_cache_seed_test test/pipeline_cache_seed_test.cpp)
add_dependencies(pipeline_cache_seed_test vk_pipeline_check)
target_link_libraries(pipeline_cache_seed_test PRIVATE gta6rt_d3d12_com)
target_compile_definitions(pipeline_cache_seed_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX)
target_compile_options(pipeline_cache_seed_test PRIVATE /W4 /permissive- /utf-8)
add_test(NAME pipeline_cache_seed COMMAND pipeline_cache_seed_test $<TARGET_FILE:vk_pipeline_check>)
set_tests_properties(pipeline_cache_seed PROPERTIES SKIP_RETURN_CODE 77)

# What Close returns after one recorded call, against WARP; today's differences are listed in the test.
add_executable(d3d12_close_parity_test test/d3d12_close_parity_test.cpp)
target_link_libraries(d3d12_close_parity_test PRIVATE gta6rt_d3d12_com d3d12 dxgi)
Expand Down
Loading
Loading