SlideShare a Scribd company logo
1 of 25
Download to read offline
Raspberry Pi 5: Challenges
and Solutions in Bringing up
an OpenGL/Vulkan Driver for a
New GPU
● Alejandro Piñeiro Iglesias (apinheiro@igalia.com)
● Working at the Igalia graphics team on the Raspberry
Pi graphics stack for 4 years, and previously on Intel
GPU
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
Who I am
Mesa
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● Open Source implementation of OpenGL, Vulkan, and
other graphics API specifications.
● Implements several pieces that can be reused for
different drivers
● OpenGL and Vulkan API translation
● GLSL and SPIR-V parsing, compiler
● etc
Mesa - Drivers
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● Intel (i965, i915, Iris, Anvil, Crocus)
● AMD (radeonsi, r600, radv)
● NVIDIA (nouveau, nvk)
● Vivante (etnaviv)
● Qualcomm Adreno (freedreno, turnip)
● Arm mali (lima, panfrost, panvk)
● Broadcom (vc4, v3d, v3dv)
Raspberry Pi
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● Raspberry Pi is a series of small single-board
computers
● Originally leaned toward promotion of computer
science teaching
● Become really popular and expanded outside its target
market, now being used in diverse uses
● ARM processor, VideoCore Broadcom GPU
Raspberry Pi – timeline
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● Raspberry Pi – 2012
● Raspberry Pi 2 – 2015
● Raspberry Pi 3 – 2016
● Raspberry Pi 4 – 2019
● Raspberry Pi 5 – 2023
Raspberry Pi - drivers
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
HW Kernel Driver Mesa Driver GPU
Raspberry Pi 1/2/3 vc4
(display+render)
vc4 (GL/ES) VideoCore4
Raspberry Pi 4 vc4(display)
v3d(render)
v3d(GL/ES)
v3dv(Vulkan)
VideoCore6
Raspberry Pi 5 vc4(display)
v3d(render)
v3d(GL/ES)
v3dv(Vulkan)
VideoCore7
Raspberry Pi - Igalia
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● Igalia started to work with the Broadcom mesa drivers
in 2018, slightly after RPI4 announcement
● VC4 and V3D were already working, and available
upstream on Mesa
● Initial work centered on mature existing driver and
extend functionality (like extensions)
● RPI4 has been OpenGL ES 3.1 conformant since 2020
Raspberry Pi – v3dv (I)
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● Vulkan driver for the rpi4
● “From scratch”: re-use as much as possible
● Mesa frontend
● Several v3d components were re-used and
refactored to become common: HW command
definitions, ISA definition, compiler, simulator
Raspberry Pi – v3dv (II)
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● November 2019: starting
● January 2020: Triangle!
● August 2020: Vulkan 1.0 mandatory
● October 2020: Vulkan 1.0 conformant
● December 2020: Performance work
● December 2021: Vulkan 1.1 conformant
● July 2022: Vulkan 1.2 conformant
Raspberry Pi – v3dv (III)
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
RPI 5 – description (I)
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● GPU Broadcom V3D 7.1.6, same VideoCore
architecture
● Higher clock rate
● Up to 8 RTs
● Better support for subgroup operations
● Better instruction-level parallelism
(but a bit more register pressure!)...
RPI 5 – description (II)
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● GPU Broadcom V3D 7.1.6, same VideoCore
architecture
● More image format supported
● New assembly instructions (like packing)
● HW support for several features
 fullDrawIndexUint32
 depthClamp and depthBounds, etc
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
But before thinking on working on all those new
features ...
RPI 5 – a lot of changes
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● The new features added significant changes on the
HW packets
● New assembly instructions, better parallelism, etc
brought several changes on how to deal with the GPU
set of instructions, registers, and signals
● Started work under the assumption of not needing a
new driver, but v3d/v3dv with more codepaths
RPI 5 – pre work
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● v3d codebase was already organized in a way that
supported several HW generations
● v3dv was not, so this work was added and upstreamed
● During all development we tried to upstream any
change coming from the rpi5 support work if possible
● At least one rebase against mesa main per week
RPI 5 – simulator (I)
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● Work started without HW available, using a simulator
● Not feasible for real apps. Not a problem as ...
● Even regular tests (CTS) were too complex at the
beginning
● Started with just one driver (v3dv)
● Started with the more simple tests possible
● Hard to parallelize task: one developer first
RPI 5 – simulator (II)
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● Simpler tests only required some HW packets updates
● Most of initial work done on the compiler
● Focus on getting something working
● Initially all optimizations (instruction merge, using
immediates, etc) were disabled
RPI 5 – simulator (III)
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
The classic triangle is back!
RPI 5 – simulator (IV)
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● Moved to have two people working
● Still first with small tests, then moved to use CTS as
reference
● Got most of the Vulkan CTS tests passing
● Port the changes to v3d
● Re-implement compiler optimizations to RPI5
● Adding features not supported by RPI4
RPI 5 – real device (I)
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● We got the real device!
● Bootable kernel, but without GPU support
● Surprises:
● Changes on some IRQs
● Difference on how handle compute shaders
● Incomplete documentation (mostly typos)
RPI 5 – real device (II)
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● Testing OpenGL / OpenGL ES using the local built
driver was trickier
● Required an X server running, and using it
● Required building X and some dependencies
ourselves, and starting the server manually
RPI 5 – finally out
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● 28 September 2023: Public announcement, MR
created on Upstream Mesa
● 14 October 2023: code merged
● 23 October 2023: available to buy
● 2 November 2023: Vulkan 1.2 and OpenGL ES 3.1
Khronos conformant.
RPI 5 – current work
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
● Maintenance work
● Handle issues created by users
● Keep adding features
● Really near of Vulkan 1.3
● Keep working on performance work
Q&A
Rasperry Pi 5.
Alejandro Piñeiro Iglesias
Join Us!
https://www.igalia.com/jobs

