VkRunner A simple shader script tester for Vulkan Neil Roberts
• Based on Piglit’s shader_runner • Quickly test running a shader on your Vulkan driver without having to write any boilerplate code • Simple domain-speci fi c language to specify inputs to the shader and verify the output
[vertex shader passthrough] [fragment shader] #version 430 specify your shaders layout(location = 0) out vec4 color; void main() { if (gl_FragCoord.x < 83.33333) color = vec4(1.0, 0.0, 0.0, 1.0); else if (gl_FragCoord.x < 166.66666) color = vec4(1.0, 1.0, 1.0, 1.0); else color = vec4(0.0, 0.0, 1.0, 1.0); } high-level drawing command [test] draw rect -1 -1 2 2 probe the probe rect rgba (1, 0, 81, 250) (1, 0, 0, 1) probe rect rgba (85, 0, 81, 250) (1, 1, 1, 1) results probe rect rgba (168, 0, 81, 250) (0, 0, 1, 1)
• Standalone executable or library to integrate into another framework • Vertex, tessellation, geometry, fragment and compute shaders • Specify in GLSL or SPIR-V dissassembly. Compiled on the fl y for quick testing • Or precompile scripts to binary to run on platforms without the compiler • Push constants, UBOs, SSBOs, vertex data
Thanks github.com/igalia/vkrunner
Recommend
More recommend