SlideShare a Scribd company logo
static void
_f_do_barnacle_install_properties(GObjectClass
*gobject_class)
{
GParamSpec *pspec;
/* Party code attribute */
pspec = g_param_spec_uint64
(F_DO_BARNACLE_CODE,
"Barnacle code.",
"Barnacle code",
0,
G_MAXUINT64,
G_MAXUINT64 /*
default value */,
G_PARAM_READABLE
| G_PARAM_WRITABLE |
G_PARAM_PRIVATE);
g_object_class_install_property (gobject_class,
F_DO_BARNACLE_PROP_CODE,
ARB_gl_spirv implementation
on Mesa: status update
Introduction
Topics
●
What we are talking about: some specs
●
Previous presentation, status then
●
Evolution
●
Testing
●
Current status, future
GLSL
●
OpenGL Shading Language.
●
C-Like high-level language shading language
●
ARB_vertex/fragment_program too low level. Several vendor
alternatives.
●
Introduced as an OpenGL 1.4 extension on 2003, part of the
OpenGL 2.0 core on 2002
●
The original shader is included on your program.
SPIR-V
●
Introduced as SPIR in 2011
●
Standard Portable Intermediate
Representation
●
Initially for 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 and Vulkan: common
ecosystem
●
Some applications are porting from one to the
other, or want to support both
●
Some interoperability are desired
●
But one use GLSL, other SPIR-V as shading
language
●
Fist step: GL_KHR_vulkan_glsl
GL_KHR_vulkan_glsl
●
Modifies GLSL to be used for Vulkan
●
Announced on Dec 2015
●
GLSL is compiled down to SPIR-V, which the Vulkan
API consumes
●
Not a driver extension, but frontend one.
●
Removes several features, add others
●
“Just GLSL” is not suitable for Vulkan consumption
GL_ARB_gl_spirv
●
Allow SPIR-V modules to be loaded on OpenGL
●
Modifies GLSL to be a source for creating SPIR-V
modules for OpenGL consumption
●
Based on the previous, but not exactly the same
●
Also adds/removes features
●
Driver + frontend extension
●
“Just GLSL” (through SPIR-V) not suitable for OpenGL
consumption either.
Previous presentation: FOSDEM
2018
FOSDEM status summary (I)
●
Mesa already has a way to handle SPIR-V
shaders, thanks to Vulkan
●
SPIR-V to NIR pass
●
NIR is one of the Intermediate Representations
used at Mesa (IR, NIR, TGSI, etc)
●
Problem: shader linking was based on IR
FOSDEM status summary (II)
●
First workaround: partial conversion to IR
●
“Shadow variables”
●
Good for bootstrap, discarded soon
●
First proof-of-concept was implemented, good enough to pass
all the CTS tests
●
Cleaned up version of this implementation was used on a
downstream version of the Intel driver to pass the conformance
●
Challenge: was decided a new linker for ARB_gl_spirv, based on
NIR
FOSDEM status summary (III)
●
Main reason: ARB_gl_spirv linking needs to
work without names
●
But current GLSL, so it’s linker, is based on
names
/* 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.
*/
Evolution: FAQ mode
The NIR linker is needing a lot of
time, do you regret starting it?
●
No.
The NIR linker is needing a lot of
time, do you regret starting it?
●
No.
●
During this time even more difference between the
GLSL linker and what an ARB_gl_spirv linker needs
were found
●
Specifically, even although the general rule is trying
to behave as similar as possible as OpenGL, some
things are done “in the Vulkan way”
Why not just extend the shadow
variables idea? NIR to IR pass?
●
We would still have the problem of not having a
name
●
GLSL linking rules, specially validations, are
mostly based on names
●
Bold statement: even if we had a SPIR-V to IR
pass, separate code/linking for ARB_gl_spirv
would make sense.
Why not just make-up a name and
go with the IR linking?
●
How do you make up the name?
●
Sometimes you would need the binding, other
the location, offset, etc
●
You would mean the semantics of what you are
using for linking at a given moment
●
The spec itself encourages to “link the vulkan-
way”: built-in decorations, locations, etc
●
“Make-up a name” is not only hacky, sounds
hacky too
Why a NIR linker so tailored to
ARB_gl_spirv, why not for both?
●
Again, GLSL linking are mostly based on the
ubo/uniforms/etc names
●
Initial stages tried to design a solution for both,
and also share as much code as possible for
existing linker.
●
Outcome: block
●
We still think that the differences on the spec
justifies a different linker
●
Still trying to share as much as possible
But why it is taking so long? Isn't
SPIR-V more straight-forward?
●
In the end, it is needed to feed up the same
internal structures that with a GLSL linker
●
Uniforms need to be enumerated from their
block, among other things, to know how many
we have
●
Ditto for info related to them, like ubo/ssbo
buffer size
Wait there! Number of uniforms?
Buffer sizes? I thought that SPIRV
din’t require introspection?
●
That’s not inherent to SPIR-V
●
It is just how Vulkan uses it, or requires from it
Wait, I have read the spec, I found
several “no reflection required”.
●
Yes, issue (8) says “First start without reflection”
●
And then issue (12) says “No reflection
required”
Wait, I have read the spec, I found
several “no reflection required”.
●
Yes, issue (8) says “First start without reflection”
●
And then issue (12) says “No reflection
required”
●
But on those, it refers to “name reflection APIs”,
not any introspection at all (yes can be
confusing)
Wait, I have read the spec, I found
several “no reflection required”.
●
Yes, issue (8) says “First start without reflection”
●
And then issue (12) says “No reflection required”
●
But on those, it refers to “name reflection APIs”,
not any introspection at all (yes can be confusing)
●
From issue (19):
“C) Allow as much as possible to work "naturally". You
can query for the number of active resources, and for
details about them. Anything that doesn't query by
name will work as expected."
So this linker needs to re-
implement all what GLSL does?
●
No. The scope is really smaller.
●
Mesa GLSL linker need to support different
versions of GLSL, with several rules/features
added for years.
●
We can assume that the SPIR-V module has
been validated. Undefined behaviour allowed
for wrong SPIR-V
●
Several features were removed, or become
simpler (example: no specific memory layouts)
Testing
Testing
●
Passing CTS is not enough to be considered
production ready
●
Were good to test the ARB_gl_spirv specifics,
shallow for testing the full range of features
allowed
●
We use extensively Piglit
Piglit
●
Open-source test suite for OpenGL
implementations
●
Heavily used by Mesa developers
●
Several of their tests uses shader_runner
●
Individual test uses a text format
●
This includes the shader source, data values and
expected values
shader_test example
[require]
GL >= 3.3
GLSL >= 4.50
[vertex shader passthrough]
[fragment shader]
#version 450
layout(location = 0) uniform vec4 color;
layout(location = 0) out vec4 outcolor;
void main() {
outcolor = color;
}
[test]
clear color 1.0 0.0 0.0 0.0
clear
#color
uniform vec4 0 0.0 1.0 0.0 1.0
verify program_query GL_ACTIVE_UNIFORMS 1
draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 1.0
Piglit (barebone tests)
●
Nicolai added support for ARB_gl_spirv on
shader_runner
●
Also added a script that parses the shader_test,
and call glslang to create the SPIR-V source
●
This allowed to add tests for the extension
●
We are adding them as we implement features,
but even more is needed
Piglit (borrowed tests)
●
The script tries to be able to reuse tests written
originally for other specs
●
In some cases, it does some fixing
●
Like setting explicit location/binding etc
●
Also automatic filtering of tests that are not
compatible with ARB_gl_spirv
●
We got a lot of tests this way. Allowed a test-
based implementation since basically day 0.
Piglit (conversion numbers)
●
From the 2174 hand-written tests:
●
926 skipped, 24 fail
●
1224 tests successfully generated
●
From the 32386 generated tests:
●
1775 skipped
●
30611 tests successfully generated
●
We got 31835 tests with SPIR-V shaders just
borrowing tests from other specs
Piglit (pass rate)
●
With our development branch:
●
[34561] skip: 5928, pass:28508, fail:114, crash: 11
●
Most crashes come from lack of multi-
dimensional ubo/ssbo
●
Most failures come from missing more validation
checks
●
Several of them are likely to be skipped
Current status
What we already have on master?
●
~80 Mesa patches, and ~30 patches are already on
their respective masters
●
Thanks to all reviewers, specially Timothy Arceri and
Jason Ekstrand
●
Those cover
●
Uniforms
●
Atomic counters
●
Transform feedback and geometry streams
●
64-bit and 64-bit vertex attribute
●
etc
What’s happening now?
●
Just this week we send a 26 patches series
with the ubo/ssbo support, and some extras
●
Minus multi-dimensional arrays
●
Those extras are mostly in order to get all the
ARB_gl_spirv CTS tests passing
What’s next? (mandatory)
●
Improve interface query support
●
A lot of work done on testing
●
Multidimensional ubo/ssbo
●
Validation
●
Enable extension
What’s next? (long term)
●
Shader cache support
●
Right now we disable on the ARB_gl_spirv path
●
Bring names if available
●
Test with real applications
Personal thoughts
Two worlds
●
The best of two worlds
●
SPIR-V on OpenGL!
●
But you can still use as much OpenGL API as
possible!
●
Two worlds
●
The best of two worlds
●
SPIR-V on OpenGL!
●
But you can still use as much OpenGL API as
possible!
●
The worst of two worlds:
●
OpenGL driver need to do more linking with
SPIR-V that the Vulkan driver
●
Just to provide a subset of the OpenGL
introspection
Shouldn’t it better to chose one?
●
Depends on the main use case
●
Transitional helper while people port to Vulkan?
Or a way to help to reduce the cost of having
two renderers?
●
On the former, “OpenGL way of things” make
more sense
●
On the latter, “Vulkan way of things” make more
sense
GLSL confusion
●
Two different specs defining the GLSL valid for
SPIR-V generation
●
Too many feature switching/tweaking
●
Although it is most a frontend problem, in the
end the driver needs to support a set of
features
●
Sometimes not so clear what is needed to be
supported
●
Likely a issue for applications too
Closing
Who is working on this?
●
Started by Nicolai Hänhle
●
Continued by Igalia
●
Supported by Intel
Questions?
ARB_gl_spirv implementation in Mesa: status update (XDC 2018)

More Related Content

What's hot

OpenERP 6.1 Framework Changes
OpenERP 6.1 Framework ChangesOpenERP 6.1 Framework Changes
OpenERP 6.1 Framework Changes
Odoo
 
Tips and Tricks for Testing Lambda Expressions in Android
Tips and Tricks for Testing Lambda Expressions in AndroidTips and Tricks for Testing Lambda Expressions in Android
Tips and Tricks for Testing Lambda Expressions in Android
David Carver
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Tim Burks
 
Clang Analyzer Tool Review
Clang Analyzer Tool ReviewClang Analyzer Tool Review
Clang Analyzer Tool Review
Doug Schuster
 
Static analysis for perl
Static analysis for perlStatic analysis for perl
Static analysis for perl
moznion
 
Architectural changes in Orion
Architectural changes in OrionArchitectural changes in Orion
Architectural changes in Orion
Tomas Dermisek
 
Functional Groovy - Confess
Functional Groovy - ConfessFunctional Groovy - Confess
Functional Groovy - Confess
Andres Almiray
 
HKG15-110: ODP Project Update
HKG15-110: ODP Project UpdateHKG15-110: ODP Project Update
HKG15-110: ODP Project Update
Linaro
 
Network Protocol Testing Using Robot Framework
Network Protocol Testing Using Robot FrameworkNetwork Protocol Testing Using Robot Framework
Network Protocol Testing Using Robot Framework
Payal Jain
 
GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22
Jorge Hidalgo
 
cf.Objective() 2017 - Design patterns - Brad Wood
cf.Objective() 2017 - Design patterns - Brad Woodcf.Objective() 2017 - Design patterns - Brad Wood
cf.Objective() 2017 - Design patterns - Brad Wood
Ortus Solutions, Corp
 
Typed Drupal - A great combination of Drupal 8 and PHP 7
Typed Drupal - A great combination of Drupal 8 and PHP 7Typed Drupal - A great combination of Drupal 8 and PHP 7
Typed Drupal - A great combination of Drupal 8 and PHP 7
Aditya Ghan
 
Foundations of Zend Framework
Foundations of Zend FrameworkFoundations of Zend Framework
Foundations of Zend Framework
Adam Culp
 
Kotlin
KotlinKotlin
Pyconsg2014 pyston
Pyconsg2014 pystonPyconsg2014 pyston
Pyconsg2014 pyston
masahitojp
 
GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18
Jorge Hidalgo
 
Top ten of PHP 7.4
Top ten of PHP 7.4Top ten of PHP 7.4
Top ten of PHP 7.4
Andrea Giannantonio
 
Knowledge Sharing Session on JavaScript Source Maps & Angular Compilation
Knowledge Sharing Session on JavaScript Source Maps & Angular CompilationKnowledge Sharing Session on JavaScript Source Maps & Angular Compilation
Knowledge Sharing Session on JavaScript Source Maps & Angular Compilation
Md.Zahidur Rahman
 
Testing with Mongo Orchestration
Testing with Mongo OrchestrationTesting with Mongo Orchestration
Testing with Mongo Orchestration
MongoDB
 
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
Linaro
 

What's hot (20)

OpenERP 6.1 Framework Changes
OpenERP 6.1 Framework ChangesOpenERP 6.1 Framework Changes
OpenERP 6.1 Framework Changes
 
Tips and Tricks for Testing Lambda Expressions in Android
Tips and Tricks for Testing Lambda Expressions in AndroidTips and Tricks for Testing Lambda Expressions in Android
Tips and Tricks for Testing Lambda Expressions in Android
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPC
 
Clang Analyzer Tool Review
Clang Analyzer Tool ReviewClang Analyzer Tool Review
Clang Analyzer Tool Review
 
Static analysis for perl
Static analysis for perlStatic analysis for perl
Static analysis for perl
 
Architectural changes in Orion
Architectural changes in OrionArchitectural changes in Orion
Architectural changes in Orion
 
Functional Groovy - Confess
Functional Groovy - ConfessFunctional Groovy - Confess
Functional Groovy - Confess
 
HKG15-110: ODP Project Update
HKG15-110: ODP Project UpdateHKG15-110: ODP Project Update
HKG15-110: ODP Project Update
 
Network Protocol Testing Using Robot Framework
Network Protocol Testing Using Robot FrameworkNetwork Protocol Testing Using Robot Framework
Network Protocol Testing Using Robot Framework
 
GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22
 
cf.Objective() 2017 - Design patterns - Brad Wood
cf.Objective() 2017 - Design patterns - Brad Woodcf.Objective() 2017 - Design patterns - Brad Wood
cf.Objective() 2017 - Design patterns - Brad Wood
 
Typed Drupal - A great combination of Drupal 8 and PHP 7
Typed Drupal - A great combination of Drupal 8 and PHP 7Typed Drupal - A great combination of Drupal 8 and PHP 7
Typed Drupal - A great combination of Drupal 8 and PHP 7
 
Foundations of Zend Framework
Foundations of Zend FrameworkFoundations of Zend Framework
Foundations of Zend Framework
 
Kotlin
KotlinKotlin
Kotlin
 
Pyconsg2014 pyston
Pyconsg2014 pystonPyconsg2014 pyston
Pyconsg2014 pyston
 
GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18
 
Top ten of PHP 7.4
Top ten of PHP 7.4Top ten of PHP 7.4
Top ten of PHP 7.4
 
Knowledge Sharing Session on JavaScript Source Maps & Angular Compilation
Knowledge Sharing Session on JavaScript Source Maps & Angular CompilationKnowledge Sharing Session on JavaScript Source Maps & Angular Compilation
Knowledge Sharing Session on JavaScript Source Maps & Angular Compilation
 
Testing with Mongo Orchestration
Testing with Mongo OrchestrationTesting with Mongo Orchestration
Testing with Mongo Orchestration
 
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
 

Similar to ARB_gl_spirv implementation in Mesa: status update (XDC 2018)

ARB_gl_spirv: bringing SPIR-V to Mesa OpenGL (FOSDEM 2018)
ARB_gl_spirv: bringing SPIR-V to Mesa OpenGL (FOSDEM 2018)ARB_gl_spirv: bringing SPIR-V to Mesa OpenGL (FOSDEM 2018)
ARB_gl_spirv: bringing SPIR-V to Mesa OpenGL (FOSDEM 2018)
Igalia
 
OpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsOpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUs
Mark Kilgard
 
Implementing GraphQL API in Elixir – Victor Deryagin
Implementing GraphQL API in Elixir – Victor DeryaginImplementing GraphQL API in Elixir – Victor Deryagin
Implementing GraphQL API in Elixir – Victor Deryagin
Elixir Club
 
One Year of Porting - Post-mortem of two Linux/SteamOS launches
One Year of Porting - Post-mortem of two Linux/SteamOS launchesOne Year of Porting - Post-mortem of two Linux/SteamOS launches
One Year of Porting - Post-mortem of two Linux/SteamOS launches
Leszek Godlewski
 
Spock pres
Spock presSpock pres
Spock pres
elizhender
 
Дмитрий Вовк - Learn iOS Game Optimization. Ultimate Guide
Дмитрий Вовк - Learn iOS Game Optimization. Ultimate GuideДмитрий Вовк - Learn iOS Game Optimization. Ultimate Guide
Дмитрий Вовк - Learn iOS Game Optimization. Ultimate Guide
UA Mobile
 
LCE13: Test and Validation Summit: The future of testing at Linaro
LCE13: Test and Validation Summit: The future of testing at LinaroLCE13: Test and Validation Summit: The future of testing at Linaro
LCE13: Test and Validation Summit: The future of testing at Linaro
Linaro
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
Eugene Yokota
 
An evening with Postgresql
An evening with PostgresqlAn evening with Postgresql
An evening with Postgresql
Joshua Drake
 
LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205
Linaro
 
Best practices for ansible
Best practices for ansibleBest practices for ansible
Best practices for ansible
George Shuklin
 
High performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbHigh performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodb
Wei Shan Ang
 
Callgraph analysis
Callgraph analysisCallgraph analysis
Callgraph analysis
Roberto Agostino Vitillo
 
Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!
Sylvain Wallez
 
Porting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons LearnedPorting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons Learned
basisspace
 
Gopher in performance_tales_ms_go_cracow
Gopher in performance_tales_ms_go_cracowGopher in performance_tales_ms_go_cracow
Gopher in performance_tales_ms_go_cracow
MateuszSzczyrzyca
 
Performance optimization techniques for Java code
Performance optimization techniques for Java codePerformance optimization techniques for Java code
Performance optimization techniques for Java code
Attila Balazs
 
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
Aleksander Alekseev
 
Feature toggling
Feature togglingFeature toggling
Feature toggling
T. Alexander Lystad
 
Kernel Recipes 2013 - Kernel for your device
Kernel Recipes 2013 - Kernel for your deviceKernel Recipes 2013 - Kernel for your device
Kernel Recipes 2013 - Kernel for your device
Anne Nicolas
 

Similar to ARB_gl_spirv implementation in Mesa: status update (XDC 2018) (20)

ARB_gl_spirv: bringing SPIR-V to Mesa OpenGL (FOSDEM 2018)
ARB_gl_spirv: bringing SPIR-V to Mesa OpenGL (FOSDEM 2018)ARB_gl_spirv: bringing SPIR-V to Mesa OpenGL (FOSDEM 2018)
ARB_gl_spirv: bringing SPIR-V to Mesa OpenGL (FOSDEM 2018)
 
OpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsOpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUs
 
Implementing GraphQL API in Elixir – Victor Deryagin
Implementing GraphQL API in Elixir – Victor DeryaginImplementing GraphQL API in Elixir – Victor Deryagin
Implementing GraphQL API in Elixir – Victor Deryagin
 
One Year of Porting - Post-mortem of two Linux/SteamOS launches
One Year of Porting - Post-mortem of two Linux/SteamOS launchesOne Year of Porting - Post-mortem of two Linux/SteamOS launches
One Year of Porting - Post-mortem of two Linux/SteamOS launches
 
Spock pres
Spock presSpock pres
Spock pres
 
Дмитрий Вовк - Learn iOS Game Optimization. Ultimate Guide
Дмитрий Вовк - Learn iOS Game Optimization. Ultimate GuideДмитрий Вовк - Learn iOS Game Optimization. Ultimate Guide
Дмитрий Вовк - Learn iOS Game Optimization. Ultimate Guide
 
LCE13: Test and Validation Summit: The future of testing at Linaro
LCE13: Test and Validation Summit: The future of testing at LinaroLCE13: Test and Validation Summit: The future of testing at Linaro
LCE13: Test and Validation Summit: The future of testing at Linaro
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
 
An evening with Postgresql
An evening with PostgresqlAn evening with Postgresql
An evening with Postgresql
 
LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205
 
Best practices for ansible
Best practices for ansibleBest practices for ansible
Best practices for ansible
 
High performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbHigh performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodb
 
Callgraph analysis
Callgraph analysisCallgraph analysis
Callgraph analysis
 
Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!
 
Porting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons LearnedPorting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons Learned
 
Gopher in performance_tales_ms_go_cracow
Gopher in performance_tales_ms_go_cracowGopher in performance_tales_ms_go_cracow
Gopher in performance_tales_ms_go_cracow
 
Performance optimization techniques for Java code
Performance optimization techniques for Java codePerformance optimization techniques for Java code
Performance optimization techniques for Java code
 
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
 
Feature toggling
Feature togglingFeature toggling
Feature toggling
 
Kernel Recipes 2013 - Kernel for your device
Kernel Recipes 2013 - Kernel for your deviceKernel Recipes 2013 - Kernel for your device
Kernel Recipes 2013 - Kernel for your device
 

More from Igalia

The journey towards stabilizing Chromium’s Wayland support
The journey towards stabilizing Chromium’s Wayland supportThe journey towards stabilizing Chromium’s Wayland support
The journey towards stabilizing Chromium’s Wayland support
Igalia
 
Sustainable Futures: Funding the Web Ecosystem
Sustainable Futures: Funding the Web EcosystemSustainable Futures: Funding the Web Ecosystem
Sustainable Futures: Funding the Web Ecosystem
Igalia
 
Status of the Layer-Based SVG Engine in WebKit
Status of the Layer-Based SVG Engine in WebKitStatus of the Layer-Based SVG Engine in WebKit
Status of the Layer-Based SVG Engine in WebKit
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 WPE
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
 
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
Igalia
 
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
Igalia
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdf
Igalia
 
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
Igalia
 
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 GStreamer
Igalia
 
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
Igalia
 
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
Igalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera Linux
Igalia
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVM
Igalia
 
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
Igalia
 
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
Igalia
 
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
Igalia
 
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
Igalia
 

More from Igalia (20)

The journey towards stabilizing Chromium’s Wayland support
The journey towards stabilizing Chromium’s Wayland supportThe journey towards stabilizing Chromium’s Wayland support
The journey towards stabilizing Chromium’s Wayland support
 
Sustainable Futures: Funding the Web Ecosystem
Sustainable Futures: Funding the Web EcosystemSustainable Futures: Funding the Web Ecosystem
Sustainable Futures: Funding the Web Ecosystem
 
Status of the Layer-Based SVG Engine in WebKit
Status of the Layer-Based SVG Engine in WebKitStatus of the Layer-Based SVG Engine in WebKit
Status of the Layer-Based SVG Engine in WebKit
 
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
 
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...
 
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
 

Recently uploaded

Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
marufrahmanstratejm
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 

Recently uploaded (20)

Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 

ARB_gl_spirv implementation in Mesa: status update (XDC 2018)

  • 1. static void _f_do_barnacle_install_properties(GObjectClass *gobject_class) { GParamSpec *pspec; /* Party code attribute */ pspec = g_param_spec_uint64 (F_DO_BARNACLE_CODE, "Barnacle code.", "Barnacle code", 0, G_MAXUINT64, G_MAXUINT64 /* default value */, G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_PRIVATE); g_object_class_install_property (gobject_class, F_DO_BARNACLE_PROP_CODE, ARB_gl_spirv implementation on Mesa: status update
  • 3. Topics ● What we are talking about: some specs ● Previous presentation, status then ● Evolution ● Testing ● Current status, future
  • 4. GLSL ● OpenGL Shading Language. ● C-Like high-level language shading language ● ARB_vertex/fragment_program too low level. Several vendor alternatives. ● Introduced as an OpenGL 1.4 extension on 2003, part of the OpenGL 2.0 core on 2002 ● The original shader is included on your program.
  • 5. SPIR-V ● Introduced as SPIR in 2011 ● Standard Portable Intermediate Representation ● Initially for 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
  • 6. OpenGL and Vulkan: common ecosystem ● Some applications are porting from one to the other, or want to support both ● Some interoperability are desired ● But one use GLSL, other SPIR-V as shading language ● Fist step: GL_KHR_vulkan_glsl
  • 7. GL_KHR_vulkan_glsl ● Modifies GLSL to be used for Vulkan ● Announced on Dec 2015 ● GLSL is compiled down to SPIR-V, which the Vulkan API consumes ● Not a driver extension, but frontend one. ● Removes several features, add others ● “Just GLSL” is not suitable for Vulkan consumption
  • 8. GL_ARB_gl_spirv ● Allow SPIR-V modules to be loaded on OpenGL ● Modifies GLSL to be a source for creating SPIR-V modules for OpenGL consumption ● Based on the previous, but not exactly the same ● Also adds/removes features ● Driver + frontend extension ● “Just GLSL” (through SPIR-V) not suitable for OpenGL consumption either.
  • 10. FOSDEM status summary (I) ● Mesa already has a way to handle SPIR-V shaders, thanks to Vulkan ● SPIR-V to NIR pass ● NIR is one of the Intermediate Representations used at Mesa (IR, NIR, TGSI, etc) ● Problem: shader linking was based on IR
  • 11. FOSDEM status summary (II) ● First workaround: partial conversion to IR ● “Shadow variables” ● Good for bootstrap, discarded soon ● First proof-of-concept was implemented, good enough to pass all the CTS tests ● Cleaned up version of this implementation was used on a downstream version of the Intel driver to pass the conformance ● Challenge: was decided a new linker for ARB_gl_spirv, based on NIR
  • 12. FOSDEM status summary (III) ● Main reason: ARB_gl_spirv linking needs to work without names ● But current GLSL, so it’s linker, is based on names /* 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. */
  • 14. The NIR linker is needing a lot of time, do you regret starting it? ● No.
  • 15. The NIR linker is needing a lot of time, do you regret starting it? ● No. ● During this time even more difference between the GLSL linker and what an ARB_gl_spirv linker needs were found ● Specifically, even although the general rule is trying to behave as similar as possible as OpenGL, some things are done “in the Vulkan way”
  • 16. Why not just extend the shadow variables idea? NIR to IR pass? ● We would still have the problem of not having a name ● GLSL linking rules, specially validations, are mostly based on names ● Bold statement: even if we had a SPIR-V to IR pass, separate code/linking for ARB_gl_spirv would make sense.
  • 17. Why not just make-up a name and go with the IR linking? ● How do you make up the name? ● Sometimes you would need the binding, other the location, offset, etc ● You would mean the semantics of what you are using for linking at a given moment ● The spec itself encourages to “link the vulkan- way”: built-in decorations, locations, etc ● “Make-up a name” is not only hacky, sounds hacky too
  • 18. Why a NIR linker so tailored to ARB_gl_spirv, why not for both? ● Again, GLSL linking are mostly based on the ubo/uniforms/etc names ● Initial stages tried to design a solution for both, and also share as much code as possible for existing linker. ● Outcome: block ● We still think that the differences on the spec justifies a different linker ● Still trying to share as much as possible
  • 19. But why it is taking so long? Isn't SPIR-V more straight-forward? ● In the end, it is needed to feed up the same internal structures that with a GLSL linker ● Uniforms need to be enumerated from their block, among other things, to know how many we have ● Ditto for info related to them, like ubo/ssbo buffer size
  • 20. Wait there! Number of uniforms? Buffer sizes? I thought that SPIRV din’t require introspection? ● That’s not inherent to SPIR-V ● It is just how Vulkan uses it, or requires from it
  • 21. Wait, I have read the spec, I found several “no reflection required”. ● Yes, issue (8) says “First start without reflection” ● And then issue (12) says “No reflection required”
  • 22. Wait, I have read the spec, I found several “no reflection required”. ● Yes, issue (8) says “First start without reflection” ● And then issue (12) says “No reflection required” ● But on those, it refers to “name reflection APIs”, not any introspection at all (yes can be confusing)
  • 23. Wait, I have read the spec, I found several “no reflection required”. ● Yes, issue (8) says “First start without reflection” ● And then issue (12) says “No reflection required” ● But on those, it refers to “name reflection APIs”, not any introspection at all (yes can be confusing) ● From issue (19): “C) Allow as much as possible to work "naturally". You can query for the number of active resources, and for details about them. Anything that doesn't query by name will work as expected."
  • 24. So this linker needs to re- implement all what GLSL does? ● No. The scope is really smaller. ● Mesa GLSL linker need to support different versions of GLSL, with several rules/features added for years. ● We can assume that the SPIR-V module has been validated. Undefined behaviour allowed for wrong SPIR-V ● Several features were removed, or become simpler (example: no specific memory layouts)
  • 26. Testing ● Passing CTS is not enough to be considered production ready ● Were good to test the ARB_gl_spirv specifics, shallow for testing the full range of features allowed ● We use extensively Piglit
  • 27. Piglit ● Open-source test suite for OpenGL implementations ● Heavily used by Mesa developers ● Several of their tests uses shader_runner ● Individual test uses a text format ● This includes the shader source, data values and expected values
  • 28. shader_test example [require] GL >= 3.3 GLSL >= 4.50 [vertex shader passthrough] [fragment shader] #version 450 layout(location = 0) uniform vec4 color; layout(location = 0) out vec4 outcolor; void main() { outcolor = color; } [test] clear color 1.0 0.0 0.0 0.0 clear #color uniform vec4 0 0.0 1.0 0.0 1.0 verify program_query GL_ACTIVE_UNIFORMS 1 draw rect -1 -1 2 2 probe all rgba 0.0 1.0 0.0 1.0
  • 29. Piglit (barebone tests) ● Nicolai added support for ARB_gl_spirv on shader_runner ● Also added a script that parses the shader_test, and call glslang to create the SPIR-V source ● This allowed to add tests for the extension ● We are adding them as we implement features, but even more is needed
  • 30. Piglit (borrowed tests) ● The script tries to be able to reuse tests written originally for other specs ● In some cases, it does some fixing ● Like setting explicit location/binding etc ● Also automatic filtering of tests that are not compatible with ARB_gl_spirv ● We got a lot of tests this way. Allowed a test- based implementation since basically day 0.
  • 31. Piglit (conversion numbers) ● From the 2174 hand-written tests: ● 926 skipped, 24 fail ● 1224 tests successfully generated ● From the 32386 generated tests: ● 1775 skipped ● 30611 tests successfully generated ● We got 31835 tests with SPIR-V shaders just borrowing tests from other specs
  • 32. Piglit (pass rate) ● With our development branch: ● [34561] skip: 5928, pass:28508, fail:114, crash: 11 ● Most crashes come from lack of multi- dimensional ubo/ssbo ● Most failures come from missing more validation checks ● Several of them are likely to be skipped
  • 34. What we already have on master? ● ~80 Mesa patches, and ~30 patches are already on their respective masters ● Thanks to all reviewers, specially Timothy Arceri and Jason Ekstrand ● Those cover ● Uniforms ● Atomic counters ● Transform feedback and geometry streams ● 64-bit and 64-bit vertex attribute ● etc
  • 35. What’s happening now? ● Just this week we send a 26 patches series with the ubo/ssbo support, and some extras ● Minus multi-dimensional arrays ● Those extras are mostly in order to get all the ARB_gl_spirv CTS tests passing
  • 36. What’s next? (mandatory) ● Improve interface query support ● A lot of work done on testing ● Multidimensional ubo/ssbo ● Validation ● Enable extension
  • 37. What’s next? (long term) ● Shader cache support ● Right now we disable on the ARB_gl_spirv path ● Bring names if available ● Test with real applications
  • 39. Two worlds ● The best of two worlds ● SPIR-V on OpenGL! ● But you can still use as much OpenGL API as possible! ●
  • 40. Two worlds ● The best of two worlds ● SPIR-V on OpenGL! ● But you can still use as much OpenGL API as possible! ● The worst of two worlds: ● OpenGL driver need to do more linking with SPIR-V that the Vulkan driver ● Just to provide a subset of the OpenGL introspection
  • 41. Shouldn’t it better to chose one? ● Depends on the main use case ● Transitional helper while people port to Vulkan? Or a way to help to reduce the cost of having two renderers? ● On the former, “OpenGL way of things” make more sense ● On the latter, “Vulkan way of things” make more sense
  • 42. GLSL confusion ● Two different specs defining the GLSL valid for SPIR-V generation ● Too many feature switching/tweaking ● Although it is most a frontend problem, in the end the driver needs to support a set of features ● Sometimes not so clear what is needed to be supported ● Likely a issue for applications too
  • 44. Who is working on this? ● Started by Nicolai Hänhle ● Continued by Igalia ● Supported by Intel