More Related Content

Similar to Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driver for a New GPU

Similar to Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driver for a New GPU (20)

Glimworm 21-11-2013
Glimworm 21-11-2013Glimworm 21-11-2013
Glimworm 21-11-2013
 
OpenDataPlane Testing in Travis
OpenDataPlane Testing in TravisOpenDataPlane Testing in Travis
OpenDataPlane Testing in Travis
 
Introduction to Linux-wpan and Potential Collaboration
Introduction to Linux-wpan and Potential CollaborationIntroduction to Linux-wpan and Potential Collaboration
Introduction to Linux-wpan and Potential Collaboration
 
Developing Android Platform Tools
Developing Android Platform ToolsDeveloping Android Platform Tools
Developing Android Platform Tools
 
State of Big Data on ARM64 / AArch64 - Apache Bigtop
State of Big Data on ARM64 / AArch64 - Apache BigtopState of Big Data on ARM64 / AArch64 - Apache Bigtop
State of Big Data on ARM64 / AArch64 - Apache Bigtop
 
Glimworm 21 11-13 (1)
Glimworm 21 11-13 (1)Glimworm 21 11-13 (1)
Glimworm 21 11-13 (1)
 
IoT: LoRa and Java on the PI
IoT: LoRa and Java on the PIIoT: LoRa and Java on the PI
IoT: LoRa and Java on the PI
 
Infrastructure as a Code
Infrastructure as a Code Infrastructure as a Code
Infrastructure as a Code
 
Automation using RaspberryPi and Arduino
Automation using RaspberryPi and ArduinoAutomation using RaspberryPi and Arduino
Automation using RaspberryPi and Arduino
 
Extending Android's Platform Toolsuite
Extending Android's Platform ToolsuiteExtending Android's Platform Toolsuite
Extending Android's Platform Toolsuite
 
PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley
PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon SelleyPT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley
PT-4052, Introduction to AMD Developer Tools, by Yaki Tebeka and Gordon Selley
 
ceph openstack dream team
ceph openstack dream teamceph openstack dream team
ceph openstack dream team
 
DrupalCon Europe 2020 Low Code
DrupalCon Europe 2020 Low CodeDrupalCon Europe 2020 Low Code
DrupalCon Europe 2020 Low Code
 
Deep Learning with GPUs in Production - AI By the Bay
Deep Learning with GPUs in Production - AI By the BayDeep Learning with GPUs in Production - AI By the Bay
Deep Learning with GPUs in Production - AI By the Bay
 
LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205
 
Bringing Tizen to a Raspberry Pi 2 Near You
Bringing Tizen to a Raspberry Pi 2 Near YouBringing Tizen to a Raspberry Pi 2 Near You
Bringing Tizen to a Raspberry Pi 2 Near You
 
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdfAdvanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
 
