gfxstream_deqp_vk
Build, run, debug, and iterate on Linux deqp-vk Vulkan CTS tests over Gfxstream (guest vulkan.ranchu.so + host kumquat_virtio + Lavapipe) without an Android guest image. Use this skill whenever running dEQP-VK tests against Gfxstream, diagnosing Vulkan CTS failures, collecting guest/host/QPA logs, or making iterative fixes to Gfxstream guest (external/mesa3d), Gfxstream host (hardware/google/gfxstream), or dEQP (external/deqp). This skill assumes a certain checkout structure to locate gfxstream, mesa3d, and deqp folders relative to the workspace root.
작성자를 위한 경고
- "name" should use lowercase letters, digits and single hyphens only
Gfxstream Linux deqp-vk Fast-Iteration Skill
This skill enables fast edit-compile-test iterations for Vulkan CTS (deqp-vk) over Gfxstream on Linux via bazel test without booting an Android guest image.
Architecture & Key Paths
[deqp-vk (@deqp//:deqp-vk, Linux headless target)]
| (--deqp-vk-library-path=vulkan.ranchu.so)
v
[Guest Gfxstream ICD: vulkan.ranchu.so (@mesa//:mesa_gfxstream_guest_vulkan)] (VIRTGPU_KUMQUAT=1)
| (/tmp/kumquat-gpu-0 UNIX socket + shared memory blobs)
v
[Host Server: kumquat_virtio (@rutabaga//:rutabaga_gfx_kumquat_server)] (libgfxstream_backend)
| (VK_DRIVER_FILES=vk_lavapipe_icd.json or host driver)
v
[Host Vulkan Driver: Lavapipe / SwiftShader / Host GPU]
Expected Checkout Structure & Source Code Locations
<workspace_root>/
├── hardware/google/gfxstream/ # Gfxstream host, Bazel build files, & dEQP test wrapper
├── external/mesa3d/ # Optional local Gfxstream guest Vulkan driver checkout
└── external/deqp/ # Optional local dEQP / Vulkan CTS source checkout
- Gfxstream Repository (Host & Test Wrapper):
hardware/google/gfxstream- Host Vulkan Decoder:
host/vulkan/(VkDecoder.cpp,VkDecoderGlobalState.cpp,VkSubDecoder.cpp, etc.) - Host Vulkan Codegen:
codegen/scripts/andhost/vulkan/cereal/ - Bazel dEQP Test Macro & Wrapper:
tests/deqp/tooling/deqp.bzl(gfxstream_deqp_vk_test)tests/deqp/tooling/deqp_wrapper.shtests/deqp/tooling/deqp_qpa_to_test_xml.py&tests/deqp/tooling/deqp_qpa_to_test_xml_main.pytests/deqp/BUILD.bazel(//tests/deqp:deqp_vk_smoke_tests)
- dEQP Bazel Build Definitions:
third_party/deqp/,third_party/amber/,third_party/libpng/ - Mesa Bazel Build Definitions:
third_party/mesa/(mesa.MODULE.bazel,BUILD.mesa.bazel)
- Host Vulkan Decoder:
- Gfxstream Guest Vulkan ICD (
vulkan.ranchu.so):external/mesa3d/src/gfxstream- Guest Vulkan Driver & Encoder:
src/gfxstream/guest/vulkan/andsrc/gfxstream/guest/vulkan_enc/(ResourceTracker.cpp,VkEncoder.cpp,gfxstream_vk_device.cpp,gfxstream_vk_cmd.cpp, etc.) - Guest Codegen:
src/gfxstream/codegen/scripts/
- Guest Vulkan Driver & Encoder:
- dEQP / Vulkan CTS Source:
external/deqp- Vulkan CTS Modules:
external/vulkancts/modules/vulkan/ - Built-in Mustpass Caselists:
external/vulkancts/mustpass/main/vk-default/
- Vulkan CTS Modules:
Scope & Limitations (CRITICAL)
This harness runs on Linux host + Linux guest user-space (DEQP_SUPPORT_HEADLESS=1 over kumquat_virtio), without an Android OS framework (surfaceflinger, gralloc, libandroid).
Supported Test Suites
- Core Vulkan 1.0 / 1.1 / 1.2 / 1.3 API, pipeline, shader, SPIR-V, compute, memory, synchronization, descriptors, dynamic rendering, renderpass, image, texture, subgroups, robustness, YCbCr, and POSIX external memory/semaphore (
opaque_fd) tests:dEQP-VK.api.*(excluding Android-specific subtrees below)dEQP-VK.pipeline.*,dEQP-VK.binding_model.*,dEQP-VK.spirv_assembly.*,dEQP-VK.glsl.*dEQP-VK.memory.*,dEQP-VK.synchronization.*,dEQP-VK.Synchronization2.*dEQP-VK.compute.*,dEQP-VK.draw.*,dEQP-VK.renderpass*,dEQP-VK.dynamic_rendering.*dEQP-VK.image.*,dEQP-VK.texture.*,dEQP-VK.ycbcr.*,dEQP-VK.subgroups.*,dEQP-VK.robustness.*
Unsupported Test Suites (Require Android Guest Image)
Do NOT use this harness to validate Android-only extensions; they will report NotSupported or fail to find Android symbols:
- Android Hardware Buffers (AHB):
VK_ANDROID_external_memory_android_hardware_bufferdEQP-VK.api.external.memory.android_hardware_buffer.*
- Android Window System Integration (WSI):
VK_KHR_android_surface,ANativeWindow,VK_ANDROID_native_bufferdEQP-VK.wsi.android.*
- Android Native Sync FD / Gralloc:
- Android-specific fence/semaphore FDs requiring Android
libsyncorgrallocHALs.
- Android-specific fence/semaphore FDs requiring Android
Workflow Commands
Always run commands with Cwd set to <workspace_root>/hardware/google/gfxstream.
Bazel automatically fetches and builds @deqp//:deqp-vk, @deqp//:data, @mesa//:mesa_gfxstream_guest_vulkan, and @rutabaga//:rutabaga_gfx_kumquat_server.
1. Running Tests via bazel test
# Run default smoke tests (dEQP-VK.api.smoke.*) against host Vulkan driver:
bazel test //tests/deqp:deqp_vk_smoke_tests \
--test_output=streamed
# Run smoke tests against hermetic Lavapipe software Vulkan driver:
bazel test //tests/deqp:deqp_vk_smoke_tests \
--graphics_drivers=gles_angle_vulkan_lavapipe \
--test_output=streamed
# Run a single test or custom comma-separated wildcard pattern via --test_arg:
bazel test //tests/deqp:deqp_vk_smoke_tests \
--graphics_drivers=gles_angle_vulkan_lavapipe \
--test_output=streamed \
--test_arg=--deqp_cases="dEQP-VK.api.smoke.triangle"
# Pass custom Kumquat --renderer-features (e.g. VulkanValidation:print):
bazel test //tests/deqp:deqp_vk_smoke_tests \
--graphics_drivers=gles_angle_vulkan_lavapipe \
--test_output=streamed \
--test_arg=--renderer_features="VulkanValidation:print" \
--test_arg=--deqp_cases="dEQP-VK.api.smoke.triangle"
2. Defining Sharded Test Targets with gfxstream_deqp_vk_test
gfxstream_deqp_vk_test in tests/deqp/tooling/deqp.bzl supports native Bazel test sharding (shard_count / TEST_TOTAL_SHARDS / TEST_SHARD_INDEX):
gfxstream_deqp_vk_test(
name = "deqp_vk_smoke_tests",
deqp_cases = ["dEQP-VK.api.smoke.*"],
)
3. Iterating Against Local external/mesa3d or external/deqp Checkouts
By default, third_party/mesa/mesa.MODULE.bazel and third_party/deqp/deqp.MODULE.bazel pin @mesa and @deqp to hermetic upstream commits.
To build and test against local source modifications in <workspace_root>/external/mesa3d or <workspace_root>/external/deqp:
Local @mesa (<workspace_root>/external/mesa3d):
- Ensure the testing patch (
third_party/mesa/PATCH.0001_disable_vk_envvar_modification_for_testing.patch) is applied andBUILD.bazelis symlinked tothird_party/mesa/BUILD.mesa.bazel:ln -sf $(pwd)/third_party/mesa/BUILD.mesa.bazel ../../external/mesa3d/BUILD.bazel git -C ../../external/mesa3d apply --check $(pwd)/third_party/mesa/PATCH.0001_disable_vk_envvar_modification_for_testing.patch 2>/dev/null && \ git -C ../../external/mesa3d apply $(pwd)/third_party/mesa/PATCH.0001_disable_vk_envvar_modification_for_testing.patch || true - Pass
--override_repository=+git_repository+mesa=$(realpath ../../external/mesa3d)tobazel test:
(Remember to remove the temporarybazel test //tests/deqp:deqp_vk_smoke_tests \ --graphics_drivers=gles_angle_vulkan_lavapipe \ --override_repository=+git_repository+mesa=$(realpath ../../external/mesa3d) \ --test_output=streamed \ --test_arg=--deqp_cases="dEQP-VK.api.smoke.triangle"BUILD.bazelsymlink and revert the patch inexternal/mesa3dbefore committing changes there.)
Local @deqp (<workspace_root>/external/deqp):
- Symlink
third_party/deqp/BUILD.deqp.bazelto../../external/deqp/BUILD.bazel:ln -sf $(pwd)/third_party/deqp/BUILD.deqp.bazel ../../external/deqp/BUILD.bazel - Pass
--override_repository=+git_repository+deqp=$(realpath ../../external/deqp)tobazel test:bazel test //tests/deqp:deqp_vk_smoke_tests \ --graphics_drivers=gles_angle_vulkan_lavapipe \ --override_repository=+git_repository+deqp=$(realpath ../../external/deqp) \ --test_output=streamed \ --test_arg=--deqp_cases="dEQP-VK.api.smoke.triangle"
Collecting & Analyzing Logs
Every bazel test //tests/deqp:deqp_vk_smoke_tests invocation writes test results and diagnostic artifacts under bazel-testlogs/tests/deqp/deqp_vk_smoke_tests/:
test.xml:- JUnit XML converted from
TestResults.qpabydeqp_qpa_to_test_xml_main, listing per-case pass/fail/skip/crash status and failure details.
- JUnit XML converted from
test.log:- Captures stdout/stderr from
deqp_wrapper.sh,deqp-vk, and guestvulkan.ranchu.so(mesa_loge,mesa_logi, guest encoder errors, VirtGpuKumquat messages).
- Captures stdout/stderr from
test.outputs/(undeclared test outputs, ortest.outputs/outputs.zipwhen zipped):TestResults.qpa: Raw dEQP QPA log file for all executed test cases.kumquat_logs.txt: Captures stdout/stderr fromkumquat_virtio, Gfxstream host Vulkan decoder (VkDecoder,FrameBuffer,VkCommonOperations), and Lavapipe/SwiftShader/host driver messages.sharded_deqp_caselist.txt: Exact list of dEQP test cases assigned to the shard.
Recommended AI Debugging Loop
- Reproduce: Run the failing test case in isolation:
bazel test //tests/deqp:deqp_vk_smoke_tests \ --graphics_drivers=gles_angle_vulkan_lavapipe \ --test_output=streamed \ --test_arg=--deqp_cases="dEQP-VK.<failing_test>" - Inspect Logs:
- Check
bazel-testlogs/tests/deqp/deqp_vk_smoke_tests/test.xml,test.log, andtest.outputs/(TestResults.qpa,kumquat_logs.txt) for dEQP failure details and guest encoder vs. host decoder errors.
- Check
- Modify Code:
- For host-side Vulkan decoding/emulation issues: edit files under
hardware/google/gfxstream/host/vulkan/. - For guest-side Vulkan encoding/resource tracking issues: edit files under
external/mesa3d/src/gfxstream/guest/and run with--override_repository=+git_repository+mesa=.... - For dEQP test adjustments or extra debug logging in CTS: edit files under
external/deqp/external/vulkancts/and run with--override_repository=+git_repository+deqp=....
- For host-side Vulkan decoding/emulation issues: edit files under
- Rebuild & Verify:
Re-run the
bazel testcommand above, then run the broader module wildcard (e.g.--test_arg=--deqp_cases="dEQP-VK.<module>.*") to ensure no regressions.
이 스킬의 파일
이 스킬에는 보조 파일이 없습니다.