#version 450 // iter13 XFB probe vertex shader. // Writes a known pattern per vertex into transform feedback buffer 0. // Each vertex emits one vec4: (vertex_id, instance_id, 0x1234, 0xcafe). // With a 3-vertex single-instance draw + buffer offset 0, // expected capture (LE float32 array of vec4s): // vertex 0: 0.0, 0.0, 4660.0, 51966.0 // vertex 1: 1.0, 0.0, 4660.0, 51966.0 // vertex 2: 2.0, 0.0, 4660.0, 51966.0 layout(xfb_buffer = 0, xfb_offset = 0, xfb_stride = 16, location = 0) out vec4 captured; void main() { // Position is unused (rasterizerDiscardEnable=VK_TRUE) but needed for valid pipeline. gl_Position = vec4(0, 0, 0, 1); captured = vec4( float(gl_VertexIndex), float(gl_InstanceIndex), float(0x1234), float(0xcafe) ); }