SlideShare ist ein Scribd-Unternehmen logo
1 von 48
Downloaden Sie, um offline zu lesen
Alejandro Piñeiro (apinheiro@igalia.com)g
ARB_gl_spirv: bringing
SPIR-V to Mesa OpenGL
Some news/announcement
first
XDC 2018 dates confirmed
●
Will be held in A Coruña, Spain
●
From September 26th
to September 29th
●
Follow www.twitter.com/xdc2018 for updates
Conformance
●
Intel Mesa driver for Linux is now OpenGL 4.6
conformant
●
Conformant on day one!
●
Thats includes ARB_gl_spirv tests
Topics covered
●
Introduction
●
Development history
●
Technical decisions
●
Testing
●
Current status and future
Introduction
Who is doing this?
●
Started by Nicolai Hähnle
●
Right now:
●
Alejandro Piñeiro
●
Eduardo Lima
●
Neil Roberts
●
Supported by Intel
GLSL
●
OpenGL Shading Language
●
C-Like language used to write shaders.
●
The shading source code is included on your
program, so it is easy to get it back
●
First anounced on 2004
SPIR-V
●
Introduced as SPIR in 2011
●
Standard Portable Intermediate Representation
●
OpenCL
●
Binary format
●
Based on LLVM IR
●
SPIR-V announced in 2015
●
Part of OpenCL 2.1 core and Vulkan core
●
Not based on LLVM IR anymore
OpenGL vs Vulkan
●
Some applications are porting from one to the
other, or want to support both
●
Some interoperatibility are desired
●
But one use GLSL, the other SPIR-V as shading
language
GL_KHR_vulkan_glsl
●
Modifies GLSL to be used for Vulkan (dec-2015)
●
But not as a direct consumer, but after being
compiled down to SPIR-V
●
Not a driver extension, but a frontend extension
GL_ARB_gl_spirv
●
Defines two things:
●
Allows SPIR-V module to be loaded on OpenGL
●
Modifies GLSL to be a source for creating SPIR-V
modules for OpenGL consumption.
●
Driver + frontend extension
GL_ARB_spirv_extensions
●
ARB_gl_spirv is focused on SPIR-V 1.0
●
This extension allows to expose which extra
functionality is supported.
●
Spec implies the possibility of OpenGL specific
SPIR-V extensions.
Khronos tools
●
Glslang
●
Khronos reference front-end for GLSL and ESSL
●
Sample SPIR-V generator
●
SPIRV-tools
●
Set of tools for processing SPIR-V modules
●
Assembler, disassembler, validator, and
optimizer
Base GLSL
●
KHR_vulkan_glsl remove and changes several
old-glsl features, and adds some vulkan-like
features
●
ARB_gl_spirv uses KHR_vulkan_glsl as base
●
But it restores some GLSL features, removes
some vulkan features, add specific ones and
tweak existing ones.
Examples
●
Subroutines: removed on both
●
Atomic counters:
●
Removed on KHR_vulkan_glsl
●
Re-added for ARB_gl_spirv
Perfect strangers
●
ARB_gl_spirv big change is having names as
optional, in a SPIR-V like fashion
●
Example: Frontend could get a GLSL with a ubo,
and ignore the name when creating the SPIR-V
●
That means that everything needs to work
without any name
●
You need to use location, binding, index, etc
Development history
Pre-history
●
“Interest in GL_ARB_gl_spirv” (2016-07-27)
●
Several driver developers added suggestions on
how to implement it
●
“[RFC] ARB_gl_spirv and NIR backend for
radeonsi” (Nicolai Hähnle, 2017-05-21)
●
Starting point with some code, focused on
radeonsi
●
Also starts the discussion for testing
Jumping in
●
Igalia jumped in on ~September 2017
●
Used Nicolai wip code as reference
●
Both mesa and piglit
●
Focused first on integrate it with the mesa driver
and check whats missing to get the (also wip) CTS
tests passing
NIR
●
Intermediate Representation of the shader,
created initially for Intel, used now on other
backends
●
So there is a GLSL→GLSL IR→NIR→Intel IR chain
on Mesa Intel drivers
●
Intel Vulkan driver introduced a SPIR-V to NIR
pass
But
●
Right now there is not linking on NIR
●
Linking is done on Mesa IR
●
NIR receives all the objects already linked
What it is a linker?
●
“Program that take two or more objects
generated by the compiler and links them to
create a executable program”
●
Abstracting *a lot*, the GLSL linker does:
●
Gather info from all the objects
●
Validates that all together makes sense
Reusing IR linker
●
GLSL IR linker is heavily based on the ir-variables
●
Nicolai Hähnle first approach was:
●
Use existing vulkan spir to nir
●
Convert nir variables to ir variable
●
Re-use as much possible IR linker
●
Use nir shader after that
●
Good approach for bootstrap
Coding and technical
decisions
First steps
●
Initial focus was getting the CTS tests working for
the Intel Mesa driver
●
That gave us a better understanding of what was
missing
More spirv to nir
●
Current spirv_to_nir pass was focused on Vulkan
●
Missed support for several features needed by
OpenGL, supported on SPIR-V:
●
Atomic counters
●
Transform feedback/geometry streams
●
Tessellation
●
OpenGL-friendly ubos/ssbos tweaking
Starting to rethink linking
●
IR-variable→nir variable approach was good to
get some support quickly supported
●
Example: atomic counters
●
But seemed somewhat artificial
●
*But* the spec tweaked too much GLSL needs,
specially when linking
Poster boy: ubos
●
GLSL IR linking code for ubos is based on the
name.
●
Explicit binding is optional.
●
Without explicit binding, it is assigned during the
linking
/* This hash table will track all of the uniform blocks that have been
* encountered. Since blocks with the same block-name must be the same,
* the hash is organized by block-name.
*/
Poster boy: ubos (II)
●
Under ARB_gl_spirv names are optional
●
Needs to work without them
●
Explicit binding is mandatory
●
Shared and packed layout are not supported
●
Only st140 possible (all ubos are active)
●
Not too much GLSL IR linker to reuse here
Big decision going
●
We need to rewrite a good bunch of the linker
●
It is really worth to over-complicate an already
existing linker?
●
All the info is already on the nir shader
●
Timothy Arceri was adding some linking-related
nir helpers
NIR based linker
●
Listing all the reasons:
●
What we have right is NIR
●
Linking would be already different on several
aspects
●
People were already adding nir-based linking
utilities
●
Scope defined:
●
It will be initially centered on ARB_gl_spirv
Focusing on passing CTS
●
With a clear dev plan, we focus on getting the
CTS tests passing
●
Clearly they covered most of the spec
●
They weren’t too many (8)
●
Tricky: they were also a WIP at the moment
●
We used some of our time testing, reviewing,
submitting feedback, and even fixes
●
The patchset reached v21!
We got it!
●
We got all the tests passing ~Oct/Nov
●
Next step was cleaning, and start to submit
patches (more on this later)
●
Clean enough for the CTS submission.
●
So we are done yet? Not really ...
Testing
More testing needed
●
Passing CTS is not enough to be considered
production ready
●
There are several aspects, especially execution
tests, that needs more coverage
●
Two main approaches:
●
Improve piglit
●
Work on a GLSL→SPIR-V backend
piglit
●
Piglit is an open-source test suite for OpenGL
implementation
●
Heavily used by piglit developers
●
shader_runner: run .shader_text txt file format:
●
shader source
●
Values for the uniforms, ubos, ssbos, etc
●
Check if linking or rendering was correct.
piglit – gl_spirv support (I)
●
Nicolai added support for ARB_gl_spirv
●
New script that parses .shader_test and call
glslang to create the SPIR-V binaries
●
It includes ad-hoc attempts to “fix” the shader
●
Support on shader_runner to load a SPIR-V binary
or include a SPIR-V text format and use spirv-tools
piglit – gl_spirv support (II)
●
You can easily switch using GLSL or SPIR-V for the
same test
●
You can write tests easily
●
Invaluable tool at this stage
●
We loved it!
●
Thanks
piglit – gl_spirv support(III)
●
We added some features:
●
Feed ubo support without using names
●
To test SPIR-V execution testing without no
names
●
In any case, it is not clear if all this will go
upstream
●
Some doubs on mesa-dev for the approach
●
Some see glslang dependency as a no-go
GLSL to SPIR-V backend (I)
●
Suggested by Jason on “Adding a SPIR-V back-end
to the GLSL compiler” (Jason Ekstrand, 2017-05-
26). Main Advantages:
●
Provide another GLSL to SPIR-V compiler
●
Optimizations
●
ARB_gl_spirv testing
GLSL to SPIR-V backend (II)
●
“The first of the real SPIR-V work” (Ian Romanick,
v1 2017-10-11, v2 2017-11-21)
●
First version of the back-end
●
Some patches reviewed
●
Some features pending (like ubos)
GLSL to SPIR-V backend(III)
●
For ARB_gl_spirv the idea would do this:
●
GLSL→GLSL IR→SPIR-V→NIR
●
Conditionally.
●
Internally it would need to do the “fixing”
●
Would allow to run piglit tests without changes
●
But:
●
Not finished
●
We would still need to modify how to feed data
Current status and future
What’s working
●
A little of everything is partially covered:
●
Uniforms
●
Atomic counters
●
UBOs and SSBOs
●
Tessellation shaders
●
Transform feedback/Geometry streams
●
We have plenty of programs working
●
ARB_spirv_extensions fully complete
What’s missing
●
Poulish all the previous features
●
Arrays of arrays
●
Some support for ubos on the linker
●
Failing on the spirv to nir pass
●
Multisample Image Array
●
Validation
●
More testing
Upstreaming
●
Right now our mesa development branch has
~80 patches
●
Plan is sending them in small batches
●
We already sent a first patchset
●
“Initial gl_spirv and spirv_extensions support in
Mesa and i965” (Eduardo Lima, 2017-11-17)
●
Partly reviewed. V4 sent in January.
Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

