Skip to content

TEST-GS-PRIMITIVE-READBACK: count emitted primitives in synthetic geometry draws - #6316

Open
kacper-serewis wants to merge 1 commit into
ItsNotRexed:mainfrom
kacper-serewis:test/gs-primitive-readback
Open

kacper-serewis wants to merge 1 commit into
ItsNotRexed:mainfrom
kacper-serewis:test/gs-primitive-readback

Conversation

@kacper-serewis

Copy link
Copy Markdown
Contributor

Claimed TEST-GS-PRIMITIVE-READBACK. Based on main with no PR dependencies. AI-assisted.

VKH_GS_PRIMITIVES=1 requests 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.py with AMDGPU llvm-mc and SPIRV-Tools available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant