lunarg sdk for vulkan - khronos group...© copyright khronos group 2016 - page 2 enter the raffle...

13
© Copyright Khronos Group 2016 - Page 1 LunarG ® SDK for Vulkan ® Karen Ghavam, CEO Karl Schultz, Principal Engineer Jon Ashburn, Principal Engineer

Upload: others

Post on 11-Oct-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: LunarG SDK for Vulkan - Khronos Group...© Copyright Khronos Group 2016 - Page 2 Enter the Raffle for your prize! Congratulations! You are the recipient of the Vulkan Programming Guide,

© Copyright Khronos Group 2016 - Page 1

LunarG® SDK for Vulkan®

Karen Ghavam, CEOKarl Schultz, Principal EngineerJon Ashburn, Principal Engineer

Page 2: LunarG SDK for Vulkan - Khronos Group...© Copyright Khronos Group 2016 - Page 2 Enter the Raffle for your prize! Congratulations! You are the recipient of the Vulkan Programming Guide,

© Copyright Khronos Group 2016 - Page 2

Enter the Raffle for your prize!Congratulations!

You are the recipient of the Vulkan Programming Guide, courtesy of LunarG!

Is your OpenGL Programming Guide getting lonely? Well, it will soon have a companion. In August 2016, when the Vulkan Programming Guide becomes available, LunarG will ship it directly to you!

In the meantime, visit LunarXchange (Vulkan.lunarg.com) for the LunarG SDK for Vulkan, and accept this book bag, anxiously awaiting its Vulkan Programming Guide.

Page 3: LunarG SDK for Vulkan - Khronos Group...© Copyright Khronos Group 2016 - Page 2 Enter the Raffle for your prize! Congratulations! You are the recipient of the Vulkan Programming Guide,

© Copyright Khronos Group 2016 - Page 3

LunarG SDK• Loader Binary• Validation Layer Libraries• Vulkan trace and replay tools- vktrace- vkreplay

• SPIR-V Tools- GLSL Validator - SPIR-V Disassembler and Assembler - SPIR-V Remapper

• RenderDoc*• Sample Programs

*For a detailed demonstration of RenderDoc don’t miss:Practical Development for Vulkan (presented by Valve Software). Thursday. 12:45 – 1:45. Room 3009, West Hall

Page 4: LunarG SDK for Vulkan - Khronos Group...© Copyright Khronos Group 2016 - Page 2 Enter the Raffle for your prize! Congratulations! You are the recipient of the Vulkan Programming Guide,

© Copyright Khronos Group 2016 - Page 4

Download the LunarG SDK for Vulkan at LunarXchange: vulkan.lunarg.com

Version 1.0.5.0 now available!

Page 5: LunarG SDK for Vulkan - Khronos Group...© Copyright Khronos Group 2016 - Page 2 Enter the Raffle for your prize! Congratulations! You are the recipient of the Vulkan Programming Guide,

© Copyright Khronos Group 2016 - Page 5

The Power of a Layered Ecosystem

Development pathValidation

layer

Debug layer

Other layers

Production path

Vulkan application

Installable Client Driver

Vulkan application

Installable Client Driver

Loader

Loader

Page 6: LunarG SDK for Vulkan - Khronos Group...© Copyright Khronos Group 2016 - Page 2 Enter the Raffle for your prize! Congratulations! You are the recipient of the Vulkan Programming Guide,

© Copyright Khronos Group 2016 - Page 6

Layers: Fully IntegratedProgrammatic Approach

Vulkan application

Debug Report

Callback

Installable Client Driver

Layer

Application supplies list

of layers

Application handles messages in

callback

Layers report “results” as

messages

Loader

Page 7: LunarG SDK for Vulkan - Khronos Group...© Copyright Khronos Group 2016 - Page 2 Enter the Raffle for your prize! Congratulations! You are the recipient of the Vulkan Programming Guide,

© Copyright Khronos Group 2016 - Page 7

Layers: Externally Activated“Ad-hoc” Approach

Vulkan application

Debug Report

Callback

Installable Client Driver

Layer

User sets environment variables:

VK_INSTANCE_LAYER=“layer name”

Default Debug Report writes to output stream

Layers report “results” as

messages

Loader

Layer Settings File

Page 8: LunarG SDK for Vulkan - Khronos Group...© Copyright Khronos Group 2016 - Page 2 Enter the Raffle for your prize! Congratulations! You are the recipient of the Vulkan Programming Guide,

© Copyright Khronos Group 2016 - Page 8

Demo We’ll Be Using

“Hologram”By

Chia-I Wu (olv)

• Well-written Vulkan demo• Simulation of 5000 moving objects• Demonstrates multi-threaded command

buffer recording• Can be found in:• https://github.com/LunarG/VulkanSamples

Page 9: LunarG SDK for Vulkan - Khronos Group...© Copyright Khronos Group 2016 - Page 2 Enter the Raffle for your prize! Congratulations! You are the recipient of the Vulkan Programming Guide,

© Copyright Khronos Group 2016 - Page 9

Demo!

Watch the demo for a minute or so

Page 10: LunarG SDK for Vulkan - Khronos Group...© Copyright Khronos Group 2016 - Page 2 Enter the Raffle for your prize! Congratulations! You are the recipient of the Vulkan Programming Guide,

© Copyright Khronos Group 2016 - Page 10

A Few Hologram Internals – Object Data

5000 ShaderParamBlocks

struct ShaderParamBlock {float light_pos[4];float light_color[4];float model[4 * 4];float view_projection[4 * 4];

};

One ShaderParamBlock per Object

For Each Frame and For Each Object:• Modify ShaderParamBlock• BindDescriptorSet

Two Frames of Object Data

Page 11: LunarG SDK for Vulkan - Khronos Group...© Copyright Khronos Group 2016 - Page 2 Enter the Raffle for your prize! Congratulations! You are the recipient of the Vulkan Programming Guide,

© Copyright Khronos Group 2016 - Page 11

Modify DemoLet’s add code to modulate the transparency of each object, independently, as a function of time.To do this, we need to:

1. Add a parameter to the ShaderParamBlock: “per-object” alpha2. Modify the shader program to apply the per-object alpha3. Modify the Simulation to change the transparency of each object over time

Start with Step 1!struct ShaderParamBlock {

float light_pos[4];

float light_color[4];

float model[4 * 4];

float view_projection[4 * 4];

float alpha;

};

Page 12: LunarG SDK for Vulkan - Khronos Group...© Copyright Khronos Group 2016 - Page 2 Enter the Raffle for your prize! Congratulations! You are the recipient of the Vulkan Programming Guide,

© Copyright Khronos Group 2016 - Page 12

Let’s See What Happens

Change the code and re-run demo

Page 13: LunarG SDK for Vulkan - Khronos Group...© Copyright Khronos Group 2016 - Page 2 Enter the Raffle for your prize! Congratulations! You are the recipient of the Vulkan Programming Guide,

© Copyright Khronos Group 2016 - Page 13

More Information• Layer Documentation- LunarXchange website (https://vulkan.lunarg.com/app/docs/latest/layers)- More details on validation and other layers

• Screenshot Layer- Good for showing someone else what is wrong- Also can be used for before/after image-compare testing

• Vktrace/Vkreplay- Useful for sending someone a trace file in lieu of setting up a reproduction

scenario