QVT Traceability: What does it really mean?
QVT Traceability: What does it really mean?QVT Traceability: What does it really mean?
QVT Traceability: What does it really mean?Edward Willink
 
Building SciPy kernels with Pythran
Building SciPy kernels with PythranBuilding SciPy kernels with Pythran
Building SciPy kernels with PythranRalf Gommers
 
Active record, standalone migrations, and working with Arel
Active record, standalone migrations, and working with ArelActive record, standalone migrations, and working with Arel
Active record, standalone migrations, and working with ArelAlex Tironati
 
Decentralized Evolution and Consolidation of RDF Graphs
Decentralized Evolution and Consolidation of RDF GraphsDecentralized Evolution and Consolidation of RDF Graphs
Decentralized Evolution and Consolidation of RDF GraphsAksw Group
 
How to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineHow to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineElasTest Project
 
Helpful into to Rx
Helpful into to RxHelpful into to Rx
Helpful into to RxSerg Dort
 
4K–Kubernetes with Knative, Kafka and Kamel
4K–Kubernetes with Knative, Kafka and Kamel 4K–Kubernetes with Knative, Kafka and Kamel
4K–Kubernetes with Knative, Kafka and Kamel Red Hat Developers
 
OctConf 2013 - Improve JIT Compiling
OctConf 2013 - Improve JIT CompilingOctConf 2013 - Improve JIT Compiling
OctConf 2013 - Improve JIT CompilingLYH-Kernel
 
At Last an OCL Debugger
At Last an OCL DebuggerAt Last an OCL Debugger
At Last an OCL DebuggerEdward Willink
 
BUD17-TR01: Philosophy of Open Source
BUD17-TR01: Philosophy of Open SourceBUD17-TR01: Philosophy of Open Source
BUD17-TR01: Philosophy of Open SourceLinaro
 
Case Study: Using Qt to Develop Advanced GUIs & Advanced Visualization Software
Case Study: Using Qt to Develop Advanced GUIs & Advanced Visualization SoftwareCase Study: Using Qt to Develop Advanced GUIs & Advanced Visualization Software
Case Study: Using Qt to Develop Advanced GUIs & Advanced Visualization Softwareaccount inactive
 
[Public] gerrit concepts and workflows
[Public] gerrit   concepts and workflows[Public] gerrit   concepts and workflows
[Public] gerrit concepts and workflowsYanbin Kong
 
Lcu14 312-Introduction to the Ecosystem day
Lcu14 312-Introduction to the Ecosystem day Lcu14 312-Introduction to the Ecosystem day
Lcu14 312-Introduction to the Ecosystem day Linaro
 

Was ist angesagt? (16)

QVT Traceability: What does it really mean?
QVT Traceability: What does it really mean?QVT Traceability: What does it really mean?
QVT Traceability: What does it really mean?
 
Building SciPy kernels with Pythran
Building SciPy kernels with PythranBuilding SciPy kernels with Pythran
Building SciPy kernels with Pythran
 
Active record, standalone migrations, and working with Arel
Active record, standalone migrations, and working with ArelActive record, standalone migrations, and working with Arel
Active record, standalone migrations, and working with Arel
 
Decentralized Evolution and Consolidation of RDF Graphs
Decentralized Evolution and Consolidation of RDF GraphsDecentralized Evolution and Consolidation of RDF Graphs
Decentralized Evolution and Consolidation of RDF Graphs
 
How to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineHow to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipeline
 
Introduction to Qt
Introduction to QtIntroduction to Qt
Introduction to Qt
 
Helpful into to Rx
Helpful into to RxHelpful into to Rx
Helpful into to Rx
 
4K–Kubernetes with Knative, Kafka and Kamel
4K–Kubernetes with Knative, Kafka and Kamel 4K–Kubernetes with Knative, Kafka and Kamel
4K–Kubernetes with Knative, Kafka and Kamel
 
JerryScript on RIOT
JerryScript on RIOTJerryScript on RIOT
JerryScript on RIOT
 
OctConf 2013 - Improve JIT Compiling
OctConf 2013 - Improve JIT CompilingOctConf 2013 - Improve JIT Compiling
OctConf 2013 - Improve JIT Compiling
 
At Last an OCL Debugger
At Last an OCL DebuggerAt Last an OCL Debugger
At Last an OCL Debugger
 
BUD17-TR01: Philosophy of Open Source
BUD17-TR01: Philosophy of Open SourceBUD17-TR01: Philosophy of Open Source
BUD17-TR01: Philosophy of Open Source
 
What is dev ops?
What is dev ops?What is dev ops?
What is dev ops?
 
Case Study: Using Qt to Develop Advanced GUIs & Advanced Visualization Software
Case Study: Using Qt to Develop Advanced GUIs & Advanced Visualization SoftwareCase Study: Using Qt to Develop Advanced GUIs & Advanced Visualization Software
Case Study: Using Qt to Develop Advanced GUIs & Advanced Visualization Software
 
[Public] gerrit concepts and workflows
[Public] gerrit   concepts and workflows[Public] gerrit   concepts and workflows
[Public] gerrit concepts and workflows
 
Lcu14 312-Introduction to the Ecosystem day
Lcu14 312-Introduction to the Ecosystem day Lcu14 312-Introduction to the Ecosystem day
Lcu14 312-Introduction to the Ecosystem day
 

Ähnlich wie ARB_gl_spirv: bringing SPIR-V to Mesa OpenGL (FOSDEM 2018)

