mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 19:18:37 +00:00
Corpus (scripts/vs_input_survey.py, all 2,236 VS): no exp prim, no s_sendmsg, no v_mbcnt, every VS exports pos0/param, so the console runs them as legacy hardware VS. Their input VGPRs are Mesa's GFX10 legacy layout (radv_shader_args.c, declare_vs_input_vgprs, not is_ngg): v0 vertex id, v1 unused, v2 primitive id, v3 instance id; no VS reads v1/v2 on entry, 788 start with the fetch call and read attributes from v4. Those ids are zero-based on the hardware (ac_nir_lower_intrinsics_to_args.c: vertex_id is load_vertex_id_zero_base, instance_id is load_instance_id; the bases come in SGPRs), while Vulkan's VertexIndex/InstanceIndex include firstVertex|vertexOffset/firstInstance. The translator now seeds v0 = VertexIndex - BaseVertex and v3 = InstanceIndex - BaseInstance (DrawParameters; feature shaderDrawParameters in every VS's metadata). GPU test vs_base_ids.asm, drawn with VKH_DRAW=16,7 (new vk_harness option): 0x101 on every pixel, where before it was 0x7111. Run by check.py and run_gpu_tests.py. vk_harness, vk_pipeline_check, vk_bindless_test, vk_texture_test and the runtime's Vulkan device enable shaderDrawParameters. design.md's "Inputs and outputs" row replaces the "unverified" note. AI-assisted (Claude Code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>