SlideShare a Scribd company logo
Update on Open
Source Vulkan Driver
for Adreno GPUs
Danylo Piliaiev
2024-02-04
1
New Hardware Support
A7XX GPUs are now supported
A730/A740 merged last year
A750 has MR on review
Direct (non-tile-based) rendering passes CTS tests
Tile-based rendering is still WIP
Most A6XX GPU variants are supported
A6XX is divided in 5 sub-generations
2
Notable Changes
Major Extensions:
VK_EXT_descriptor_buffer
VK_EXT_extended_dynamic_state3
VK_EXT_graphics_pipeline_library
VK_EXT_fragment_density_map
VK_EXT_inline_uniform_block
VK_KHR_dynamic_rendering
Vulkan 1.3 is supported for a while now
3
Notable Changes
A lot of recent focus was on correctness:
Fixing vkcts tests
Fixing issues in various games
Lots of pipelines code improvements from Connor
IR3 optimizations
Better debug tooling
4
Better Debug Tooling
Especially important for reverse-engineering
Gave in-depth talk at 2023 XDC
"Debugging GPU faults: QoL tools for your driver"
Tooling:
GPU breadcrumbs
GPU command stream replaying
GPU command stream editing
Printing from shader assembly
Stale reg debugging
https://www.youtube.com/watch?v=FI0nfK4O8r
Q
5
GPU breadcrumbs
API level breadcrumbs like Graphics Flight Recorder
are cool
They may be too coarse
They generally don't work with unrecoverable hangs
6
GPU command stream replaying
Reproducing hangs and other failures may be hard
Recording submitted commands is simple and
effective
Not all issues are reproducible this way
Requires recording ALL used buffers
> ~/bin/replay /tmp/tu_vkcube.vkcube_device0_combine
Reading /tmp/tu_vkcube.vkcube_device0_combined.rd..
chip_id: 0x7090000
cmdstream 0: 169 dwords
cmdstream 1: 238 dwords
7
GPU command stream editing
Reproducing issue is not enough
How to find out the cause?
What if we could edit any submitted GPU packet?
Good news! It's easy to implement and already used
in Turnip!
/* pkt4: GRAS_2D_RESOLVE_CNTL_2 = { X = 63 | Y = 63 } */
pkt(cs, 4128831);
/* pkt4: RB_BLIT_SCISSOR_TL = { X = 0 | Y = 0 } */
pkt4(cs, 0x88d1, (2), 0);
/* pkt4: RB_BLIT_SCISSOR_BR = { X = 63 | Y = 63 } */
pkt(cs, 4128831);
pkt7(cs, CP_MEM_WRITE, 20);
/* { ADDR_LO = 0x1f7580 } */
pkt(cs, 2061696);
8
Printing from shader assembly
There is a fault in shader, a hang, misrenderings?
Even the most basic print is useful!
sel.b32 r0.y, c1.x, r0.x, c0.x
sel.b32 r0.z, c1.y, r0.x, c0.y
sel.b32 r1.y, c1.z, r0.x, c0.z
sel.b32 r1.z, c1.w, r0.x, c0.w
print r2.x, r0.y, r0.z, r1.y, r1.z
Uses r2.xyz as tmp storage, prints the rest
9
Stale reg debugging
Using value from stale reg is not a rare occurance
Could result in geometry flickering, hangs, random cts
failures
What if we write invalid values to regs:
All regs at the start of each command buffer
To regs used in renderpasses before each
reanderpass/blit
10
Turnip and emulators on Android
Proprietary drivers on Android are rarely updated
Many users are stuck with old drivers and issues
For emulators supporting all quirks of old drivers is
hard
It's easier to use Turnip in many cases
11
Turnip vs Proprietary Driver on Zelda
Sony Xperia 5 II (Adreno 650) + Turnip
Credits to @crumpetdialogue discord user on Yuzu
channel
12
Turnip vs Proprietary Driver on Zelda
Same device, same user, proprietary driver
13
Turnip runs
desktop games
Turnip implements all extension for DXVK and
VKD3D-Proton
Adreno GPUs are rather capable ones!
FEX emulator allows to run x86-64 apps on aarch64
We test game traces and games themselves
14
Future
Support tiling (GMEM) rendering on A7XX
Mark Collins is working on it
Squeeze more performance!
Distant future:
Support raytracing
Maybe mesh shaders are doable
15
Future
Easy way to run desktop games on Android!
(NOT Igalia's project)
There is work-in-progress project called Cassia
It's a Wine+DXVK+VKD3D-Proton+FEXCore on
Android
Turnip would have first party support there
16
But I already saw
desktop games there
Yes, people already running them! On Android, with
Turnip
Via Mobox project: termux + box64 + wine + dxvk +
mesa
Credits to Mad CatZ youtube channel:
17
Q&A
We're hiring!
igalia.com/jobs/
18
19

More Related Content

PDF
Moving NEON to 64 bits
PDF
Vulnerabilities in multiplayer games (2001-2012)
PDF
Implementing a Vulkan Video Encoder From Mesa to GStreamer
PPT
Unity mobile game performance profiling – using arm mobile studio
PDF
Debugging GPU faults: QoL tools for your driver – XDC 2023
PDF
7nm "Navi" GPU - A GPU Built For Performance
 
PDF
Embedded Recipes 2019 - Making embedded graphics less special
PDF
0xdroid osdc-2010-100426084937-phpapp02
Moving NEON to 64 bits
Vulnerabilities in multiplayer games (2001-2012)
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Unity mobile game performance profiling – using arm mobile studio
Debugging GPU faults: QoL tools for your driver – XDC 2023
7nm "Navi" GPU - A GPU Built For Performance
 
Embedded Recipes 2019 - Making embedded graphics less special
0xdroid osdc-2010-100426084937-phpapp02

Similar to turnip: Update on Open Source Vulkan Driver for Adreno GPUs (20)

PDF
ARM Cortex-A53 Errata on Andoid
PPTX
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
PDF
“Open Standards: Powering the Future of Embedded Vision,” a Presentation from...
PDF
Debugging 2013- Jesper Brouer
PDF
Optimizing the graphics pipeline with compute
PDF
Vulkan Video is Open: Application showcase
PPTX
Windows containers troubleshooting
PDF
Dissecting and fixing Vulkan rendering issues in drivers with RenderDoc
PDF
Scalability for All: Unreal Engine* 4 with Intel
PPTX
Exploring Compiler Optimization Opportunities for the OpenMP 4.x Accelerator...
PPTX
Static partitioning virtualization on RISC-V
PDF
Embedded Graphics Drivers in Mesa (ELCE 2019)
PDF
Introduction to the Graphics Pipeline of the PS3
PDF
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
PPT
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
PDF
HKG15-300: Art's Quick Compiler: An unofficial overview
PPTX
Parallel Futures of a Game Engine (v2.0)
PDF
Next Stop, Android
PDF
Making GPU resets less painful on Linux
PDF
Embedded Recipes 2018 - Upstream multimedia on amlogic so cs from fiction t...
ARM Cortex-A53 Errata on Andoid
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
“Open Standards: Powering the Future of Embedded Vision,” a Presentation from...
Debugging 2013- Jesper Brouer
Optimizing the graphics pipeline with compute
Vulkan Video is Open: Application showcase
Windows containers troubleshooting
Dissecting and fixing Vulkan rendering issues in drivers with RenderDoc
Scalability for All: Unreal Engine* 4 with Intel
Exploring Compiler Optimization Opportunities for the OpenMP 4.x Accelerator...
Static partitioning virtualization on RISC-V
Embedded Graphics Drivers in Mesa (ELCE 2019)
Introduction to the Graphics Pipeline of the PS3
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
Developing Applications for Beagle Bone Black, Raspberry Pi and SoC Single Bo...
HKG15-300: Art's Quick Compiler: An unofficial overview
Parallel Futures of a Game Engine (v2.0)
Next Stop, Android
Making GPU resets less painful on Linux
Embedded Recipes 2018 - Upstream multimedia on amlogic so cs from fiction t...
Ad

More from Igalia (20)

PDF
Life of a Kernel Bug Fix
PDF
Unlocking the Full Potential of WPE to Build a Successful Embedded Product
PDF
Advancing WebDriver BiDi support in WebKit
PDF
Jumping Over the Garden Wall - WPE WebKit on Android
PDF
Collective Funding, Governance and Prioritiation of Browser Engine Projects
PDF
Don't let your motivation go, save time with kworkflow
PDF
Solving the world’s (localization) problems
PDF
The Whippet Embeddable Garbage Collection Library
PDF
Nobody asks "How is JavaScript?"
PDF
Getting more juice out from your Raspberry Pi GPU
PDF
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
PDF
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
PDF
CSS :has() Unlimited Power
PDF
Device-Generated Commands in Vulkan
PDF
Current state of Lavapipe: Mesa's software renderer for Vulkan
PDF
Scheme on WebAssembly: It is happening!
PDF
EBC - A new backend compiler for etnaviv
PDF
RISC-V LLVM State of the Union
PDF
Device-Generated Commands in Vulkan
PDF
Downstream challenges
Life of a Kernel Bug Fix
Unlocking the Full Potential of WPE to Build a Successful Embedded Product
Advancing WebDriver BiDi support in WebKit
Jumping Over the Garden Wall - WPE WebKit on Android
Collective Funding, Governance and Prioritiation of Browser Engine Projects
Don't let your motivation go, save time with kworkflow
Solving the world’s (localization) problems
The Whippet Embeddable Garbage Collection Library
Nobody asks "How is JavaScript?"
Getting more juice out from your Raspberry Pi GPU
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
CSS :has() Unlimited Power
Device-Generated Commands in Vulkan
Current state of Lavapipe: Mesa's software renderer for Vulkan
Scheme on WebAssembly: It is happening!
EBC - A new backend compiler for etnaviv
RISC-V LLVM State of the Union
Device-Generated Commands in Vulkan
Downstream challenges
Ad

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
Spectroscopy.pptx food analysis technology
PPTX
A Presentation on Artificial Intelligence
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Electronic commerce courselecture one. Pdf
PPT
Teaching material agriculture food technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Machine learning based COVID-19 study performance prediction
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Encapsulation theory and applications.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Chapter 3 Spatial Domain Image Processing.pdf
Assigned Numbers - 2025 - Bluetooth® Document
A comparative analysis of optical character recognition models for extracting...
Spectroscopy.pptx food analysis technology
A Presentation on Artificial Intelligence
Encapsulation_ Review paper, used for researhc scholars
Spectral efficient network and resource selection model in 5G networks
Electronic commerce courselecture one. Pdf
Teaching material agriculture food technology
Unlocking AI with Model Context Protocol (MCP)
Programs and apps: productivity, graphics, security and other tools
MYSQL Presentation for SQL database connectivity
Machine learning based COVID-19 study performance prediction
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
The AUB Centre for AI in Media Proposal.docx
Encapsulation theory and applications.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

turnip: Update on Open Source Vulkan Driver for Adreno GPUs

  • 1. Update on Open Source Vulkan Driver for Adreno GPUs Danylo Piliaiev 2024-02-04 1
  • 2. New Hardware Support A7XX GPUs are now supported A730/A740 merged last year A750 has MR on review Direct (non-tile-based) rendering passes CTS tests Tile-based rendering is still WIP Most A6XX GPU variants are supported A6XX is divided in 5 sub-generations 2
  • 4. Notable Changes A lot of recent focus was on correctness: Fixing vkcts tests Fixing issues in various games Lots of pipelines code improvements from Connor IR3 optimizations Better debug tooling 4
  • 5. Better Debug Tooling Especially important for reverse-engineering Gave in-depth talk at 2023 XDC "Debugging GPU faults: QoL tools for your driver" Tooling: GPU breadcrumbs GPU command stream replaying GPU command stream editing Printing from shader assembly Stale reg debugging https://www.youtube.com/watch?v=FI0nfK4O8r Q 5
  • 6. GPU breadcrumbs API level breadcrumbs like Graphics Flight Recorder are cool They may be too coarse They generally don't work with unrecoverable hangs 6
  • 7. GPU command stream replaying Reproducing hangs and other failures may be hard Recording submitted commands is simple and effective Not all issues are reproducible this way Requires recording ALL used buffers > ~/bin/replay /tmp/tu_vkcube.vkcube_device0_combine Reading /tmp/tu_vkcube.vkcube_device0_combined.rd.. chip_id: 0x7090000 cmdstream 0: 169 dwords cmdstream 1: 238 dwords 7
  • 8. GPU command stream editing Reproducing issue is not enough How to find out the cause? What if we could edit any submitted GPU packet? Good news! It's easy to implement and already used in Turnip! /* pkt4: GRAS_2D_RESOLVE_CNTL_2 = { X = 63 | Y = 63 } */ pkt(cs, 4128831); /* pkt4: RB_BLIT_SCISSOR_TL = { X = 0 | Y = 0 } */ pkt4(cs, 0x88d1, (2), 0); /* pkt4: RB_BLIT_SCISSOR_BR = { X = 63 | Y = 63 } */ pkt(cs, 4128831); pkt7(cs, CP_MEM_WRITE, 20); /* { ADDR_LO = 0x1f7580 } */ pkt(cs, 2061696); 8
  • 9. Printing from shader assembly There is a fault in shader, a hang, misrenderings? Even the most basic print is useful! sel.b32 r0.y, c1.x, r0.x, c0.x sel.b32 r0.z, c1.y, r0.x, c0.y sel.b32 r1.y, c1.z, r0.x, c0.z sel.b32 r1.z, c1.w, r0.x, c0.w print r2.x, r0.y, r0.z, r1.y, r1.z Uses r2.xyz as tmp storage, prints the rest 9
  • 10. Stale reg debugging Using value from stale reg is not a rare occurance Could result in geometry flickering, hangs, random cts failures What if we write invalid values to regs: All regs at the start of each command buffer To regs used in renderpasses before each reanderpass/blit 10
  • 11. Turnip and emulators on Android Proprietary drivers on Android are rarely updated Many users are stuck with old drivers and issues For emulators supporting all quirks of old drivers is hard It's easier to use Turnip in many cases 11
  • 12. Turnip vs Proprietary Driver on Zelda Sony Xperia 5 II (Adreno 650) + Turnip Credits to @crumpetdialogue discord user on Yuzu channel 12
  • 13. Turnip vs Proprietary Driver on Zelda Same device, same user, proprietary driver 13
  • 14. Turnip runs desktop games Turnip implements all extension for DXVK and VKD3D-Proton Adreno GPUs are rather capable ones! FEX emulator allows to run x86-64 apps on aarch64 We test game traces and games themselves 14
  • 15. Future Support tiling (GMEM) rendering on A7XX Mark Collins is working on it Squeeze more performance! Distant future: Support raytracing Maybe mesh shaders are doable 15
  • 16. Future Easy way to run desktop games on Android! (NOT Igalia's project) There is work-in-progress project called Cassia It's a Wine+DXVK+VKD3D-Proton+FEXCore on Android Turnip would have first party support there 16
  • 17. But I already saw desktop games there Yes, people already running them! On Android, with Turnip Via Mobox project: termux + box64 + wine + dxvk + mesa Credits to Mad CatZ youtube channel: 17
  • 19. 19