VkRunner A simple shader script tester for Vulkan Neil Roberts - - PowerPoint PPT Presentation

vkrunner
SMART_READER_LITE
LIVE PREVIEW

VkRunner A simple shader script tester for Vulkan Neil Roberts - - PowerPoint PPT Presentation

VkRunner A simple shader script tester for Vulkan Neil Roberts Based on Piglits 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


slide-1
SLIDE 1

VkRunner

A simple shader script tester for Vulkan

Neil Roberts

slide-2
SLIDE 2
  • Based on Piglit’s shader_runner
  • Quickly test running a shader on

your Vulkan driver without having to write any boilerplate code

  • Simple domain-specific language to

specify inputs to the shader and verify the output

slide-3
SLIDE 3

[vertex shader passthrough] [fragment shader] #version 430 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); } [test] draw rect -1 -1 2 2 probe rect rgba (1, 0, 81, 250) (1, 0, 0, 1) probe rect rgba (85, 0, 81, 250) (1, 1, 1, 1) probe rect rgba (168, 0, 81, 250) (0, 0, 1, 1)

specify your shaders high-level drawing command probe the results

slide-4
SLIDE 4
  • 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 fly for quick testing

  • Or precompile scripts to binary to run
  • n platforms without the compiler
  • Push constants, UBOs, SSBOs, vertex

data

slide-5
SLIDE 5

Thanks github.com/igalia/vkrunner