Zink: OpenGL on Vulkan Simplifying the future of the graphics - - PowerPoint PPT Presentation

▶
zink opengl on vulkan
SMART_READER_LITE
LIVE PREVIEW

Zink: OpenGL on Vulkan Simplifying the future of the graphics - - PowerPoint PPT Presentation

Zink: OpenGL on Vulkan Simplifying the future of the graphics stack? Erik Faye-Lund Open First Open First Why OpenGL on Vulkan OpenGL is a requirement for desktop Some modern use-cases are outside of what OpenGL was designed for


slide-1
SLIDE 1

Open First Open First

Zink: OpenGL

  • n Vulkan

Simplifying the future of the graphics stack? Erik Faye-Lund

slide-2
SLIDE 2

OPEN FIRST

2

Why OpenGL on Vulkan

  • OpenGL is a requirement for desktop

–

Some modern use-cases are outside of what OpenGL was designed for

  • Vulkan is here to stay

–

Likely to be the leading “high-end” API going forward

  • Requiring two implementations through all

components of the stack is a massive support-burden

–

Can we reduce the requirement to one?

slide-3
SLIDE 3

OPEN FIRST

3

Existing solutions

  • GLOVE, ANGLE, VKGL

–

Only implements OpenGL ES 2/3 or GL Core 3.2

–

Adding Full OpenGL support is a big undertaking

  • Legacy GL and compatibility contexts
  • GLO (G-Truc)

–

Vapourware

  • Some other non-public solutions exist

–

Impossible to reason about those

slide-4
SLIDE 4

OPEN FIRST

4

Zink: Gallium to Vulkan

  • Translates Gallium API calls to Vulkan

–

A very rough proof-of-concept exist

  • Can render glxgears, some of glmark2 and maybe some other basic things
  • Currently runs in lock-step with the CPU
  • Written by me as a side-project in a couple of week

–

A result of some architectural issues with Virgil 3D

  • Not in any way a proven idea

–

More work is needed, for sure.

slide-5
SLIDE 5

OPEN FIRST

5

Challenges

  • NIR → SPIR-V
  • WSI
  • Pipeline caching
  • Transform feedback
  • Image layout management
slide-6
SLIDE 6

6

Demo time!

Get the code at: https://gitlab.freedesktop.org/kusma/mesa/tree/zink

slide-7
SLIDE 7

7

The future

  • Lots of work to be done, most importantly:

–

Pipeline caching

–

Making the compiler less terrible

  • There’s a good chance we’re going forward with this approach

–

After that, implementing more modern OpenGL features

slide-8
SLIDE 8

OPEN FIRST

8

Help wanted!

There’s a lot of things to do, so please help out if you’re interested!

–

Interesting compiler work

  • “type system”: Add support bool, int, int64, double types?
  • Conditional code and loops
  • More texturing instructions

–

Improve the execution model

  • How do we deal with image barriers in an effjcient way?

–

Lots more that I can’t fjt here

–

Patches welcome!

slide-9
SLIDE 9

OPEN FIRST

9

Thank you!