SlideShare a Scribd company logo
1 of 37
Mark Kilgard, January 19, 2016
Migrating from OpenGL to Vulkan
2
About the Speaker
Mark Kilgard
Principal Graphics Software Engineer in Austin, Texas
Long-time OpenGL driver developer at NVIDIA
Author and implementer of many OpenGL extensions
Collaborated on the development of Cg
First commercial GPU shading language
Recently working on GPU-accelerated vector graphics
(Yes, and wrote GLUT in ages past)
Who is this guy?
3
Motivation for Talk
What kinds of apps benefit from Vulkan?
How to prepare your OpenGL code base to transition to Vulkan
How various common OpenGL usage scenarios are re-thought in Vulkan
Re-thinking your application structure for Vulkan
Coming from OpenGL, Preparing for Vulkan
4
Analogy
Different Valid Approaches
5
Analogy
Fixed-function OpenGL
Pre-assembled toy car
fun out of the box,
not much room for customization
6
Analogy
Modern AZDO OpenGL with Programmable Shaders
LEGO Kit
you build it yourself,
comes with plenty of useful, pre-shaped pieces
AZDO = Approaching Zero Driver Overhead
7
Analogy
Vulkan
Pine Wood Derby Kit
you build it yourself to race from raw materials
power tools used to assemble, adult supervision highly recommended
8
Analogy
Different Valid Approaches
Fixed-function OpenGL
Modern AZDO OpenGL with
Programmable Shaders
Vulkan
9
Beneficial Vulkan Scenarios
Is your graphics work
CPU bound?
Can your graphics
work creation be
parallelized?
start
yes
Vulkan
friendly
yes
Has Parallelizable CPU-bound Graphics Work
10
Beneficial Vulkan Scenarios
Your graphics
platform is fixed
You’ll
do whatever
it takes to squeeze
out max
perf.
start
yes
Vulkan
friendly
yes
Maximizing a Graphics Platform Budget
11
Beneficial Vulkan Scenarios
You put
a premium on
avoiding
hitches
You can
manage your
graphics resource
allocations
start
yes
Vulkan
friendly
yes
Managing Predictable Performance, Free of Hitching
12
Unlikely to Benefit
1. Need for compatibility to pre-Vulkan platforms
2. Heavily GPU-bound application
3. Heavily CPU-bound application due to non-graphics work
4. Single-threaded application, unlikely to change
5. App can target middle-ware engine, avoiding direct 3D graphics API dependencies
• Consider using an engine targeting Vulkan, instead of dealing with Vulkan yourself
Scenarios to Reconsider Coding to Vulkan
13
First Steps Migrating to Vulkan
Eliminate fixed-function
Source all geometry from vertex buffer objects (VBOs) with vertex arrays
Use all programmable GLSL shaders with layout() qualifiers
Consider using samplers
Do all rendering into framebuffer objects (FBOs)
Stay within the non-deprecated subset (e.g. no GL_QUADS, for now…)
Think about better batching & classify all your render states
Avoid depending on OpenGL context state
All pretty sensible advice, even if you stick with OpenGL
Modernize Your OpenGL
14
Next Steps Migrating to Vulkan
Think about how your application would handle losing the GPU
Similar to ARB_robustness
Profile your application, understand what portions are CPU and GPU bound
Vulkan most benefits apps bottlenecked on graphics work creation and driver validation
Is that your app?
Adopt common features available in both OpenGL and Vulkan first in OpenGL
Proving out tessellation or multi-draw-indirect probably easier first in your stable
OpenGL code base
Again all pretty sensible advice, even if you stick with OpenGL
Modernize Your OpenGL
15
Thinking about Vulkan vs. OpenGL
OpenGL, largely understood in terms of
Its API, functions for commands and queries
And how that API interacts with the OpenGL
state machine
OpenGL has lots of implicit synchronization
Errors handled largely by ignoring command
OpenGL API manages various objects
But allocation of underlying device resources
largely handled by driver
+
OpenGL Has a Well-established Approach
Originally client-server
16
Thinking about Vulkan vs. OpenGL
Vulkan constructs and submits work for a
graphics device
Idealized graphics + compute device
Requires application to maintain valid Vulkan
usage for proper operation
Not expected to behave correctly in face of
errors, justified for performance
Instead of updating state machine, Vulkan is
about establishing working relationships
between objects
Pre-validates operation of actions
Vulkan Plays By Different Rules
Explicit API
Explicit memory management
Explicit synchronization
Explicit queuing of work
Explicit management of buffer state with
render passes
Not client-server, explicitly depends on
shared resources and memory
17
Truly Transitioning to Vulkan
Much more graphics resource responsibility for the application
You need to allocate from large device memory chunk
You become responsible for proper explicit synchronization
Fences, Barriers, Semaphores
Barriers are probably the hardest to appreciate
Everything has to be structured as pipeline state objects (PSOs)
Understand render passes
Think how parallel command buffer generation would operate
You become responsible for multi-threaded exclusion of your Vulkan objects
Vulkan Done Right Rethinks Entire Graphics Rendering
18
Common Graphics Tasks
Loading a mipmapped texture
Loading a vertex buffer object for rendering
Choosing a shader representation and loading shaders
Initiating compute work
Managing a memory sub-allocator
Thinking about render passes
Managing Predictable Performance, Free of Hitching
19
Loading a Texture
Well traveled path via OpenGL 3.0
glBindTexture(GL_TEXTURE_2D, texture_name);
glTexImage2D(GL_TEXTURE_2D, 0, GL_SRGB8, width, height,
/*border*/0, GL_UNSIGNED_BYTE, GL_RGBA, pixels);
glGenerateMipmap(GL_TEXTURE_2D);
Does more than you think it does
The OpenGL View
20
Logical Operations to Load a Texture
1. Create host driver objects corresponding to texture/sampler/image/view/layout
2. Copy call’s image to staging memory accessible to host+device
3. (OpenGL might do a format conversion and pixel transfer)
4. Allocates device memory for texture image for texturing
5. Copy image from host+device memory to device memory for texturing
6. Allocate device resources for sampler
7. Generate mipmap levels
21
Various Vulkan Objects “inside” a Texture
No such thing as “VkTexture”
Instead
Texture state in Vulkan = VkDescriptorImageInfo
Combines: VkSampler + VkImageView + VkImageLayout
Sampling state + Image state + Current image layout
Texture binding in Vulkan = part of VkDescriptorSetLayoutBinding
Contained with VkDescriptorSetLayout
Building Up the OpenGL Texture Object from Vulkan Concepts
OpenGL textures are opaque,
so lacks an exposed image layout
22
Allocating Image Memory for Texture
VkImage
VkDevice
vkGetImageMemoryRequirements
VkMemoryRequirements
vkBindImageMemory
VkDeviceMemory
vkAllocateMemory
vkCreateImage
With VulkanNaïve approach!
vkAllocateMemory is expensive.
Demos may do this, but real apps
should sub-allocate from large
VkDeviceMemory allocations
See next slide…
23
Sub-allocating Image Memory for Texture
VkImage
VkDevice
vkGetImageMemoryRequirements
VkMemoryRequirements
vkBindImageMemory
VkDeviceMemory
vkAllocateMemory
vkCreateImage
One large device memory allocation, assigned to multiple images
Proper approach!
vkAllocateMemory makes a
large allocation with and then
sub-allocates enough
memory for the image
So who writes
the sub-allocator?
You do!
24
Binding Descriptor Sets for a Texture
VkDescriptorImageInfoVkSampler
VkImageView
VkImageLayout
VkDescriptorSetLayout
VkWriteDescriptorSet vkAllocateDescriptorSets
VkPipelineLayout
vkCmdBindDescriptorSets
VkCommandBuffer
vkCreateDescriptorSetLayout
vkCreatePipelineLayout
vkUpdateDescriptorSets
So Pipeline Sees Texture
25
Establishing Sampler Bindings for a Pipeline Object
VkDescriptorSetLayoutBinding for a sampler binding
vkCreateDescriptorSetLayout
VkDescriptorSetLayout
vkCreatePipelineLayout
VkPipelineLayout
vkCreateGraphicsPipelines
VkPipeline
vkCmdBindPipeline
Vulkan Pipelines Need to Know How They Will Bind Samplers
VkCommandBuffer
26
Base Level Specification + Mipmap Generation
VkCommandBuffer
vkCmdBlitImage
vkCmdPipelineBarrier
vkCmdBlitImage
for each upper mipmap level
vkCmdPipelineBarrier
Vulkan Command Buffer Orchestrates Blit + Downsamples
staging
image
texture
base
image
texture
base
image
level 1
mipmap
level i
mipmap
level i+1
mipmap
27
Binding to a Vertex Array Object (VAO) and
Rendering from Vertex Arrays
Well traveled path via OpenGL 3.0
glBindVertexArray(vertex_array_object);
glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_INT, indices);
Again, does more than you think it does
The OpenGL View
28
Allocating Buffer Memory for VBO
VkBuffer
VkDevice
vkGetBufferMemoryRequirements
VkMemoryRequirements
vkBindBufferMemory
VkDeviceMemory
vkAllocateMemory
VkCreateBuffer
With VulkanNaïve approach!
vkAllocateMemory is expensive.
Demos may do this, but real apps
should sub-allocate from large
VkDeviceMemory allocations
29
Binding Vertex State To A Pipeline
VkVertexInputBindingDescription
VkVertexInputAttributeDescription
VkPipelineVertexInputStateCreateInfo
VkGraphicsPipelineCreateInfo
VkGraphicsPipeline
vkCreateGraphicsPipelines
So Pipeline Sees Vertex Input State
VkPipelineShaderStageCreateInfo
VkPipelineInputAssemblyStateCreateInfo
VkPipelineViewportStateCreateInfo
VkPipelineRasterizationStateCreateInfo
VkPipelineMultisampleStateCreateInfo
VkPipelineDepthStencilStateCreateInfo
VkPipelineColorBlendStateCreateInfo
VkPipelineDynamicStateCreateInfo
30
Binding Vertex Buffer For Drawing
For the vertex input statevkCmdBindPipeline
Buffer Binding Is Performed With The Command Queue
vkCmdBindVertexBuffers For the vertex data
vkCmdBeginRenderPass
vkCmdBindDescriptorSets
vkCmdDrawIndexed
vkCmdEndRenderPass
Begin Drawing
Draw
End Drawing
31
Big Features, Ready for Vulkan
Compute shaders
Tessellation shaders
Geometry shaders
Sparse resources (textures and buffers)
In OpenGL 4.5 today
Vulkan has the same big features, just different API
Mostly the same GLSL can be used in either case
Prototype in OpenGL now, Enable in Vulkan next
32
Thinking about render passes
OpenGL just has commands to draw primitives
No explicit notion of a render pass in OpenGL API
Vulkan does have render passes, VkRenderPass
Includes notion of sub-passes
Designed to facilitate tiling architectures
Bounds the lifetime of intermediate framebuffer results
Allows iterating over subpasses (chunking) within a render pass on a per tile basis
In most cases, you won’t need to deal with subpasses
How do rendering operations affect the retained framebuffer?
33
Render Pass
Describes the list attachments the render pass involves
Each attachment can specify
How the attachment state is initialized (loaded, cleared, dont-care)
How the attach state is stored (store, or dont-care)
Don’t-care allows framebuffer intermediates to be discarded
E.g. depth buffer not needed after the render pass
How the layout of attachment could change
Sub-pass dependencies indicate involvement of attachments within a subpass
What does a Vulkan Render Pass Provide?
34
Render Passes
vkCmdBeginRenderPass
vkCmdEndRenderPass
vkCmdBeginRenderPass
vkCmdNextSubpass
vkCmdNextSubpass
vkCmdEndRenderPass
Monolithic or Could Have Sub-passes
Each subpass
has its own
description and
dependencies
Simple render pass,
no subpasses
Complex render pass,
with multiple subpasses
35
Vulkan Application Structure
Parallel Command Buffer Generation
Traditional single-threaded
OpenGL app structure
update scene
draw scene
single thread
Possible multi-threaded
Vulkan app structure
collect secondary
command buffers
distribute
update scene work
submit
command
buffer
build secondary
command buffer
work thread
build secondary
command buffer
work thread
build secondary
command buffer
work thread
build secondary
command buffer
work thread
36
Conclusions
Vulkan is a radical departure from OpenGL
Modernizing your OpenGL code base is definitely good for moving to Vulkan
But it will take more work than that!
Vulkan’s explicitness makes simple operations like a texture bind quite involved
Think about multi-threaded command buffer creation
Get Ready for Vulkan
Migrating from OpenGL to Vulkan

