gtc 2009 opengl barthold
TRANSCRIPT
San Jose, CA | September 30, 2009San Jose, CA | September 30, 2009
OpenGL: The train has left the station
Agenda
• OpenGL 3 : Revolution through Evolution (Barthold Lichtenbelt)
• OpenGL 3.2 and more (Mark Kilgard)
• Interop (Michael Gold)
• Shader Model 5 (Barthold Lichtenbelt)
San Jose, CA | September 30, 2009San Jose, CA | September 30, 2009
OpenGL 3: Revolution through EvolutionOpenGL 3: Revolution through Evolution
© Copyright Khronos Group, 2009 - Page 4
Revolution through Evolution
• Strategically evolving OpenGL to be the 3D graphics API that:
• Exposes all existing leading-edge hardware features
• Has widest platform coverage
• Meets developer needs in diverse market segments
• Enables silicon vendors to continuously innovate
OpenGL 3.X Tactics
• Series of schedule-driven point releases
• Deprecation mechanism to streamline API
• Coherent profiles to meet diverse market segment needs
• Use extensions to introduce leading-edge functionality
• OpenCL/CUDA interop to rapidly converge compute and visual processing
• Increase ease of porting from DX9 and DX10 to OpenGL
• Roadmap alignment with OpenGL ES
© Copyright Khronos Group, 2009 - Page 6
Advanced Visual Computing
OpenGL-related Ecosystem
WebGL
Leading-edge, cross platform Graphics
Graphics on mobile and embedded devices
General purpose parallel programming
JavaScript Bindings to OpenGL ES 2.0
RoadmapConvergence -
portable 3D content on most any platform
HTML 5
3D Content in any web browser – with no plug-in
CUDAOpenCL
© Copyright Khronos Group, 2009 - Page 7
OpenGL 3.2 at Siggraph 2009
• OpenGL 3.2 and the Shading Language 1.50 announced– Less than 5 months after OpenGL 3.1 / GLSL 1.40 release
• The OpenGL ARB is continuing schedule driven releases– But retaining backwards compatibility for developers
• Three new specs available
4) OpenGL 3.2 with core profile
5) OpenGL 3.2 with compatibility profile
6) GLSL 1.50 specification
http://www.opengl.org/registry
© Copyright Khronos Group, 2009 - Page 8
DirectX 10.1
Accelerating Innovation
• OpenGL ARB Increasing pace of innovation– Three new spec versions in 12 months
– Actual implementations following closely specifications
• OpenGL 3.2 exposes the same level of capability of GPUs as DX 10.0
• OpenGL 3.2 + ARB extensions exposes the same level of GPUs as DX 10.1
2004 2006 2008
OpenGL 2.0 OpenGL 2.1 OpenGL 3.0 OpenGL 3.1
2009
OpenGL 3.2
DirectX 9.0cDirectX 10.0 DirectX 11
20102005 2007
© Copyright Khronos Group, 2009 - Page 9
OpenGL 3 Evolution OpenGL 3 strategy is to bring revolutionary changes to OpenGL
through a rapid sequence of evolutionary updates
Establish New mechanisms to enable OpenGL to respond to diverse market needsDeprecated feature list to prepare for API streamliningOpenCL interop
Remove deprecated functionality to streamline the APIARB_compatibility extension for backwards compatibility
Profiles define streamlined and backwards-compatible API functionalityExtensions expose very latest GPU functionalityIncreased DX portability
IncreasingFunctionality
OpenGL 3.0
OpenGL 3.1
OpenGL 3.2
August 2008 March 2009 August 2009
© Copyright Khronos Group, 2009 - Page 10
OpenGL 3 Modern Buffer-centricProcessing Model
Vertex Array Buffer Object (VAO)
Transform Feedback Buffer
Uniform Buffer Object (UBO)
Pixel Unpack Buffer
Pixel Pack Buffer
Texture Buffer Object (TexBO)
Vertex Puller
Vertex Shading
Geometry Shading
FragmentShading
Texturing
Array Element Buffer
Pixel Pipeline
vertex data
texel data
pixel data
parameter data
glBegin, glDrawElements, etc.
glDrawPixels, glTexImage2D, etc.
glReadPixels,etc.
Framebuffer
© Copyright Khronos Group, 2009 - Page 11
Roadmap Discussion Items• SM5 support (Tessellation, and much more)• Make GLSL a true superset of GLSL ES• Use program objects without linking• Direct State Access• Splitting a texture object into image and sampler object• Shader binaries• Double precision support• Anisotropic filtering• Semantics for attributes/varyings/uniforms• Cross process texture sharing• Sync Objects for tighter OpenCL <-> OpenGL interop• Requests from the developer community …
San Jose, CA | September 30, 2009San Jose, CA | September 30, 2009
A peek ahead : Shader Model 5A peek ahead : Shader Model 5
Shader Model 5
• Performance Features• Programmability enhancements• Enhanced memory access• Tessellation stage
SM5 – Performance Features• Instancing in Geometry Shaders
– Geometry shaders are run multiple times per primitive
• Efficient subroutine support in GLSL– Think of function pointers, but without actual pointers
– Function to call is set by API through "subroutine uniform“
• Multiple vertex streams for XFB– Each stream can have a different frequency
• Arguments for DrawArrayInstanced and DrawElementsInstancedBaseVertex sourced from a buffer object
– Useful for GPU generated work
SM5 – Programmability Enhancements
• Support for double precision in shaders– Most operations now in doubles
• Double support for vertex attributes, uniforms, and XFB output
• New integer instructions– First and last bit set
– Count set bits, Reverse bits
– Bitfield extract and insert
• Support for Indexing Arrays of Samplers
SM5 – Enhanced Memory Access
• Random access load/store/atomic to texels– MemoryBarrier support in GLSL and API
– Explicit support for atomic operations
• New texture compression formats– HDR and LDR support
SM5 - Tessellation
• New shader stages– After Vertex, before Geometry
• Three stages:– Control shader, Primitive Generator, and Evaluation
shader
– Primitive Generator is fixed-function
• Operates on a Patch– New primitive type
– Fixed size collection of vertices and per patch attributes
New SM5 pipeline
Vertex Array Buffer Object (VAO)
Transform Feedback Buffers
Uniform Buffer Object (UBO)
Pixel Unpack Buffer
Pixel Pack Buffer
Texture Buffer Object (TexBO)
Vertex Puller
Vertex Shading
Geometry Shading
FragmentShading
Texturing and image load/store
Array Element Buffer
Pixel Pipeline
vertex data
texel data
pixel data
parameter data
glBegin, glDrawElements, etc.
glDrawPixels, glTexImage2D, etc.
glReadPixels,etc.
Framebuffer
Tessellation
Questions?
Vertex
ShaderCurrent
values Associated data
Primitive
Assembly
Prim. Draw Mode state
Primitive data
(point, line,
triangle, patch)
Rasterpos
(clip, project)
Lighting
Xform
Texgen
Vertex position
(clip coords)
patch
Vertex
position
Primitive data
(point, line,
triangle, patch)
Tessellation control shader
Primitive
Assembly
Per patch data
Vertices Tessellation Evaluation Shader
Tessellation
Primitive Generator
patch
Tess levels
Tess parameters
Primitive data bypass
(u,v,w)
Primitive
Assembly
connectivity
verticesPrimitive data
(vertex pos,
colors, other assoc. data)
Primitive data bypass
More detail – vertex and tessellation
Core Profile
Compatibility
New SM5
Color
Clamping
Geometry
shader
Primitive
Assembly
Primitive mode
Vertex position
Other assoc. data
Colors
Vertex position (clip coords)
Other assoc.
data
Colors
Flat shading
Clipping,
including
color and
associated
data
Perspective Divide
Viewport
transform
Clip
coords
Final color
processingOther assoc. data
Front /
Back
Face
selectionColors
Normalized
Coords
Window
Coords
User clip
planes
Bypass to stream 0
Transform
feedback
Stream 3
Stream 2
Stream 1
Stream 0
Primitive data
(vertex pos,
colors, other assoc. data)
Buffer object
Binding points
Stream 0
More detail – geometry and follow-on
To Rasterization
Core Profile
Compatibility
New SM5