ARB_gl_spirv implementation in Mesa: status update (XDC 2018)
ARB_gl_spirv implementation in Mesa: status update (XDC 2018)ARB_gl_spirv implementation in Mesa: status update (XDC 2018)
ARB_gl_spirv implementation in Mesa: status update (XDC 2018)Igalia
 
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
 
LCU14 303- Toolchain Collaboration
LCU14 303- Toolchain CollaborationLCU14 303- Toolchain Collaboration
LCU14 303- Toolchain CollaborationLinaro
 
LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2Linaro
 
Elixir + GraphQL = Absinthe 2019.04.10
Elixir + GraphQL = Absinthe 2019.04.10Elixir + GraphQL = Absinthe 2019.04.10
Elixir + GraphQL = Absinthe 2019.04.10Alexander Knowles
 
apacheairflow-160827123852.pdf
apacheairflow-160827123852.pdfapacheairflow-160827123852.pdf
apacheairflow-160827123852.pdfvijayapraba1
 
BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr Linaro
 
Gobblin @ NerdWallet (Nov 2015)
Gobblin @ NerdWallet (Nov 2015)Gobblin @ NerdWallet (Nov 2015)
Gobblin @ NerdWallet (Nov 2015)NerdWalletHQ
 
ceph openstack dream team
ceph openstack dream teamceph openstack dream team
ceph openstack dream teamUdo Seidel
 
LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205Linaro
 
SFO15-110: Toolchain Collaboration
SFO15-110: Toolchain CollaborationSFO15-110: Toolchain Collaboration
SFO15-110: Toolchain CollaborationLinaro
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present futurelolopetit
 
TSC BoF: OSS Toolchain Discussion - SFO17-409
TSC BoF: OSS Toolchain Discussion - SFO17-409TSC BoF: OSS Toolchain Discussion - SFO17-409
TSC BoF: OSS Toolchain Discussion - SFO17-409Linaro
 
Ostd.ksplice.talk
Ostd.ksplice.talkOstd.ksplice.talk
Ostd.ksplice.talkUdo Seidel
 
Angular CLI : HelloWorld
Angular CLI : HelloWorldAngular CLI : HelloWorld
Angular CLI : HelloWorldnikspatel007
 
Summer Internship Project - Remote Render
Summer Internship Project - Remote RenderSummer Internship Project - Remote Render
Summer Internship Project - Remote RenderYen-Kuan Wu
 

Ähnlich wie ARB_gl_spirv: bringing SPIR-V to Mesa OpenGL (FOSDEM 2018) (20)

ARB_gl_spirv implementation in Mesa: status update (XDC 2018)
ARB_gl_spirv implementation in Mesa: status update (XDC 2018)ARB_gl_spirv implementation in Mesa: status update (XDC 2018)
ARB_gl_spirv implementation in Mesa: status update (XDC 2018)
 
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...
 
kpatch.kgraft
kpatch.kgraftkpatch.kgraft
kpatch.kgraft
 
Nova Updates - Kilo Edition
Nova Updates - Kilo EditionNova Updates - Kilo Edition
Nova Updates - Kilo Edition
 
OpenStack Compute - Juno Updates
OpenStack Compute - Juno UpdatesOpenStack Compute - Juno Updates
OpenStack Compute - Juno Updates
 
LCU14 303- Toolchain Collaboration
LCU14 303- Toolchain CollaborationLCU14 303- Toolchain Collaboration
LCU14 303- Toolchain Collaboration
 
LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2
 
Elixir + GraphQL = Absinthe 2019.04.10
Elixir + GraphQL = Absinthe 2019.04.10Elixir + GraphQL = Absinthe 2019.04.10
Elixir + GraphQL = Absinthe 2019.04.10
 
Apache Airflow
Apache AirflowApache Airflow
Apache Airflow
 
apacheairflow-160827123852.pdf
apacheairflow-160827123852.pdfapacheairflow-160827123852.pdf
apacheairflow-160827123852.pdf
 
BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr
 
Gobblin @ NerdWallet (Nov 2015)
Gobblin @ NerdWallet (Nov 2015)Gobblin @ NerdWallet (Nov 2015)
Gobblin @ NerdWallet (Nov 2015)
 
ceph openstack dream team
ceph openstack dream teamceph openstack dream team
ceph openstack dream team
 
LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205
 
SFO15-110: Toolchain Collaboration
SFO15-110: Toolchain CollaborationSFO15-110: Toolchain Collaboration
SFO15-110: Toolchain Collaboration
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present future
 
TSC BoF: OSS Toolchain Discussion - SFO17-409
TSC BoF: OSS Toolchain Discussion - SFO17-409TSC BoF: OSS Toolchain Discussion - SFO17-409
TSC BoF: OSS Toolchain Discussion - SFO17-409
 
Ostd.ksplice.talk
Ostd.ksplice.talkOstd.ksplice.talk
Ostd.ksplice.talk
 
Angular CLI : HelloWorld
Angular CLI : HelloWorldAngular CLI : HelloWorld
Angular CLI : HelloWorld
 
Summer Internship Project - Remote Render
Summer Internship Project - Remote RenderSummer Internship Project - Remote Render
Summer Internship Project - Remote Render
 

Mehr von Igalia

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
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEIgalia
 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesIgalia
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceIgalia
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfIgalia
 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JITIgalia
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!Igalia
 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerIgalia
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in MesaIgalia
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIgalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera LinuxIgalia
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVMIgalia
 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsIgalia
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesIgalia
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSIgalia
 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webIgalia
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersIgalia
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...Igalia
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on RaspberryIgalia
 
Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...Igalia
 

Mehr von Igalia (20)

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?
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPE
 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded Devices
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to Maintenance
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdf
 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JIT
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!
 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamer
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera Linux
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVM
 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devices
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the web
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shaders
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on Raspberry
 
Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...
 

