ANGLE Portable OpenGL (ES)
Jamie Madill / July 31, 2019 ANGLE is an OpenGL driver that.. ● Translates OpenGL to native commands on multiple major OSes. ● Gives portable OpenGLby working around driver bugs. ANGLE has billions of users! ● Several popular browsers use ANGLE for Code is like a layer cake.
Application
Entry Points
GL Validation GL Context ANGLE
Front-End (State Tracking)
GL Back-End Vk Back-End D3D Back-End
Validation Vulkan LVL Debug Runtime Driver GL Driver Vulkan Driver D3D Driver Slicing the layers
angle::Result Buffer::bufferData(Context *context, BufferBinding target, const void *data, Entry Points GLsizeiptr size, BufferUsage usage) { GL Validation GL Context ANGLE_TRY(mImpl->setData(context, target, data, size, usage));
Front-End (State Tracking) mIndexRangeCache.clear(); mState.mUsage = usage; mState.mSize = size; GL Back-End Vk Back-End D3D Back-End
onStateChange(angle::SubjectMessage::SubjectChanged);
return angle::Result::Continue; } Slicing the layers
angle::Result BufferVk::setData(const gl::Context *context, gl::BufferBinding target, Entry Points const void *data, size_t size, gl::BufferUsage usage) GL Validation GL Context { ContextVk *contextVk = vk::GetImpl(context); Front-End (State Tracking) if (size > static_cast
VkBufferCreateInfo createInfo = { /* ... */ }; ANGLE_TRY(mBuffer.init(contextVk, createInfo, kMemoryPropertyFlags)); } if (data && size > 0) { ANGLE_TRY(setDataImpl(contextVk, data, size, 0)); } return angle::Result::Continue; } What’s next: Android
○ Vendors must supportlegacy GL drivers. ○ They also must support theVulkan API.
Vendor “A” Vendor “B”
Vendor “C” Vendor “D” What’s next: Android
○ Focus on high quality Vulkan drivers with GL emulation.
ANGLE Where it’s at
● GLES 2.0: over 99% conformant ● GLES 3.0: over 90% ● GLES 3.1: over 80% ● GLES 3.2: coming soon.. Where we’re going
● We want 3.2 conformance in Q3 2020. ● chromium.googlesource.com/angle/angle/+/master/doc/dEQP-Charts.md Other stuff we’re working on
● Matching native performance ● Frame capture/replay ● More Chrome platforms ● Desktop GL front-end Q&A
jmadill@google.com angleproject.org