More Related Content

What's hot

NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017Mark Kilgard
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologyTiago Sousa
 
Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Tiago Sousa
 
Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016Graham Wihlidal
 
NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017Mark Kilgard
 
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3Electronic Arts / DICE
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3guest11b095
 
A Bizarre Way to do Real-Time Lighting
A Bizarre Way to do Real-Time LightingA Bizarre Way to do Real-Time Lighting
A Bizarre Way to do Real-Time LightingSteven Tovey
 
vkFX: Effect(ive) approach for Vulkan API
vkFX: Effect(ive) approach for Vulkan APIvkFX: Effect(ive) approach for Vulkan API
vkFX: Effect(ive) approach for Vulkan APITristan Lorach
 
Progressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityProgressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityUnity Technologies
 
Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Takahiro Harada
 
[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근
[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근
[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근MinGeun Park
 
FrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in FrostbiteFrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in FrostbiteElectronic Arts / DICE
 
Optimization in Unity: simple tips for developing with "no surprises" / Anton...
Optimization in Unity: simple tips for developing with "no surprises" / Anton...Optimization in Unity: simple tips for developing with "no surprises" / Anton...
Optimization in Unity: simple tips for developing with "no surprises" / Anton...DevGAMM Conference
 
smallpt: Global Illumination in 99 lines of C++
smallpt:  Global Illumination in 99 lines of C++smallpt:  Global Illumination in 99 lines of C++
smallpt: Global Illumination in 99 lines of C++鍾誠 陳鍾誠
 

What's hot (20)

NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017
 
Shiny PC Graphics in Battlefield 3
Shiny PC Graphics in Battlefield 3Shiny PC Graphics in Battlefield 3
Shiny PC Graphics in Battlefield 3
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
 
Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666
 
Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016
 
DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3
 
NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017
 
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3
 
A Bizarre Way to do Real-Time Lighting
A Bizarre Way to do Real-Time LightingA Bizarre Way to do Real-Time Lighting
A Bizarre Way to do Real-Time Lighting
 
vkFX: Effect(ive) approach for Vulkan API
vkFX: Effect(ive) approach for Vulkan APIvkFX: Effect(ive) approach for Vulkan API
vkFX: Effect(ive) approach for Vulkan API
 
Progressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityProgressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in Unity
 
Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)
 
[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근
[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근
[Ndc12] 누구나 알기쉬운 hdr과 톤맵핑 박민근
 
Stochastic Screen-Space Reflections
Stochastic Screen-Space ReflectionsStochastic Screen-Space Reflections
Stochastic Screen-Space Reflections
 
FrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in FrostbiteFrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in Frostbite
 
Beyond porting
Beyond portingBeyond porting
Beyond porting
 
Optimization in Unity: simple tips for developing with "no surprises" / Anton...
Optimization in Unity: simple tips for developing with "no surprises" / Anton...Optimization in Unity: simple tips for developing with "no surprises" / Anton...
Optimization in Unity: simple tips for developing with "no surprises" / Anton...
 
smallpt: Global Illumination in 99 lines of C++
smallpt:  Global Illumination in 99 lines of C++smallpt:  Global Illumination in 99 lines of C++
smallpt: Global Illumination in 99 lines of C++
 
Light prepass
Light prepassLight prepass
Light prepass
 

Viewers also liked

Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well Mark Kilgard
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectanglesMark Kilgard
 
GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012Mark Kilgard
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityMark Kilgard
 
NV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsNV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsMark Kilgard
 
Advanced Scenegraph Rendering Pipeline
Advanced Scenegraph Rendering PipelineAdvanced Scenegraph Rendering Pipeline
Advanced Scenegraph Rendering PipelineNarann29
 
Killzone Shadow Fall: Threading the Entity Update on PS4
Killzone Shadow Fall: Threading the Entity Update on PS4Killzone Shadow Fall: Threading the Entity Update on PS4
Killzone Shadow Fall: Threading the Entity Update on PS4jrouwe
 
Understaing Android EGL
Understaing Android EGLUnderstaing Android EGL
Understaing Android EGLSuhan Lee
 
NVIDIA Investor's Day 2014 Presentation by Rob Csongor: Tomorrow's Car Today
NVIDIA Investor's Day 2014 Presentation by Rob Csongor: Tomorrow's Car TodayNVIDIA Investor's Day 2014 Presentation by Rob Csongor: Tomorrow's Car Today
NVIDIA Investor's Day 2014 Presentation by Rob Csongor: Tomorrow's Car TodayNVIDIA
 
Вулкани и земјотреси
Вулкани и земјотресиВулкани и земјотреси
Вулкани и земјотресиMomchilo Iliiev
 
Introduction to Direct 3D 12 by Ivan Nevraev
Introduction to Direct 3D 12 by Ivan NevraevIntroduction to Direct 3D 12 by Ivan Nevraev
Introduction to Direct 3D 12 by Ivan NevraevAMD Developer Central
 
вулкани и земјотреси
вулкани и земјотресивулкани и земјотреси
вулкани и земјотресиvalentinastanoevska
 
Woden 2: Developing a modern 3D graphics engine in Smalltalk
Woden 2: Developing a modern 3D graphics engine in SmalltalkWoden 2: Developing a modern 3D graphics engine in Smalltalk
Woden 2: Developing a modern 3D graphics engine in SmalltalkESUG
 
Pitfalls of Object Oriented Programming by SONY
Pitfalls of Object Oriented Programming by SONYPitfalls of Object Oriented Programming by SONY
Pitfalls of Object Oriented Programming by SONYAnaya Medias Swiss
 
Milestone Highway Construction
Milestone Highway ConstructionMilestone Highway Construction
Milestone Highway Constructioncoreycarr
 
Global Power Systems Pvt. Ltd., Nagpur, Generators Set & Controller
Global Power Systems Pvt. Ltd., Nagpur, Generators Set & ControllerGlobal Power Systems Pvt. Ltd., Nagpur, Generators Set & Controller
Global Power Systems Pvt. Ltd., Nagpur, Generators Set & ControllerIndiaMART InterMESH Limited
 

Viewers also liked (17)

Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectangles
 
GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012GTC 2012: NVIDIA OpenGL in 2012
GTC 2012: NVIDIA OpenGL in 2012
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL Functionality
 
NV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsNV_path rendering Functional Improvements
NV_path rendering Functional Improvements
 
Advanced Scenegraph Rendering Pipeline
Advanced Scenegraph Rendering PipelineAdvanced Scenegraph Rendering Pipeline
Advanced Scenegraph Rendering Pipeline
 
Killzone Shadow Fall: Threading the Entity Update on PS4
Killzone Shadow Fall: Threading the Entity Update on PS4Killzone Shadow Fall: Threading the Entity Update on PS4
Killzone Shadow Fall: Threading the Entity Update on PS4
 
OpenGL L06-Performance
OpenGL L06-PerformanceOpenGL L06-Performance
OpenGL L06-Performance
 
Understaing Android EGL
Understaing Android EGLUnderstaing Android EGL
Understaing Android EGL
 
NVIDIA Investor's Day 2014 Presentation by Rob Csongor: Tomorrow's Car Today
NVIDIA Investor's Day 2014 Presentation by Rob Csongor: Tomorrow's Car TodayNVIDIA Investor's Day 2014 Presentation by Rob Csongor: Tomorrow's Car Today
NVIDIA Investor's Day 2014 Presentation by Rob Csongor: Tomorrow's Car Today
 
Вулкани и земјотреси
Вулкани и земјотресиВулкани и земјотреси
Вулкани и земјотреси
 
Introduction to Direct 3D 12 by Ivan Nevraev
Introduction to Direct 3D 12 by Ivan NevraevIntroduction to Direct 3D 12 by Ivan Nevraev
Introduction to Direct 3D 12 by Ivan Nevraev
 
вулкани и земјотреси
вулкани и земјотресивулкани и земјотреси
вулкани и земјотреси
 
Woden 2: Developing a modern 3D graphics engine in Smalltalk
Woden 2: Developing a modern 3D graphics engine in SmalltalkWoden 2: Developing a modern 3D graphics engine in Smalltalk
Woden 2: Developing a modern 3D graphics engine in Smalltalk
 
Pitfalls of Object Oriented Programming by SONY
Pitfalls of Object Oriented Programming by SONYPitfalls of Object Oriented Programming by SONY
Pitfalls of Object Oriented Programming by SONY
 
Milestone Highway Construction
Milestone Highway ConstructionMilestone Highway Construction
Milestone Highway Construction
 
Global Power Systems Pvt. Ltd., Nagpur, Generators Set & Controller
Global Power Systems Pvt. Ltd., Nagpur, Generators Set & ControllerGlobal Power Systems Pvt. Ltd., Nagpur, Generators Set & Controller
Global Power Systems Pvt. Ltd., Nagpur, Generators Set & Controller
 

Similar to Migrating from OpenGL to Vulkan

Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Prabindh Sundareson
 
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...ICS
 
C++ on the Web: Run your big 3D game in the browser
C++ on the Web: Run your big 3D game in the browserC++ on the Web: Run your big 3D game in the browser
C++ on the Web: Run your big 3D game in the browserAndre Weissflog
 
Shader Programming With Unity
Shader Programming With UnityShader Programming With Unity
Shader Programming With UnityMindstorm Studios
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentDavid Galeano
 
CS 354 Programmable Shading
CS 354 Programmable ShadingCS 354 Programmable Shading
CS 354 Programmable ShadingMark Kilgard
 
An Introduction to Computer Science with Java .docx
An Introduction to  Computer Science with Java .docxAn Introduction to  Computer Science with Java .docx
An Introduction to Computer Science with Java .docxdaniahendric
 
High Fidelity Games: Real Examples, Best Practices ... | Oleksii Vasylenko
High Fidelity Games: Real Examples, Best Practices ... | Oleksii VasylenkoHigh Fidelity Games: Real Examples, Best Practices ... | Oleksii Vasylenko
High Fidelity Games: Real Examples, Best Practices ... | Oleksii VasylenkoJessica Tams
 
Minko - Flash Conference #5
Minko - Flash Conference #5Minko - Flash Conference #5
Minko - Flash Conference #5Minko3D
 
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfJIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfSamiraKids
 
Computer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming IComputer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming I💻 Anton Gerdelan
 
Introduction to Computing on GPU
Introduction to Computing on GPUIntroduction to Computing on GPU
Introduction to Computing on GPUIlya Kuzovkin
 
Interactive 3D graphics for web with three.js, Andrey Vedilin, DataArt
Interactive  3D graphics for web with three.js, Andrey Vedilin, DataArtInteractive  3D graphics for web with three.js, Andrey Vedilin, DataArt
Interactive 3D graphics for web with three.js, Andrey Vedilin, DataArtAlina Vilk
 
Minko stage3d 20130222
Minko stage3d 20130222Minko stage3d 20130222
Minko stage3d 20130222Minko3D
 
EFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the DesktopEFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the DesktopSamsung Open Source Group
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tipsSamuel Chow
 

Similar to Migrating from OpenGL to Vulkan (20)

Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011Advanced Graphics Workshop - GFX2011
Advanced Graphics Workshop - GFX2011
 
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
 
Android native gl
Android native glAndroid native gl
Android native gl
 
C++ on the Web: Run your big 3D game in the browser
C++ on the Web: Run your big 3D game in the browserC++ on the Web: Run your big 3D game in the browser
C++ on the Web: Run your big 3D game in the browser
 
Shader Programming With Unity
Shader Programming With UnityShader Programming With Unity
Shader Programming With Unity
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
 
OpenGL for 2015
OpenGL for 2015OpenGL for 2015
OpenGL for 2015
 
CS 354 Programmable Shading
CS 354 Programmable ShadingCS 354 Programmable Shading
CS 354 Programmable Shading
 
An Introduction to Computer Science with Java .docx
An Introduction to  Computer Science with Java .docxAn Introduction to  Computer Science with Java .docx
An Introduction to Computer Science with Java .docx
 
High Fidelity Games: Real Examples, Best Practices ... | Oleksii Vasylenko
High Fidelity Games: Real Examples, Best Practices ... | Oleksii VasylenkoHigh Fidelity Games: Real Examples, Best Practices ... | Oleksii Vasylenko
High Fidelity Games: Real Examples, Best Practices ... | Oleksii Vasylenko
 
Minko - Flash Conference #5
Minko - Flash Conference #5Minko - Flash Conference #5
Minko - Flash Conference #5
 
LightWave™ 3D 11 Add-a-Seat
LightWave™ 3D 11 Add-a-SeatLightWave™ 3D 11 Add-a-Seat
LightWave™ 3D 11 Add-a-Seat
 
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfJIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
 
Task 2
Task 2Task 2
Task 2
 
Computer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming IComputer Graphics - Lecture 01 - 3D Programming I
Computer Graphics - Lecture 01 - 3D Programming I
 
Introduction to Computing on GPU
Introduction to Computing on GPUIntroduction to Computing on GPU
Introduction to Computing on GPU
 
Interactive 3D graphics for web with three.js, Andrey Vedilin, DataArt
Interactive  3D graphics for web with three.js, Andrey Vedilin, DataArtInteractive  3D graphics for web with three.js, Andrey Vedilin, DataArt
Interactive 3D graphics for web with three.js, Andrey Vedilin, DataArt
 
Minko stage3d 20130222
Minko stage3d 20130222Minko stage3d 20130222
Minko stage3d 20130222
 
EFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the DesktopEFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the Desktop
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tips
 

More from Mark Kilgard

D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...Mark Kilgard
 
Computers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School StudentsComputers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School StudentsMark Kilgard
 
Virtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsVirtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsMark Kilgard
 
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...Mark Kilgard
 
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware PipelineAccelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware PipelineMark Kilgard
 
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path RenderingSIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path RenderingMark Kilgard
 
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and BeyondSIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and BeyondMark Kilgard
 
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...Mark Kilgard
 
GPU accelerated path rendering fastforward
GPU accelerated path rendering fastforwardGPU accelerated path rendering fastforward
GPU accelerated path rendering fastforwardMark Kilgard
 
GPU-accelerated Path Rendering
GPU-accelerated Path RenderingGPU-accelerated Path Rendering
GPU-accelerated Path RenderingMark Kilgard
 
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web RenderingSIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web RenderingMark Kilgard
 
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012Mark Kilgard
 
GTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path RenderingGTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path Rendering Mark Kilgard
 
CS 354 Final Exam Review
CS 354 Final Exam ReviewCS 354 Final Exam Review
CS 354 Final Exam ReviewMark Kilgard
 
CS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR GraphicsCS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR GraphicsMark Kilgard
 
CS 354 Performance Analysis
CS 354 Performance AnalysisCS 354 Performance Analysis
CS 354 Performance AnalysisMark Kilgard
 
CS 354 Acceleration Structures
CS 354 Acceleration StructuresCS 354 Acceleration Structures
CS 354 Acceleration StructuresMark Kilgard
 
CS 354 Global Illumination
CS 354 Global IlluminationCS 354 Global Illumination
CS 354 Global IlluminationMark Kilgard
 
CS 354 Ray Casting & Tracing
CS 354 Ray Casting & TracingCS 354 Ray Casting & Tracing
CS 354 Ray Casting & TracingMark Kilgard
 

More from Mark Kilgard (20)

D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...
 
Computers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School StudentsComputers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School Students
 
Virtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsVirtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUs
 
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
 
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware PipelineAccelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
 
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path RenderingSIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
 
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and BeyondSIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
 
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
 
GPU accelerated path rendering fastforward
GPU accelerated path rendering fastforwardGPU accelerated path rendering fastforward
GPU accelerated path rendering fastforward
 
GPU-accelerated Path Rendering
GPU-accelerated Path RenderingGPU-accelerated Path Rendering
GPU-accelerated Path Rendering
 
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web RenderingSIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
 
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012
 
GTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path RenderingGTC 2012: GPU-Accelerated Path Rendering
GTC 2012: GPU-Accelerated Path Rendering
 
CS 354 Final Exam Review
CS 354 Final Exam ReviewCS 354 Final Exam Review
CS 354 Final Exam Review
 
CS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR GraphicsCS 354 Surfaces, Programmable Tessellation, and NPR Graphics
CS 354 Surfaces, Programmable Tessellation, and NPR Graphics
 
CS 354 Performance Analysis
CS 354 Performance AnalysisCS 354 Performance Analysis
CS 354 Performance Analysis
 
CS 354 Acceleration Structures
CS 354 Acceleration StructuresCS 354 Acceleration Structures
CS 354 Acceleration Structures
 
CS 354 Global Illumination
CS 354 Global IlluminationCS 354 Global Illumination
CS 354 Global Illumination
 
CS 354 Ray Casting & Tracing
CS 354 Ray Casting & TracingCS 354 Ray Casting & Tracing
CS 354 Ray Casting & Tracing
 
CS 354 Typography
CS 354 TypographyCS 354 Typography
CS 354 Typography
 

Recently uploaded

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Recently uploaded (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Migrating from OpenGL to Vulkan

  • 1. Mark Kilgard, January 19, 2016 Migrating from OpenGL to Vulkan
  • 2. 2 About the Speaker Mark Kilgard Principal Graphics Software Engineer in Austin, Texas Long-time OpenGL driver developer at NVIDIA Author and implementer of many OpenGL extensions Collaborated on the development of Cg First commercial GPU shading language Recently working on GPU-accelerated vector graphics (Yes, and wrote GLUT in ages past) Who is this guy?
  • 3. 3 Motivation for Talk What kinds of apps benefit from Vulkan? How to prepare your OpenGL code base to transition to Vulkan How various common OpenGL usage scenarios are re-thought in Vulkan Re-thinking your application structure for Vulkan Coming from OpenGL, Preparing for Vulkan
  • 5. 5 Analogy Fixed-function OpenGL Pre-assembled toy car fun out of the box, not much room for customization
  • 6. 6 Analogy Modern AZDO OpenGL with Programmable Shaders LEGO Kit you build it yourself, comes with plenty of useful, pre-shaped pieces AZDO = Approaching Zero Driver Overhead
  • 7. 7 Analogy Vulkan Pine Wood Derby Kit you build it yourself to race from raw materials power tools used to assemble, adult supervision highly recommended
  • 8. 8 Analogy Different Valid Approaches Fixed-function OpenGL Modern AZDO OpenGL with Programmable Shaders Vulkan
  • 9. 9 Beneficial Vulkan Scenarios Is your graphics work CPU bound? Can your graphics work creation be parallelized? start yes Vulkan friendly yes Has Parallelizable CPU-bound Graphics Work
  • 10. 10 Beneficial Vulkan Scenarios Your graphics platform is fixed You’ll do whatever it takes to squeeze out max perf. start yes Vulkan friendly yes Maximizing a Graphics Platform Budget
  • 11. 11 Beneficial Vulkan Scenarios You put a premium on avoiding hitches You can manage your graphics resource allocations start yes Vulkan friendly yes Managing Predictable Performance, Free of Hitching
  • 12. 12 Unlikely to Benefit 1. Need for compatibility to pre-Vulkan platforms 2. Heavily GPU-bound application 3. Heavily CPU-bound application due to non-graphics work 4. Single-threaded application, unlikely to change 5. App can target middle-ware engine, avoiding direct 3D graphics API dependencies • Consider using an engine targeting Vulkan, instead of dealing with Vulkan yourself Scenarios to Reconsider Coding to Vulkan
  • 13. 13 First Steps Migrating to Vulkan Eliminate fixed-function Source all geometry from vertex buffer objects (VBOs) with vertex arrays Use all programmable GLSL shaders with layout() qualifiers Consider using samplers Do all rendering into framebuffer objects (FBOs) Stay within the non-deprecated subset (e.g. no GL_QUADS, for now…) Think about better batching & classify all your render states Avoid depending on OpenGL context state All pretty sensible advice, even if you stick with OpenGL Modernize Your OpenGL
  • 14. 14 Next Steps Migrating to Vulkan Think about how your application would handle losing the GPU Similar to ARB_robustness Profile your application, understand what portions are CPU and GPU bound Vulkan most benefits apps bottlenecked on graphics work creation and driver validation Is that your app? Adopt common features available in both OpenGL and Vulkan first in OpenGL Proving out tessellation or multi-draw-indirect probably easier first in your stable OpenGL code base Again all pretty sensible advice, even if you stick with OpenGL Modernize Your OpenGL
  • 15. 15 Thinking about Vulkan vs. OpenGL OpenGL, largely understood in terms of Its API, functions for commands and queries And how that API interacts with the OpenGL state machine OpenGL has lots of implicit synchronization Errors handled largely by ignoring command OpenGL API manages various objects But allocation of underlying device resources largely handled by driver + OpenGL Has a Well-established Approach Originally client-server
  • 16. 16 Thinking about Vulkan vs. OpenGL Vulkan constructs and submits work for a graphics device Idealized graphics + compute device Requires application to maintain valid Vulkan usage for proper operation Not expected to behave correctly in face of errors, justified for performance Instead of updating state machine, Vulkan is about establishing working relationships between objects Pre-validates operation of actions Vulkan Plays By Different Rules Explicit API Explicit memory management Explicit synchronization Explicit queuing of work Explicit management of buffer state with render passes Not client-server, explicitly depends on shared resources and memory
  • 17. 17 Truly Transitioning to Vulkan Much more graphics resource responsibility for the application You need to allocate from large device memory chunk You become responsible for proper explicit synchronization Fences, Barriers, Semaphores Barriers are probably the hardest to appreciate Everything has to be structured as pipeline state objects (PSOs) Understand render passes Think how parallel command buffer generation would operate You become responsible for multi-threaded exclusion of your Vulkan objects Vulkan Done Right Rethinks Entire Graphics Rendering
  • 18. 18 Common Graphics Tasks Loading a mipmapped texture Loading a vertex buffer object for rendering Choosing a shader representation and loading shaders Initiating compute work Managing a memory sub-allocator Thinking about render passes Managing Predictable Performance, Free of Hitching
  • 19. 19 Loading a Texture Well traveled path via OpenGL 3.0 glBindTexture(GL_TEXTURE_2D, texture_name); glTexImage2D(GL_TEXTURE_2D, 0, GL_SRGB8, width, height, /*border*/0, GL_UNSIGNED_BYTE, GL_RGBA, pixels); glGenerateMipmap(GL_TEXTURE_2D); Does more than you think it does The OpenGL View
  • 20. 20 Logical Operations to Load a Texture 1. Create host driver objects corresponding to texture/sampler/image/view/layout 2. Copy call’s image to staging memory accessible to host+device 3. (OpenGL might do a format conversion and pixel transfer) 4. Allocates device memory for texture image for texturing 5. Copy image from host+device memory to device memory for texturing 6. Allocate device resources for sampler 7. Generate mipmap levels
  • 21. 21 Various Vulkan Objects “inside” a Texture No such thing as “VkTexture” Instead Texture state in Vulkan = VkDescriptorImageInfo Combines: VkSampler + VkImageView + VkImageLayout Sampling state + Image state + Current image layout Texture binding in Vulkan = part of VkDescriptorSetLayoutBinding Contained with VkDescriptorSetLayout Building Up the OpenGL Texture Object from Vulkan Concepts OpenGL textures are opaque, so lacks an exposed image layout
  • 22. 22 Allocating Image Memory for Texture VkImage VkDevice vkGetImageMemoryRequirements VkMemoryRequirements vkBindImageMemory VkDeviceMemory vkAllocateMemory vkCreateImage With VulkanNaïve approach! vkAllocateMemory is expensive. Demos may do this, but real apps should sub-allocate from large VkDeviceMemory allocations See next slide…
  • 23. 23 Sub-allocating Image Memory for Texture VkImage VkDevice vkGetImageMemoryRequirements VkMemoryRequirements vkBindImageMemory VkDeviceMemory vkAllocateMemory vkCreateImage One large device memory allocation, assigned to multiple images Proper approach! vkAllocateMemory makes a large allocation with and then sub-allocates enough memory for the image So who writes the sub-allocator? You do!
  • 24. 24 Binding Descriptor Sets for a Texture VkDescriptorImageInfoVkSampler VkImageView VkImageLayout VkDescriptorSetLayout VkWriteDescriptorSet vkAllocateDescriptorSets VkPipelineLayout vkCmdBindDescriptorSets VkCommandBuffer vkCreateDescriptorSetLayout vkCreatePipelineLayout vkUpdateDescriptorSets So Pipeline Sees Texture
  • 25. 25 Establishing Sampler Bindings for a Pipeline Object VkDescriptorSetLayoutBinding for a sampler binding vkCreateDescriptorSetLayout VkDescriptorSetLayout vkCreatePipelineLayout VkPipelineLayout vkCreateGraphicsPipelines VkPipeline vkCmdBindPipeline Vulkan Pipelines Need to Know How They Will Bind Samplers VkCommandBuffer
  • 26. 26 Base Level Specification + Mipmap Generation VkCommandBuffer vkCmdBlitImage vkCmdPipelineBarrier vkCmdBlitImage for each upper mipmap level vkCmdPipelineBarrier Vulkan Command Buffer Orchestrates Blit + Downsamples staging image texture base image texture base image level 1 mipmap level i mipmap level i+1 mipmap
  • 27. 27 Binding to a Vertex Array Object (VAO) and Rendering from Vertex Arrays Well traveled path via OpenGL 3.0 glBindVertexArray(vertex_array_object); glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_INT, indices); Again, does more than you think it does The OpenGL View
  • 28. 28 Allocating Buffer Memory for VBO VkBuffer VkDevice vkGetBufferMemoryRequirements VkMemoryRequirements vkBindBufferMemory VkDeviceMemory vkAllocateMemory VkCreateBuffer With VulkanNaïve approach! vkAllocateMemory is expensive. Demos may do this, but real apps should sub-allocate from large VkDeviceMemory allocations
  • 29. 29 Binding Vertex State To A Pipeline VkVertexInputBindingDescription VkVertexInputAttributeDescription VkPipelineVertexInputStateCreateInfo VkGraphicsPipelineCreateInfo VkGraphicsPipeline vkCreateGraphicsPipelines So Pipeline Sees Vertex Input State VkPipelineShaderStageCreateInfo VkPipelineInputAssemblyStateCreateInfo VkPipelineViewportStateCreateInfo VkPipelineRasterizationStateCreateInfo VkPipelineMultisampleStateCreateInfo VkPipelineDepthStencilStateCreateInfo VkPipelineColorBlendStateCreateInfo VkPipelineDynamicStateCreateInfo
  • 30. 30 Binding Vertex Buffer For Drawing For the vertex input statevkCmdBindPipeline Buffer Binding Is Performed With The Command Queue vkCmdBindVertexBuffers For the vertex data vkCmdBeginRenderPass vkCmdBindDescriptorSets vkCmdDrawIndexed vkCmdEndRenderPass Begin Drawing Draw End Drawing
  • 31. 31 Big Features, Ready for Vulkan Compute shaders Tessellation shaders Geometry shaders Sparse resources (textures and buffers) In OpenGL 4.5 today Vulkan has the same big features, just different API Mostly the same GLSL can be used in either case Prototype in OpenGL now, Enable in Vulkan next
  • 32. 32 Thinking about render passes OpenGL just has commands to draw primitives No explicit notion of a render pass in OpenGL API Vulkan does have render passes, VkRenderPass Includes notion of sub-passes Designed to facilitate tiling architectures Bounds the lifetime of intermediate framebuffer results Allows iterating over subpasses (chunking) within a render pass on a per tile basis In most cases, you won’t need to deal with subpasses How do rendering operations affect the retained framebuffer?
  • 33. 33 Render Pass Describes the list attachments the render pass involves Each attachment can specify How the attachment state is initialized (loaded, cleared, dont-care) How the attach state is stored (store, or dont-care) Don’t-care allows framebuffer intermediates to be discarded E.g. depth buffer not needed after the render pass How the layout of attachment could change Sub-pass dependencies indicate involvement of attachments within a subpass What does a Vulkan Render Pass Provide?
  • 34. 34 Render Passes vkCmdBeginRenderPass vkCmdEndRenderPass vkCmdBeginRenderPass vkCmdNextSubpass vkCmdNextSubpass vkCmdEndRenderPass Monolithic or Could Have Sub-passes Each subpass has its own description and dependencies Simple render pass, no subpasses Complex render pass, with multiple subpasses
  • 35. 35 Vulkan Application Structure Parallel Command Buffer Generation Traditional single-threaded OpenGL app structure update scene draw scene single thread Possible multi-threaded Vulkan app structure collect secondary command buffers distribute update scene work submit command buffer build secondary command buffer work thread build secondary command buffer work thread build secondary command buffer work thread build secondary command buffer work thread
  • 36. 36 Conclusions Vulkan is a radical departure from OpenGL Modernizing your OpenGL code base is definitely good for moving to Vulkan But it will take more work than that! Vulkan’s explicitness makes simple operations like a texture bind quite involved Think about multi-threaded command buffer creation Get Ready for Vulkan