Kürzlich hochgeladen

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
🐬 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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Kürzlich hochgeladen (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

ARB_gl_spirv: bringing SPIR-V to Mesa OpenGL (FOSDEM 2018)

  • 3. XDC 2018 dates confirmed ● Will be held in A Coruña, Spain ● From September 26th to September 29th ● Follow www.twitter.com/xdc2018 for updates
  • 4. Conformance ● Intel Mesa driver for Linux is now OpenGL 4.6 conformant ● Conformant on day one! ● Thats includes ARB_gl_spirv tests
  • 5. Topics covered ● Introduction ● Development history ● Technical decisions ● Testing ● Current status and future
  • 7. Who is doing this? ● Started by Nicolai Hähnle ● Right now: ● Alejandro Piñeiro ● Eduardo Lima ● Neil Roberts ● Supported by Intel
  • 8. GLSL ● OpenGL Shading Language ● C-Like language used to write shaders. ● The shading source code is included on your program, so it is easy to get it back ● First anounced on 2004
  • 9. SPIR-V ● Introduced as SPIR in 2011 ● Standard Portable Intermediate Representation ● OpenCL ● Binary format ● Based on LLVM IR ● SPIR-V announced in 2015 ● Part of OpenCL 2.1 core and Vulkan core ● Not based on LLVM IR anymore
  • 10. OpenGL vs Vulkan ● Some applications are porting from one to the other, or want to support both ● Some interoperatibility are desired ● But one use GLSL, the other SPIR-V as shading language
  • 11. GL_KHR_vulkan_glsl ● Modifies GLSL to be used for Vulkan (dec-2015) ● But not as a direct consumer, but after being compiled down to SPIR-V ● Not a driver extension, but a frontend extension
  • 12. GL_ARB_gl_spirv ● Defines two things: ● Allows SPIR-V module to be loaded on OpenGL ● Modifies GLSL to be a source for creating SPIR-V modules for OpenGL consumption. ● Driver + frontend extension
  • 13. GL_ARB_spirv_extensions ● ARB_gl_spirv is focused on SPIR-V 1.0 ● This extension allows to expose which extra functionality is supported. ● Spec implies the possibility of OpenGL specific SPIR-V extensions.
  • 14. Khronos tools ● Glslang ● Khronos reference front-end for GLSL and ESSL ● Sample SPIR-V generator ● SPIRV-tools ● Set of tools for processing SPIR-V modules ● Assembler, disassembler, validator, and optimizer
  • 15. Base GLSL ● KHR_vulkan_glsl remove and changes several old-glsl features, and adds some vulkan-like features ● ARB_gl_spirv uses KHR_vulkan_glsl as base ● But it restores some GLSL features, removes some vulkan features, add specific ones and tweak existing ones.
  • 16. Examples ● Subroutines: removed on both ● Atomic counters: ● Removed on KHR_vulkan_glsl ● Re-added for ARB_gl_spirv
  • 17. Perfect strangers ● ARB_gl_spirv big change is having names as optional, in a SPIR-V like fashion ● Example: Frontend could get a GLSL with a ubo, and ignore the name when creating the SPIR-V ● That means that everything needs to work without any name ● You need to use location, binding, index, etc
  • 19. Pre-history ● “Interest in GL_ARB_gl_spirv” (2016-07-27) ● Several driver developers added suggestions on how to implement it ● “[RFC] ARB_gl_spirv and NIR backend for radeonsi” (Nicolai Hähnle, 2017-05-21) ● Starting point with some code, focused on radeonsi ● Also starts the discussion for testing
  • 20. Jumping in ● Igalia jumped in on ~September 2017 ● Used Nicolai wip code as reference ● Both mesa and piglit ● Focused first on integrate it with the mesa driver and check whats missing to get the (also wip) CTS tests passing
  • 21. NIR ● Intermediate Representation of the shader, created initially for Intel, used now on other backends ● So there is a GLSL→GLSL IR→NIR→Intel IR chain on Mesa Intel drivers ● Intel Vulkan driver introduced a SPIR-V to NIR pass
  • 22. But ● Right now there is not linking on NIR ● Linking is done on Mesa IR ● NIR receives all the objects already linked
  • 23. What it is a linker? ● “Program that take two or more objects generated by the compiler and links them to create a executable program” ● Abstracting *a lot*, the GLSL linker does: ● Gather info from all the objects ● Validates that all together makes sense
  • 24. Reusing IR linker ● GLSL IR linker is heavily based on the ir-variables ● Nicolai Hähnle first approach was: ● Use existing vulkan spir to nir ● Convert nir variables to ir variable ● Re-use as much possible IR linker ● Use nir shader after that ● Good approach for bootstrap
  • 26. First steps ● Initial focus was getting the CTS tests working for the Intel Mesa driver ● That gave us a better understanding of what was missing
  • 27. More spirv to nir ● Current spirv_to_nir pass was focused on Vulkan ● Missed support for several features needed by OpenGL, supported on SPIR-V: ● Atomic counters ● Transform feedback/geometry streams ● Tessellation ● OpenGL-friendly ubos/ssbos tweaking
  • 28. Starting to rethink linking ● IR-variable→nir variable approach was good to get some support quickly supported ● Example: atomic counters ● But seemed somewhat artificial ● *But* the spec tweaked too much GLSL needs, specially when linking
  • 29. Poster boy: ubos ● GLSL IR linking code for ubos is based on the name. ● Explicit binding is optional. ● Without explicit binding, it is assigned during the linking /* This hash table will track all of the uniform blocks that have been * encountered. Since blocks with the same block-name must be the same, * the hash is organized by block-name. */
  • 30. Poster boy: ubos (II) ● Under ARB_gl_spirv names are optional ● Needs to work without them ● Explicit binding is mandatory ● Shared and packed layout are not supported ● Only st140 possible (all ubos are active) ● Not too much GLSL IR linker to reuse here
  • 31. Big decision going ● We need to rewrite a good bunch of the linker ● It is really worth to over-complicate an already existing linker? ● All the info is already on the nir shader ● Timothy Arceri was adding some linking-related nir helpers
  • 32. NIR based linker ● Listing all the reasons: ● What we have right is NIR ● Linking would be already different on several aspects ● People were already adding nir-based linking utilities ● Scope defined: ● It will be initially centered on ARB_gl_spirv
  • 33. Focusing on passing CTS ● With a clear dev plan, we focus on getting the CTS tests passing ● Clearly they covered most of the spec ● They weren’t too many (8) ● Tricky: they were also a WIP at the moment ● We used some of our time testing, reviewing, submitting feedback, and even fixes ● The patchset reached v21!
  • 34. We got it! ● We got all the tests passing ~Oct/Nov ● Next step was cleaning, and start to submit patches (more on this later) ● Clean enough for the CTS submission. ● So we are done yet? Not really ...
  • 36. More testing needed ● Passing CTS is not enough to be considered production ready ● There are several aspects, especially execution tests, that needs more coverage ● Two main approaches: ● Improve piglit ● Work on a GLSL→SPIR-V backend
  • 37. piglit ● Piglit is an open-source test suite for OpenGL implementation ● Heavily used by piglit developers ● shader_runner: run .shader_text txt file format: ● shader source ● Values for the uniforms, ubos, ssbos, etc ● Check if linking or rendering was correct.
  • 38. piglit – gl_spirv support (I) ● Nicolai added support for ARB_gl_spirv ● New script that parses .shader_test and call glslang to create the SPIR-V binaries ● It includes ad-hoc attempts to “fix” the shader ● Support on shader_runner to load a SPIR-V binary or include a SPIR-V text format and use spirv-tools
  • 39. piglit – gl_spirv support (II) ● You can easily switch using GLSL or SPIR-V for the same test ● You can write tests easily ● Invaluable tool at this stage ● We loved it! ● Thanks
  • 40. piglit – gl_spirv support(III) ● We added some features: ● Feed ubo support without using names ● To test SPIR-V execution testing without no names ● In any case, it is not clear if all this will go upstream ● Some doubs on mesa-dev for the approach ● Some see glslang dependency as a no-go
  • 41. GLSL to SPIR-V backend (I) ● Suggested by Jason on “Adding a SPIR-V back-end to the GLSL compiler” (Jason Ekstrand, 2017-05- 26). Main Advantages: ● Provide another GLSL to SPIR-V compiler ● Optimizations ● ARB_gl_spirv testing
  • 42. GLSL to SPIR-V backend (II) ● “The first of the real SPIR-V work” (Ian Romanick, v1 2017-10-11, v2 2017-11-21) ● First version of the back-end ● Some patches reviewed ● Some features pending (like ubos)
  • 43. GLSL to SPIR-V backend(III) ● For ARB_gl_spirv the idea would do this: ● GLSL→GLSL IR→SPIR-V→NIR ● Conditionally. ● Internally it would need to do the “fixing” ● Would allow to run piglit tests without changes ● But: ● Not finished ● We would still need to modify how to feed data
  • 45. What’s working ● A little of everything is partially covered: ● Uniforms ● Atomic counters ● UBOs and SSBOs ● Tessellation shaders ● Transform feedback/Geometry streams ● We have plenty of programs working ● ARB_spirv_extensions fully complete
  • 46. What’s missing ● Poulish all the previous features ● Arrays of arrays ● Some support for ubos on the linker ● Failing on the spirv to nir pass ● Multisample Image Array ● Validation ● More testing
  • 47. Upstreaming ● Right now our mesa development branch has ~80 patches ● Plan is sending them in small batches ● We already sent a first patchset ● “Initial gl_spirv and spirv_extensions support in Mesa and i965” (Eduardo Lima, 2017-11-17) ● Partly reviewed. V4 sent in January.