CodiLime Tech Talk - Dawid Trzebiatowski i Wojciech Urbański: Opening the Flo...
CodiLime Tech Talk - Dawid Trzebiatowski i Wojciech Urbański: Opening the Flo...CodiLime Tech Talk - Dawid Trzebiatowski i Wojciech Urbański: Opening the Flo...
CodiLime Tech Talk - Dawid Trzebiatowski i Wojciech Urbański: Opening the Flo...
 
Deploy Multinode GitLab Runner in openSUSE 15.1 Instances with Ansible Automa...
Deploy Multinode GitLab Runner in openSUSE 15.1 Instances with Ansible Automa...Deploy Multinode GitLab Runner in openSUSE 15.1 Instances with Ansible Automa...
Deploy Multinode GitLab Runner in openSUSE 15.1 Instances with Ansible Automa...
 
LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2
 

More from 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
 
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
 
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
 
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
 

More from 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...
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 

Recently uploaded (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driver for a New GPU

  • 1. Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driver for a New GPU
  • 2. ● Alejandro Piñeiro Iglesias (apinheiro@igalia.com) ● Working at the Igalia graphics team on the Raspberry Pi graphics stack for 4 years, and previously on Intel GPU Rasperry Pi 5. Alejandro Piñeiro Iglesias Who I am
  • 3. Mesa Rasperry Pi 5. Alejandro Piñeiro Iglesias ● Open Source implementation of OpenGL, Vulkan, and other graphics API specifications. ● Implements several pieces that can be reused for different drivers ● OpenGL and Vulkan API translation ● GLSL and SPIR-V parsing, compiler ● etc
  • 4. Mesa - Drivers Rasperry Pi 5. Alejandro Piñeiro Iglesias ● Intel (i965, i915, Iris, Anvil, Crocus) ● AMD (radeonsi, r600, radv) ● NVIDIA (nouveau, nvk) ● Vivante (etnaviv) ● Qualcomm Adreno (freedreno, turnip) ● Arm mali (lima, panfrost, panvk) ● Broadcom (vc4, v3d, v3dv)
  • 5. Raspberry Pi Rasperry Pi 5. Alejandro Piñeiro Iglesias ● Raspberry Pi is a series of small single-board computers ● Originally leaned toward promotion of computer science teaching ● Become really popular and expanded outside its target market, now being used in diverse uses ● ARM processor, VideoCore Broadcom GPU
  • 6. Raspberry Pi – timeline Rasperry Pi 5. Alejandro Piñeiro Iglesias ● Raspberry Pi – 2012 ● Raspberry Pi 2 – 2015 ● Raspberry Pi 3 – 2016 ● Raspberry Pi 4 – 2019 ● Raspberry Pi 5 – 2023
  • 7. Raspberry Pi - drivers Rasperry Pi 5. Alejandro Piñeiro Iglesias HW Kernel Driver Mesa Driver GPU Raspberry Pi 1/2/3 vc4 (display+render) vc4 (GL/ES) VideoCore4 Raspberry Pi 4 vc4(display) v3d(render) v3d(GL/ES) v3dv(Vulkan) VideoCore6 Raspberry Pi 5 vc4(display) v3d(render) v3d(GL/ES) v3dv(Vulkan) VideoCore7
  • 8. Raspberry Pi - Igalia Rasperry Pi 5. Alejandro Piñeiro Iglesias ● Igalia started to work with the Broadcom mesa drivers in 2018, slightly after RPI4 announcement ● VC4 and V3D were already working, and available upstream on Mesa ● Initial work centered on mature existing driver and extend functionality (like extensions) ● RPI4 has been OpenGL ES 3.1 conformant since 2020
  • 9. Raspberry Pi – v3dv (I) Rasperry Pi 5. Alejandro Piñeiro Iglesias ● Vulkan driver for the rpi4 ● “From scratch”: re-use as much as possible ● Mesa frontend ● Several v3d components were re-used and refactored to become common: HW command definitions, ISA definition, compiler, simulator
  • 10. Raspberry Pi – v3dv (II) Rasperry Pi 5. Alejandro Piñeiro Iglesias ● November 2019: starting ● January 2020: Triangle! ● August 2020: Vulkan 1.0 mandatory ● October 2020: Vulkan 1.0 conformant ● December 2020: Performance work ● December 2021: Vulkan 1.1 conformant ● July 2022: Vulkan 1.2 conformant
  • 11. Raspberry Pi – v3dv (III) Rasperry Pi 5. Alejandro Piñeiro Iglesias
  • 12. RPI 5 – description (I) Rasperry Pi 5. Alejandro Piñeiro Iglesias ● GPU Broadcom V3D 7.1.6, same VideoCore architecture ● Higher clock rate ● Up to 8 RTs ● Better support for subgroup operations ● Better instruction-level parallelism (but a bit more register pressure!)...
  • 13. RPI 5 – description (II) Rasperry Pi 5. Alejandro Piñeiro Iglesias ● GPU Broadcom V3D 7.1.6, same VideoCore architecture ● More image format supported ● New assembly instructions (like packing) ● HW support for several features  fullDrawIndexUint32  depthClamp and depthBounds, etc
  • 14. Rasperry Pi 5. Alejandro Piñeiro Iglesias But before thinking on working on all those new features ...
  • 15. RPI 5 – a lot of changes Rasperry Pi 5. Alejandro Piñeiro Iglesias ● The new features added significant changes on the HW packets ● New assembly instructions, better parallelism, etc brought several changes on how to deal with the GPU set of instructions, registers, and signals ● Started work under the assumption of not needing a new driver, but v3d/v3dv with more codepaths
  • 16. RPI 5 – pre work Rasperry Pi 5. Alejandro Piñeiro Iglesias ● v3d codebase was already organized in a way that supported several HW generations ● v3dv was not, so this work was added and upstreamed ● During all development we tried to upstream any change coming from the rpi5 support work if possible ● At least one rebase against mesa main per week
  • 17. RPI 5 – simulator (I) Rasperry Pi 5. Alejandro Piñeiro Iglesias ● Work started without HW available, using a simulator ● Not feasible for real apps. Not a problem as ... ● Even regular tests (CTS) were too complex at the beginning ● Started with just one driver (v3dv) ● Started with the more simple tests possible ● Hard to parallelize task: one developer first
  • 18. RPI 5 – simulator (II) Rasperry Pi 5. Alejandro Piñeiro Iglesias ● Simpler tests only required some HW packets updates ● Most of initial work done on the compiler ● Focus on getting something working ● Initially all optimizations (instruction merge, using immediates, etc) were disabled
  • 19. RPI 5 – simulator (III) Rasperry Pi 5. Alejandro Piñeiro Iglesias The classic triangle is back!
  • 20. RPI 5 – simulator (IV) Rasperry Pi 5. Alejandro Piñeiro Iglesias ● Moved to have two people working ● Still first with small tests, then moved to use CTS as reference ● Got most of the Vulkan CTS tests passing ● Port the changes to v3d ● Re-implement compiler optimizations to RPI5 ● Adding features not supported by RPI4
  • 21. RPI 5 – real device (I) Rasperry Pi 5. Alejandro Piñeiro Iglesias ● We got the real device! ● Bootable kernel, but without GPU support ● Surprises: ● Changes on some IRQs ● Difference on how handle compute shaders ● Incomplete documentation (mostly typos)
  • 22. RPI 5 – real device (II) Rasperry Pi 5. Alejandro Piñeiro Iglesias ● Testing OpenGL / OpenGL ES using the local built driver was trickier ● Required an X server running, and using it ● Required building X and some dependencies ourselves, and starting the server manually
  • 23. RPI 5 – finally out Rasperry Pi 5. Alejandro Piñeiro Iglesias ● 28 September 2023: Public announcement, MR created on Upstream Mesa ● 14 October 2023: code merged ● 23 October 2023: available to buy ● 2 November 2023: Vulkan 1.2 and OpenGL ES 3.1 Khronos conformant.
  • 24. RPI 5 – current work Rasperry Pi 5. Alejandro Piñeiro Iglesias ● Maintenance work ● Handle issues created by users ● Keep adding features ● Really near of Vulkan 1.3 ● Keep working on performance work
  • 25. Q&A Rasperry Pi 5. Alejandro Piñeiro Iglesias Join Us! https://www.igalia.com/jobs