OpenGL Ecosystem BOF - SIGGRAPH 2014

1,683 views
1,433 views

Published on

0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,683
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
30
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

OpenGL Ecosystem BOF - SIGGRAPH 2014

  1. 1. © Copyright Khronos Group 2014 - Page 1 Vancouver SIGGRAPH 2014
  2. 2. © Copyright Khronos Group 2014 - Page 2 Outline • Ecosystem Overview - Neil Trevett (NVIDIA) • What’s new in OpenGL - Barthold Lichtenbelt (NVIDIA) - Bill Licea-Kane (Qualcomm) • What’s new in OpenGL ES - Tom Olson (ARM) - Demos (Rightware, NVIDIA, Kishonti) • Next Generation OpenGL Initiative - Tom Olson (ARM) - Special guests • Party!
  3. 3. © Copyright Khronos Group 2014 - Page 3 Neil Trevett VP Mobile Ecosystem, NVIDIA | President, Khronos Vancouver SIGGRAPH 2014
  4. 4. Khronos Connects Software to Silicon © Copyright Khronos Group 2014 - Page 4 Open Consortium creating ROYALTY-FREE, OPEN STANDARD APIs for hardware acceleration Defining the roadmap for low-level silicon interfaces needed on every platform Graphics, compute, rich media, vision, sensor and camera processing Rigorous specifications AND conformance tests for cross-vendor portability Acceleration APIs BY the Industry FOR the Industry Well over a BILLION people use Khronos APIs Every Day…
  5. 5. Access to 3D on Over 2 BILLION Devices © Copyright Khronos Group 2014 - Page 5 300M Desktops / year 1.9B Mobiles / year 1B Browsers / year Source: Gartner (December 2013)
  6. 6. © Copyright Khronos Group 2014 - Page 6 Pervasive WebGL • WebGL on EVERY major desktop browser - And coming to all major mobile browsers • Portable (NO source change) 3D applications are possible for the first time http://caniuse.com/#feat=webgl
  7. 7. © Copyright Khronos Group 2014 - Page 7 Next Generation OpenGL Initiative Platform Diversity Increasing - Need for cross-platform standards increasing After twenty two years – need ground up design of API for high-efficiency access to graphics and compute on modern GPUs
  8. 8. One OS All Modern Platforms and GPUs © Copyright Khronos Group 2014 - Page 8 Cross Platform Challenge One family of GPUs One GPU on one OS Participation of key players Proven IP Framework Battle-tested cooperative model The drive to not let the 3D industry fragment
  9. 9. © Copyright Khronos Group 2014 - Page 9 Portability Streamlined API is easier to implement and test Cross-vendor Portability Standard intermediate language improves shader program portability and reduces driver complexity Enhanced conformance testing methodology WebGL 1.0.2 doubles conformance tests over 1.0.1 ~21200 vs. ~8900 1.0.3 suite will contain ~20% more tests Most contributed by community
  10. 10. Next Generation OpenGL Initiative • Fast-paced work on detailed proposals and designs are already underway • NOT your father’s multi-year design-by-committee process • Goal to unify OpenGL and OpenGL ES – hence one BOF! • If this new API relevant to your business – PLEASE JOIN! © Copyright Khronos Group 2014 - Page 10 Modern GPU API Design Cross platform Open Standard Next Generation OpenGL True Cross-vendor Portability
  11. 11. BOF SIGGRAPH 2014 Barthold Lichtenbelt OpenGL ARB chair © Copyright Khronos Group 2014 - Page 11
  12. 12. Announcing 4.5 © Copyright Khronos Group 2014 - Page 12
  13. 13. OpenGL 4.5 OpenGL 4.4 OpenGL 4.3 © Copyright Khronos Group 2014 - Page 13 OpenGL 4.2 DirectX 11.1 Continuing OpenGL Innovation Bringing state-of-the-art functionality to cross-platform graphics OpenGL 4.1 OpenGL 3.3/4.0 OpenGL 3.2 OpenGL 3.1 OpenGL 2.0 OpenGL 2.1 OpenGL 3.0 2004 2005 2006 2007 2008 2009 2010 2011 DirectX 10.1 DirectX 9.0c DirectX 10.0 DirectX 11 2012 2013 2014 DirectX 11.2
  14. 14. Twitter Feedback ExtremeTech • OpenGL 4.5 released, next-gen OpenGL unveiled: Cross-platform Mantle killer, DX12 competitor bit.ly/1sO7JzX © Copyright Khronos Group 2014 - Page 14 pjcozzi • Big things are happening with OpenGL! khronos.org/news/press/khr… @thekhronosgroup Aras Pranckevičius @aras_p • New GL_ARB_direct_state_access is good. Awesome work @g_truc and @grahamsellers!
  15. 15. © Copyright Khronos Group 2014 - Page 15 More Feedback esmittramirez • Opengl 4.5, compat y glsl 4.5!! amazing, ahora a seguir leyendo las novedades (que de hecho no son novedades sino chismes ya oficializados) phosphor112 • #OpenGL 4.5? YEAAAAH BUDDY! @thekhronosgroup
  16. 16. © Copyright Khronos Group 2014 - Page 16 OpenGL Ecosystem News • Epic’s Unreal Engine 4 supports OpenGL 4 - Tessellation, Compute shaders, more • OpenGL Extension Wrangler (GLEW) supports OGL 4.5 - Release 1.11.0 has OpenGL 4.5 support - http://glew.sourceforge.net/ • Regal updated to OpenGL 4.5 support - https://github.com/p3/regal • VOGL updated - now supports Windows • GLIntercept 1.3 with full OpenGL 4.4 all ARB extensions - https://code.google.com/p/glintercept/ • New version of the OpenGL Hardware database - 274 devices listed to date. - http://delphigl.de/glcapsviewer/listreports2.php •
  17. 17. Tools for Looking at Performance Bottlenecks © Copyright Khronos Group 2014 - Page 17 • AMD - AMD PerfStudio 2 - http://developer.amd.com/tools-and-sdks/graphics-development/gpu-perfstudio-2/ - AMD GPUperfAPI - http://developer.amd.com/tools-and-sdks/graphics-development/gpuperfapi/ - AMD GPU Shader Analyzer - http://developer.amd.com/tools-and-sdks/graphics-development/gpu-shaderanalyzer/ • Intel - Intel GPA - https://software.intel.com/en-us/vcsource/tools/intel-gpa • NVIDIA - NVIDIA PerfKit - https://developer.nvidia.com/nvidia-perfkit - NVIDIA NSIGHT - https://developer.nvidia.com/nvidia-nsight-visual-studio-edition
  18. 18. Glslang Reference Validator • Virtually all of ESSL 3.1 • Compute shaders (minus arrays of arrays, coming soon…) • Images (load/store/atomics, formats, memory qualifiers/barrier) • Atomic Counters • Shader Storage Buffer Objects • Texture Gather • Texture LOD • Separate Shader Objects • 420 Shading Pack completed • All GLSL 4.5-specific features • Others $ glslangValidator test.comp ERROR: 0:3: 'local_size' : too large; see gl_MaxComputeWorkGroupSize ERROR: 1 compilation errors. No code generated. © Copyright Khronos Group 2014 - Page 18 test.comp #version 310 es layout(local_size_z = 1000) in; void main() { barrier(); }
  19. 19. © Copyright Khronos Group 2014 - Page 19 Tools for Performance Analysis • AMD - AMD PerfStudio 2 http://developer.amd.com/tools-and-sdks/graphics-development/gpu-perfstudio-2/ - AMD GPUperfAPI http://developer.amd.com/tools-and-sdks/graphics-development/gpuperfapi/ - AMD GPU Shader Analyzer http://developer.amd.com/tools-and-sdks/graphics-development/gpu-shaderanalyzer/ • Intel - Intel GPA https://software.intel.com/en-us/vcsource/tools/intel-gpa • NVIDIA - NVIDIA PerfKit https://developer.nvidia.com/nvidia-perfkit - NVIDIA NSIGHT https://developer.nvidia.com/nvidia-nsight-visual-studio-edition
  20. 20. OpenGL Conformance Tests! • Conformance submissions required for GL 4.4 and 4.5 implementations © Copyright Khronos Group 2014 - Page 20 - Encouraged for earlier driver versions • Continued improvements to the code - Significant OpenGL 4.4 coverage added - OpenGL 4.5 coverage in progress • Shared codebase with OpenGL ES 3.1 CTS - Additional desktop-specific tests
  21. 21. © Copyright Khronos Group 2014 - Page 21 OpenGL 4.5 reference pages Thanks to Dominic Witczak and Jon Leech!
  22. 22. © Copyright Khronos Group 2014 - Page 22 OpenGL 4.5 Reference Cards
  23. 23. © Copyright Khronos Group 2014 - Page 23 What is New in OpenGL 4.5? • Direct State Access (DSA) - Assessors for objects, enabling state to be queried and modified directly • Robustness - Providing a secure platform for applications such as WebGL browsers, including preventing a GPU reset affecting any other running applications • DirectX11 emulation features - Easier porting of applications between OpenGL and Direct3D • OpenGL ES 3.1 API and shader compatibility - Enables easy development and execution of OpenGL ES applications on desktop • Faster MakeCurrent - Explicit control over context flush behavior • Texture Barrier - Avoid read-after-write hazards
  24. 24. © Copyright Khronos Group 2014 - Page 24 What is New in GLSL 4.5? • ARB_derivative_control - Control spatial granularity of derivative computation • ARB_shader_texture_image_samples - Allow shaders to query the number of samples of a texture - textureSamples(), imageSamples() • ARB_cull_distance - adds a new GLSL gl_CullDistance shader output, similar to gl_ClipDistance, but used for whole primitive culling
  25. 25. © Copyright Khronos Group 2014 - Page 25 New OpenGL ARB extensions • ARB_sparse_buffer - Similar functionality to ARB_sparse_texture but for buffer objects • ARB_pipeline_statistics_query - Query statistics about different parts of the OpenGL pipeline - DirectX 11 compatibility • ARB_transform_feedback_overflow_query - Query if a transformfeedback buffer overflowed - For one or more streams - DirectX 11 compatibility
  26. 26. © Copyright Khronos Group 2014 - Page 26 OpenGL 4.5 – DirectX11 emulation • ARB_conditional_render_inverted - Add mode to BeginConditinalRender to invert the condition to draw, or not • ARB_get_texture_subimage - Retrieve sub-regions of textures • ARB_clip_control - Match D3D coordinate system - Improve numerical precision of Z coordinate mapping
  27. 27. OpenGL 4.5 – OpenGL ES 3.1 Compatibility • ARB_ES3_1_compatibility - Add MemoryBarrierRegion API - Increase minimum SSBO size to 2^27 - Support GLSL ES version 310 - Add imageAtomicExchange for r32f FP images - Extend mix() to select between int, uint and bool - Add GLSL built-in fragment shader input : gl_HelperInvocation - Add GLSL built-in constants © Copyright Khronos Group 2014 - Page 27 - gl_MaxSamples, gl_Max*ImageUniforms, gl_MaxCombinedShaderOutputResources - Add coherent qualifier to all memory variables for atomic* and imageAtomic*
  28. 28. © Copyright Khronos Group 2014 - Page 28 Direct State Access Before DSA void Texture2D::SetMagFilter(GLenum filter) { GLuint oldTex; glGetIntegerv(GL_TEXTURE_BINDING_2D, &oldTex); glBindTexture(GL_TEXTURE_2D, m_tex); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter); glBindTexture(GL_TEXTURE_2D, oldTex); } After DSA void Texture2D::SetMagFilter(Glenum filter) { glTextureParameteri(m_tex, GL_TEXTURE_MAG_FILTER, filter); }
  29. 29. © Copyright Khronos Group 2014 - Page 29 Direct State Access Before DSA glBindFramebuffer(GL_DRAW_FRAMEBUFFER, msFBO); DrawStuff(); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, nonMsFBO); glBindFramebuffer(GL_READ_FRAMEBUFFER, msFBO); glBlitFramebuffer(...); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, msFBO); After DSA glBindFramebuffer(GL_DRAW_FRAMEBUFFER, msFBO); DrawStuff(); glBlitNamedFramebuffer(msFBO, nonMsFBO, ...);
  30. 30. Differences with EXT_direct_state_access • Only OpenGL 4.5 Core functionality supported • Some minor name changes to some functions © Copyright Khronos Group 2014 - Page 30 - Mostly the same, but drops EXT suffix - TextureParameterfEXT -> TextureParameterf - VAO function names shortened - glVertexArrayVertexBindingDivisorEXT-> glVertexArrayBindingDivisor - Texture functions no longer require a target parameter - Target comes from glCreateTextures(<target>,) - Use “3D” functions with CUBE_MAP where z specifies the face • DSA functions can no longer create objects - Use glCreate* functions to create name and object at once
  31. 31. Texture Barrier programmable blending • programmable blending with non-self-overlapping draw calls © Copyright Khronos Group 2014 - Page 31 - Bind texture as a render target and for texturing glBindTexture(GL_TEXTURE_2D, tex); glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, tex, 0); dirtybbox.empty(); foreach (object in scene) { if (dirtybbox.overlaps(object.bbox())) { glTextureBarrier(); dirtybbox.empty(); } object.draw(); dirtybbox = bound(dirtybbox, object.bbox()); }
  32. 32. © Copyright Khronos Group 2014 - Page 32 Robustness • ARB_robustness functionality now part of OpenGL 4.5 - Called KHR_robustness for use with OpenGL ES too - Does not include compatibility functions • Adds “safe” APIs for queries that return data to user pointers • Adds mechanism for app to learn about GPU resets - Due to my app or some other misbehaving app • Stronger out-of-bounds behavior - No more undefined behavior • Used by WebGL implementations
  33. 33. © Copyright Khronos Group 2014 - Page 33 Robustness safe API example Before Robustness GLubyte tooSmall[NOT_BIG_ENOUGH]; glReadPixels(0, 0, H, W, GL_RGBA, GL_UNSIGNED_BYTE, tooSmall); // CRASH After Robustness GLubyte tooSmall[NOT_BIG_ENOUGH]; glReadnPixels(0, 0, H, W, GL_RGBA, GL_UNSIGNED_BYTE, sizeof tooSmall, tooSmall); // No CRASH, glGetError() returns INVALID_OPERATION
  34. 34. Robustness Reset Notification example • Typical render loop with reset check © Copyright Khronos Group 2014 - Page 34 while (!quit) { DrawStuff(); SwapBuffers(); if (glGetGraphicsResetStatus() != GL_NO_ERROR) { quit = true; } } DestroyContext(glrc);
  35. 35. © Copyright Khronos Group 2014 - Page 35 Faster MakeCurrent • An implicit glFlush is called on MakeCurrent - Makes switching contexts slow • New WGL and GLX extensions allow glFlush to be skipped - Commands wait in context queue - App has more control over flush • Can provide significant MakeCurrent performance boost StartTimer(); for (int i = 0; i < iterations; ++i) { DrawSimpleTriangle(); wglMakeCurrent(context[i % 2]); } StopTimer();
  36. 36. ARB_cull_distance • Adds new gl_CullDistance to Vertex, Tessellation, and Geometry shaders • Like gl_ClipDistance except when any vertex has negative distance whole primitive is culled gl_ClipDistance gl_CullDistance © Copyright Khronos Group 2014 - Page 36 Clipping Plane Negative gl_ClipDistance Positive gl_ClipDistance Clipped Clipping Plane Negative gl_CullDistance Positive gl_CullDistance Culled
  37. 37. GLSL derivative Control • Adds “coarse” and “fine” variant of GLSL derivative functions •dFdxCoarse, dFdyCoarse © Copyright Khronos Group 2014 - Page 37 - Potentially faster performance •dFdxFine, dFdyFine - More correct - Default behavior of old dFdx and dFdy functions •fwidthCoarse and fwidthFine are also added 2x2 Quad Fragment dFdxCoarse = = 2x2 Quad Fragment = dFdxFine = dFdxFine
  38. 38. Direct State Access © Copyright Khronos Group 2014 - Page 38 Get Texture Sub Image • Like glGetTexImage, but now you can read a sub-region •glGetTextureSubImage() - DSA only variant void GetTextureSubImage(uint texture, int level, int xoffset, int yoffset, int zoffset, sizei width, sizei height, sizei depth, enum format, enum type, sizei bufSize, void * pixels); Robustness pixels yoffset xoffset width height
  39. 39. ARB_sparse_buffer • Have large buffer objects without the whole buffer being resident © Copyright Khronos Group 2014 - Page 39 - Analogous to ARB_sparse_texture for buffer objects - Application controls page residency Create uncommitted buffer: glBufferStorage(,SPARSE_STORAGE_BIT_ARB) GL_SPARSE_BUFFER_PAGE_SIZE_ARB Make pages resident: glBufferPageCommitmentARB(, offset, size, GL_TRUE); offset size
  40. 40. © Copyright Khronos Group 2014 - Page 40 New OpenGL ARB extensions • ARB_sparse_buffer - Similar functionality to ARB_sparse_texture but for buffer objects • ARB_pipeline_statistics_query - Query statistics about different parts of the OpenGL pipeline - DirectX 11 compatibility • ARB_transform_feedback_overflow_query - Query if a transformfeedback buffer overflowed - For one or more streams - DirectX 11 compatibility
  41. 41. © Copyright Khronos Group 2014 - Page 41 OpenGL 4.5 – DirectX11 portability • ARB_conditional_render_inverted - Add mode to BeginConditinalRender to invert the condition to draw, or not • ARB_get_texture_subimage - Retrieve sub-regions of textures • ARB_clip_control - Match D3D coordinate system - Improve numerical precision of Z coordinate mapping
  42. 42. OpenGL 4.5 – OpenGL ES 3.1 compatibility • ARB_ES3_1_compatibility - Add MemoryBarrierRegion API - Increase minimum SSBO size to 2^27 - Support GLSL ES version 310 - Add imageAtomicExchange for r32f FP images - Extend mix() to select between int, uint and bool - Add GLSL built-in fragment shader input : gl_HelperInvocation - Add GLSL built-in constants © Copyright Khronos Group 2014 - Page 42 - gl_MaxSamples, gl_Max*ImageUniforms, gl_MaxCombinedShaderOutputResources - Add coherent qualifier to all memory variables for atomic* and imageAtomic*
  43. 43. Win a book at the party... © Copyright Khronos Group 2014 - Page 43
  44. 44. What’s New in OpenGL ES © Copyright Khronos Group 2014 - Page 44 Tom Olson Director of Graphics Research, ARM Chair, OpenGL ES Working Group
  45. 45. © Copyright Khronos Group 2014 - Page 45 Outline • Where we are today (Tom Olson, ARM) • OpenGL ES 3.1 Overview (Bill Licea-Kane, Qualcomm) • OpenGL ES 3.x rollout (Tom again) • Demos (Members) - Basemark OS II OpenGL ES 3.1 (Arto Ruotsalainen, Rightware) - NVIDIA: OpenGL ES 3.1 + Android Extension Pack (Neil Trevett, NVIDIA) - GFXBench Car Chase Preview (Laszlo Kishonti, Kishonti Informatics)
  46. 46. OpenGL ES Devices Shipped 1.6 2015 © Copyright Khronos Group 2014 - Page 46 It’s been a good 10* years! • SIGGRAPH 2007: 15 million devices sold! • SIGGRAPH 2008: 54 million… • Where are we today? 2 1.5 1 0.5 0 1.1 2013 1.4 2014 Units (Billions) OpenGL ES is the most widely deployed 3D API in history *For large values of 10
  47. 47. © Copyright Khronos Group 2014 - Page 47 The Story So Far 2002 Working Group Formed 2003 1.0 2004 1.1 • What’s new since SIGGRAPH 2013? - Release of ES 3.1 at GDC - Conformance test upgrades - Ecosystem evolution 2007 2.0 2012 3.0 2014 3.1 Driver Update Silicon Update Silicon Update Driver Update
  48. 48. © Copyright Khronos Group 2014 - Page 48 OpenGL ES 3.1 Goals • Bring appropriate features of desktop OpenGL 4.x to mobile devices - Game-changing functionality: compute shaders, indirect drawing - Other advanced features, support for modern programming styles • Enable very rapid adoption - Expose hidden capabilities of current devices - Backward compatible with ES 2.0/3.0 - Run on any OpenGL ES 3.0 hardware • Improve application portability - Tighter specs means less undefined behavior - Ever stricter conformance testing
  49. 49. OpenGL ES 3.1 Overview © Copyright Khronos Group 2014 - Page 49 Bill Licea-Kane, Qualcomm Technologies, Inc. Shading Language Chair
  50. 50. © Copyright Khronos Group 2014 - Page 50 OpenGL ES 3.1 • Compute shaders - Tightly coupled graphics and GPU computing • Draw-Indirect - Draw command parameters from memory instead of from arguments • Separate Shader Object (SSO) - Mix and match graphics shaders • New shading language features • New Texture features
  51. 51. © Copyright Khronos Group 2014 - Page 51 Compute Shader Basics • Use the power of the GPU for general purpose computing - New single-stage pipeline, separate from the graphics pipeline • OpenGL ES graphics pipeline - Implicitly creates a thread per vertex and a thread per fragment - All thread input / output data routing and synchronization is done for you • OpenGL ES compute pipeline - Explicitly creates a thread per point on an integer lattice - Data input, result output, and synchronization are all explicit Image processing Wave Simulation AI Simulation Global Illumination Ray Tracing
  52. 52. © Copyright Khronos Group 2014 - Page 52 Compute Shader Components • New shader type and dispatch call - glDispatchCompute() • Shader Storage Buffer Objects (SSBOs) - Essentially writeable UBOs; minimum max size is 128MB - Accessible via explicit load/store or atomics • Images - Like textures, but writeable as well as readable - Every implementation provides at least four image binding points - Image atomics available as an extension • Serialization and synchronization primitives - Atomic counters - Shader Memory barriers - API Memory barriers
  53. 53. © Copyright Khronos Group 2014 - Page 53 Draw-Indirect • A new way to dispatch work on the GPU - Draw call parameters stored in GPU memory - glDrawArraysIndirect() - glDrawElementsIndirect() - glDispatchComputeIndirect() • Useful for draw parameters set by GPU - …for example, in a compute shader - Eliminate CPU/GPU synchronization point
  54. 54. indirect offset © Copyright Khronos Group 2014 - Page 54 Draw-Indirect • A new way to dispatch work on the GPU - Draw call parameters stored in GPU memory - glDrawArraysIndirect() - glDrawElementsIndirect() - glDispatchComputeIndirect() • Useful for draw parameters set by GPU - …for example, in a compute shader - Eliminate CPU/GPU synchronization point glDrawArraysIndirect(mode, indirect); GPU buffer object struct { uint count; uint instanceCount; uint first; uint mustBeZero; } DrawArraysIndirectCommand;
  55. 55. © Copyright Khronos Group 2014 - Page 55 Separate Shader Objects •MIX and MATCH vertex shaders and fragment shaders
  56. 56. © Copyright Khronos Group 2014 - Page 56 Texture Features •Multisampled Textures • Stencil Textures • Texture Gather
  57. 57. © Copyright Khronos Group 2014 - Page 57 Shading Language Features • Arrays of arrays - int a[2][3][4]; • Explicit uniform location - layout(location=0) in vec4 position; // vertex shader example - layout(location=2) out vec4 diffuse; // fragment shader example • Shader bitfield ops - Extract, Insert, Reverse, pack/unpack, Count, LSB, MSB, - Extended precision support - frexp / ldexp • Shader helper invocation - bool gl_HelperInvocation
  58. 58. OpenGL ES 3.x Ecosystem Rollout © Copyright Khronos Group 2014 - Page 58 Tom Olson, ARM GL Common TSG chair
  59. 59. © Copyright Khronos Group 2014 - Page 59 Ecosystem Rollout: OpenGL ES 3.0 • Implementations from every major mobile GPU vendor - Tools, documentation, sdks, etc. • Platform support - Exposed in iOS 7, supported on iPhone 5s + recent iPads - Exposed in Android 4.3 and subsequent versions • Adoption is progressing - E.g. Unity mobile survey: from 8% to 21% http://stats.unity3d.com/mobile/index.html
  60. 60. © Copyright Khronos Group 2014 - Page 60 Ecosystem Rollout: OpenGL ES 3.1 • Documentation - Specifications and man pages at http://www.khronos.org • SDKs, emulators, tools from multiple vendors - Imagination Technologies - http://community.imgtec.com/developers/powervr/ - NVIDIA - https://developer.nvidia.com/content/tegra-android-development-pack-3_0r2- released-start-developing-nvidia-shield-tablet-now - Qualcomm - https://developer.qualcomm.com/mobile-development/maximize-hardware/mobile-gaming- graphics-adreno/tools-and-resources • Platform support - Will be exposed in Android L (selected devices) - Added functionality: ‘Android extension pack’, ASTC textures, etc.
  61. 61. © Copyright Khronos Group 2014 - Page 61 Conformance Test Improvements • Updated ES 3.0 conformance (version 3.0.2.0) released in January 2014 - Substantial increase in test coverage - Adds subset of dEQP language tests (thanks drawElements Oy!) • ES 3.1 conformance is live as of 6 June 2014 - Directed tests for all features added in ES 3.1 - Thirteen submissions received to date - Mobile parts from ARM, Imagination, Intel, NVIDIA, Qualcomm, Vivante - Desktop drivers from Intel, NVIDIA
  62. 62. #version 310 es layout(local_size_z = 1000) in; © Copyright Khronos Group 2014 - Page 62 Reference compiler • Now supports virtually all of GLSL ES 3.1 • Compute shaders - (minus arrays of arrays, coming soon) • Images • Atomic Counters • SSBOs • Texture Gather • Texture LOD • SSO • …and more test.comp void main() { barrier(); } $ glslangValidator test.comp ERROR: 0:3: 'local_size' : too large; see gl_MaxComputeWorkGroupSize ERROR: 1 compilation errors. No code generated. See: http://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
  63. 63. Basemark OS II OpenGL ES 3.1 © Copyright Khronos Group 2014 - Page 63 Arto Ruotsalainen, Rightware
  64. 64. © Copyright Khronos Group 2014 - Page 64 OpenGL ES 3.1 + AEP Neil Trevett, NVIDIA Khronos President
  65. 65. Google Android Extension Pack (AEP) • Android L mandates OpenGL ES 3.1 © Copyright Khronos Group 2014 - Page 65 - On every device • Android Extension Pack (AEP) - Set of OpenGL ES 3.1 extensions accessible through a single query • AEP includes OpenGL AAA gaming functionality - Tessellation - Geometry shaders - ASTC Texture Compression + more… - https://www.khronos.org/registry/gles/extensions/ANDROID/ANDROID_extension_pack_es31a.txt • Enables AAA graphics effects - Global Illumination - Physically-based shading - Deferred rendering - HDR tone mapping - Smoke and particle effects Epic’s Rivalry demo using full Unreal Engine 4 Running in real-time on NVIDIA Tegra K1 with OpenGL ES 3.1 + AEP https://www.youtube.com/watch?v=jRr-G95GdaM
  66. 66. © Copyright Khronos Group 2014 - Page 66 Benchmark Previews Laszlo Kishonti, Kishonti Informatics
  67. 67. Next Generation OpenGL Initiative © Copyright Khronos Group 2014 - Page 67 Tom Olson, ARM GL Common TSG chair
  68. 68. © Copyright Khronos Group 2014 - Page 68 OpenGL is a huge success http://time.com/2821769/directx-apple-metal-opengl/
  69. 69. © Copyright Khronos Group 2014 - Page 69 OpenGL needs to change http://richg42.blogspot.com/2014/05/things-that-drive-me-nuts-about-opengl.html
  70. 70. Problems with OpenGL today • Programming model doesn’t match architecture of modern GPUs © Copyright Khronos Group 2014 - Page 70 - Especially in mobile • Arcane and archaic syntax - Twenty years of legacy cruft - Needless complexity • CPU intensive - State validation, dependency tracking, error checking - Hard to predict where CPU load will occur – varies with implementation • Not multicore-CPU-friendly - Primitive threading model, inconsistently implemented • Implementation variability - Spec looseness, performance variation, driver bugs
  71. 71. http://www.tankgirl.info/tankgirl/images/flick/tradingCards/89f.jpg © Copyright Khronos Group 2014 - Page 71 Incremental change is not enough https://www.flickr.com/photos/noaaphotolib/5015135752/in/photostream/ • GL has a good track record of adaptive evolution • …but structural problems can’t be fixed by accretion
  72. 72. Next Generation OpenGL Initiative • An open-standard, cross-platform 3D+compute API for the modern era © Copyright Khronos Group 2014 - Page 72 - Compatibility break with OpenGL - Start from first principles • Goals - Clean, modern architecture - Multi-thread / multicore-friendly - Greatly reduced CPU overhead - Architecture-neutral – full support for tile-based as well as direct renderers - Predictable performance - Improved reliability and consistency between implementations • Key design principle: explicit control - Application is expected to tell the driver what it wants
  73. 73. Status • Organized as a joint project of ARB and OpenGL ES working groups - Chair: Tom Olson (ARM) - Language / IL group chair: Bill Licea-Kane (Qualcomm) - API spec editors: Graham Sellers (AMD) and Jeff Bolz (NVIDIA) © Copyright Khronos Group 2014 - Page 73 • Working at very high intensity since June - Very significant proposals and IP contributions received from members • Have committed to adopting a portable intermediate language (IL) for shaders - Long-standing request from ISVs - Allows improved shader reliability and portability - Good target for machine-generated shaders and specialized HLLs - Provides a measure of IP protection for shaders
  74. 74. Who’s on board? • Participants come from all segments of the graphics industry - Including an unprecedented level of participation from game engine ISVs - Making rapid progress - New members are always welcome © Copyright Khronos Group 2014 - Page 74 Apple
  75. 75. OpenGL ecosystem support in Unity Christophe Riccio, OpenGL Addict
  76. 76. Democratizing games development and success
  77. 77. A word from another of the team members… We are super excited to contribute and work with the Next Generation OpenGL Initiative, and bring our experience of low-overhead and explicit graphics APIs to build an efficient standard for multiple platforms and vendors in Khronos. This work is of critical importance to get the most out of modern GPUs on both mobile and desktop, and to make it easier to develop advanced and efficient 3D applications – enabling us to build amazing future games with Frostbite on all platforms. - Johan Andersson, Technical Director, Frostbite – Electronic Arts
  78. 78. Monument Valley by ustwo • iOS • Puzzle game • Multidisciplinary design agency Unity benefits: • Ease-of-use for the whole team • Easy cross-platform production • Custom editor scripts • Unity Profiler
  79. 79. Why OpenGL?
  80. 80. ♥ ♥ Why OpenGL? ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥
  81. 81. Unity Multiplatform deployment
  82. 82. Platform using on the OpenGL back-end
  83. 83. OpenGL is an ecosystem • WebGL • OpenGL ES • OpenGL desktop
  84. 84. OpenGL drivers support www.g-truc.net
  85. 85. Exposed extensions to all OpenGL 4 hardware on the last drivers available to date
  86. 86. What about effective support?
  87. 87. Re-evaluation the OpenGL implementations
  88. 88. The current ecosystem in Unity
  89. 89. OpenGL convergence • Extensions: - GL_ARB_ES2_compatibility - GL_ARB_ES3_compatibility - GL_ARB_ES3_1_compatibility • ES profile on desktop - WGL/GLX_EXT_create_context_es_profile • EGL on desktop - This is the ultimate goal but the ecosystem is still W.I.P. - Software Emulators There is at least one solution is available on each platform
  90. 90. OpenGL convergence A mix of feature levels and capabilities flags Feature levels, essentially driven by our shader pipeline: • OpenGL ES 2.0 / WebGL • OpenGL ES 3.0 / OpenGL 3.2 • OpenGL ES 3.1 / OpenGL 4.3 or OpenGL 4.2 + compute shader stuff “Player” base level: ES 2.0 / “Editor” base level: GL 3.2 The “subtleties” between the level: Handled by capabilities.
  91. 91. Resolve difference between OpenGL versions Skipping due to time constraints It can be essentially resolve at initialization time or compilation time • Capabilities: Initialized at initialization time • Translation tables: from engine enums to appropriate OpenGL enums • #ifdef to remove code on platform that can’t possibly run something
  92. 92. Working around drivers bugs • Part of the capability flags: Disable the capability if it is buggy - Micro managing bugs doesn’t scale • Fallback to lower feature level - If GL4 feature level doesn’t work, use GL3. If GL3 doesn’t work use GL2 • Have shader fallbacks - We are going as far as showing a pink shaders • Document the bug workarounds: Platform, vendor, what’s wrong - They will be a point where no body remember why this ugly workaround is here - They will be a point where that workaround should be removed because not useful anymore Skipping due to time constraints
  93. 93. “Pro tips” Skipping due to time constraints • Working on desktop OpenGL? - Have AMD, Intel and NVIDIA GPUs in your dev machine all the time - Plug a screen per GPU - Change main display to select a different GPU • Starts from OpenGL ES to OpenGL desktop - Convergence is ensured by desktop the OpenGL specifications - Use a single OpenGL back-end to avoid divergence • Document drivers bugs and workaround in your code - Otherwise we won’t know when we could discard workaround! • Have an automated graphics tests farm • Use (or implement!) KHR_debug • Thread the OpenGL back-end
  94. 94. The next ecosystem
  95. 95. The next ecosystem “♫ Everything is awesome ♪” The Lego Movie, 2014 ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♪ ♪ ♪ ♪ ♪ ♪ ♪ ♪ ♪ ♪ ♪ ♪ ♪ ♪ ♪ ♪ ♫ ♫
  96. 96. Unity in numbers: • 600,000 + monthly active users • 750,000 + registered Asset Store users • Close to 3 million registered developers • Real time graphics is not a matter of a few millions people anymore • A potential target is 6 billions people
  97. 97. Engine Asset Store Learn The Community Cloud services Support
  98. 98. Solving issues globally (Instead of individually) • Dealing with issues individually (current OpenGL ecosystem): - Per-vendor - Other programmers will hit the same issues - N => 1 relation • Dealing with issues globally: - A programmer reports one issue, it propagates to all programmers and vendors - 1 => N relation • Example of globally solving issues: WebGL conformance test - Open sourced - Users can submit tests - WebGL platforms are reliable! (We don’t have per platform wordaround flags!)
  99. 99. Intermediate Shading Language • With current GLSL: - 4 ES versions ! - 8 core profile versions !! - 12 compatibility profile versions !!! • Issue 1: GLSL couples syntax sugar and hardware features • Issue 2: Vendors don’t fix some issues to avoid breaking current software How do we deal with this in our shader compilation pipeline?
  100. 100. Example of a current shader pipeline
  101. 101. Wish shader pipeline
  102. 102. Bigger wish shader pipeline
  103. 103. "Relevance" of ecosystems per platform
  104. 104. Special thanks to: • Engine representatives at Khronos: - Timothy Lottes (Epic) - John McDonald (Valve) - Patrick Doane (Blizzard) - Johan Andersson (Frostbite) • Aras Pranckevičius (Graphics Plumber at Unity) - “Ship it!” • The OpenGL community - Ask your hardware vendors and platform vendors for roadmaps, show your interest!
  105. 105. Join and contribute!
  106. 106. Valve <3s Open Standards John McDonald
  107. 107. Open Technologies are Critical  Over the past few years, Valve has opened or released:  Steam for Linux  Steam Runtime  SteamOS  VOGL  And has contributed funding to the development of:  Glslang  LunarGLASS / LunarGOO 700 600 500 400 300 200 100 0 Steam Titles on Linux
  108. 108. Portal on Android  Partnered with NVIDIA to release Portal on NVIDIA Shield  Uses OGL ES 2.x for rendering  Full desktop assets  Currently has 4.8 stars on Play Store
  109. 109. Graphics Today  Direct3D is the primary used graphics API for desktop gaming  Available only on Windows  Tied to OS version—D3D10/11 are Vista+
  110. 110. OpenGL Today  Available on Windows, OSX & Linux  ES is available on ~100% of mobile  Developers can target HW features  Significant performance advantages over D3D
  111. 111. glnext is shaping up to be amazing  glnext will have the expected features and control of a modern API  And the portability story of OpenGL  OpenGL is already a critically important component of SteamOS  We fully anticipate that glnext will continue this tradition.
  112. 112. © Copyright Khronos Group 2014 - Page 113 Questions?

×