Repository navigation
TEST-GS-PRIMITIVE-READBACK: count emitted primitives in synthetic geometry draws - #6316
Open
kacper-serewis wants to merge 1 commit into
Open
kacper-serewis wants to merge 1 commit into
kacper-serewis wants to merge 1 commit into
Conversation
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed TEST-GS-PRIMITIVE-READBACK. Based on main with no PR dependencies. AI-assisted.
VKH_GS_PRIMITIVES=1requests one 64-bit geometry-shader primitive counter for the harness draw and reports it after queue completion. Devices lacking geometry shaders or pipeline statistics return 77 with the missing feature. The ordinary color-only path allocates no query pool.The regression translates the hand-written gs_tri fixture and a variant that ends the strip on each emit. Both receive one triangle wholly behind the near plane. Three one-vertex strips produced zero primitives. One three-vertex strip produced one. Both 8×8 RGBA32F frames contained the exact clear value at every pixel. The 301 cached pipelines motivated the distinction between creation and emission. All draws here used synthetic inputs.
Built the Release vk_harness on Windows, then ran the new GPU test and four existing geometry translation tests on NVIDIA GeForce RTX 5070, driver 616.56, with Vulkan validation enabled. All five passed. Also checked the color-only control with the counter disabled. The unsupported-device branch was not exercised on hardware.
To reproduce, set LEONIDA_VK_HARNESS to the built executable and run
python -m pytest -q -rs tests/test_gs_primitive_readback.pywith AMDGPU llvm-mc and SPIRV-Tools available.