SlideShare una empresa de Scribd logo
1 de 24
Descargar para leer sin conexión
Replacing the geometry pipeline
with mesh shaders
Ricardo Garcia
October 4
XDC 2022, Minneapolis
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Main Points
 What are mesh shaders?
 Comparison between classic and mesh shading pipelines
 Problems mesh shaders try to solve
 What a mesh shader looks like
 Problems introduced by mesh shaders
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
What is mesh shading?
 New type of graphics pipeline with simplified stages
 Tries to address shortcoming with classic graphics pipelines on modern HW
 Brings the geometry part of the pipeline closer to the compute model
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Classic Graphics Pipeline
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Mesh Shading Pipeline
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Mesh Shading Pipeline (Full)
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Classic Pipeline Problems
 Vertex inputs are annoying
 No control over how geometry is arranged
 Waste of compute resources
 Waste of memory bandwidth
 Geometry amplification and modification should be simpler and more flexible
 Maybe we can use a model that’s closer to compute shaders
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
How do they look?
#version 450
#extension GL_EXT_mesh_shader : enable
void main ()
{
}
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
How do they look?
#version 450
#extension GL_EXT_mesh_shader : enable
layout (local_size_x=X, local_size_y=Y, local_size_z=Z) in; // Typical limit: 128 invocations.
void main ()
{
// Typical compute built-ins: gl_NumWorkGroups, gl_WorkGroupID, gl_LocalInvocationID, etc.
// Typical subgroup functionality: gl_NumSubgroups, gl_SubgroupID, subgroupElect(), etc.
}
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
How do they look?
#version 450
#extension GL_EXT_mesh_shader : enable
layout (local_size_x=X, local_size_y=Y, local_size_z=Z) in; // Typical limit: 128 invocations.
layout (triangles) out; // May also be points or lines.
void main ()
{
// Typical compute built-ins: gl_NumWorkGroups, gl_WorkGroupID, gl_LocalInvocationID, etc.
// Typical subgroup functionality: gl_NumSubgroups, gl_SubgroupID, subgroupElect(), etc.
}
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
How do they look?
#version 450
#extension GL_EXT_mesh_shader : enable
layout (local_size_x=X, local_size_y=Y, local_size_z=Z) in; // Typical limit: 128 invocations.
layout (triangles) out; // May also be points or lines.
layout (max_vertices=V, max_primitives=P) out; // Typical limit: 256 vert/prim.
void main ()
{
// Typical compute built-ins: gl_NumWorkGroups, gl_WorkGroupID, gl_LocalInvocationID, etc.
// Typical subgroup functionality: gl_NumSubgroups, gl_SubgroupID, subgroupElect(), etc.
}
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
How do they look?
#version 450
#extension GL_EXT_mesh_shader : enable
layout (local_size_x=X, local_size_y=Y, local_size_z=Z) in; // Typical limit: 128 invocations.
layout (triangles) out; // May also be points or lines.
layout (max_vertices=V, max_primitives=P) out; // Typical limit: 256 vert/prim.
void main ()
{
// Typical compute built-ins: gl_NumWorkGroups, gl_WorkGroupID, gl_LocalInvocationID, etc.
// Typical subgroup functionality: gl_NumSubgroups, gl_SubgroupID, subgroupElect(), etc.
SetMeshOutputsEXT(ACTUAL_V, ACTUAL_P);
gl_MeshVerticesEXT[FOO].gl_Position = vec4(…);
gl_PrimitiveTriangleIndicesEXT[BAR] = uvec3(…);
}
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
How do they look?
#version 450
#extension GL_EXT_mesh_shader : enable
layout (local_size_x=X, local_size_y=Y, local_size_z=Z) in; // Typical limit: 128 invocations.
layout (triangles) out; // May also be points or lines.
layout (max_vertices=V, max_primitives=P) out; // Typical limit: 256 vert/prim.
layout (location=0) out vec4 out0[]; // Per-vertex.
layout (location=1) perprimitiveEXT out vec4 out1[]; // Per-primitive.
void main ()
{
// Typical compute built-ins: gl_NumWorkGroups, gl_WorkGroupID, gl_LocalInvocationID, etc.
// Typical subgroup functionality: gl_NumSubgroups, gl_SubgroupID, subgroupElect(), etc.
SetMeshOutputsEXT(ACTUAL_V, ACTUAL_P);
gl_MeshVerticesEXT[FOO].gl_Position = vec4(…);
gl_PrimitiveTriangleIndicesEXT[BAR] = uvec3(…);
}
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Some built-in arrays
// write only access
out uint gl_PrimitivePointIndicesEXT[];
out uvec2 gl_PrimitiveLineIndicesEXT[];
out uvec3 gl_PrimitiveTriangleIndicesEXT[];
// write only access
out gl_MeshPerVertexEXT {
vec4 gl_Position;
float gl_PointSize;
float gl_ClipDistance[];
float gl_CullDistance[];
} gl_MeshVerticesEXT[];
// write only access
perprimitiveEXT out gl_MeshPerPrimitiveEXT {
int gl_PrimitiveID;
int gl_Layer;
int gl_ViewportIndex;
bool gl_CullPrimitiveEXT;
int gl_PrimitiveShadingRateEXT;
} gl_MeshPrimitivesEXT[];
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Meshlets
Image source: https://developer.nvidia.com/blog/introduction-turing-mesh-shaders/
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Dispatching Work Groups
 vkCmdDrawMeshTasksEXT(cmdBuffer, X, Y, Z);
 vkCmdDrawMeshTasksIndirectEXT(cmdBuffer, ...)
 vkCmdDrawMeshTasksIndirectCountEXT(cmdBuffer, …);
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Mesh Shading Pipeline (Full)
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Task (Amplification) Shader
Similar to a two-level compute dispatch
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Task (Amplification) Shader
To uniquely identify the work that needs to be done in each mesh shader work group,
info needs to be passed from the task shader to the mesh shader.
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Payload
#version 450
#extension GL_EXT_mesh_shader : enable
// Typical limit: 128 invocations.
layout (local_size_x=X, local_size_y=Y, local_size_z=Z) in;
struct TaskData {
…
};
taskPayloadSharedEXT TaskData td;
void main ()
{
// Prepare payload for children.
td.SOMETHING = SOMETHING_ELSE;
// Example: (2, 1, 1)
EmitMeshTasksEXT(MeshX, MeshY, MeshZ);
}
#version 450
#extension GL_EXT_mesh_shader : enable
layout (local_size_x=X, local_size_y=Y, local_size_z=Z) in;
layout (triangles) out;
layout (max_vertices=V, max_primitives=P);
struct TaskData {
…
};
taskPayloadSharedEXT TaskData td;
void main ()
{
// Use data from td.
SetMeshOutputsEXT(ACTUAL_V, ACTUAL_P);
gl_MeshVerticesEXT[FOO].gl_Position = …;
gl_MeshTriangleIndicesEXT[BAR] = uvec3(…);
}
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Mesh Shading Pros
 Avoids input assembly bottlenecks.
 Can pre-compute data and discard geometry in advance.
 Can save memory bandwidth by not pulling in unneeded data.
 Flexible geometry amplification.
 Non-sequential programming model.
 Can be used to streamline compute pre-passes into pipeline.
 Can be used as a two-level compute pipeline.
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Mesh Shading Cons
 Problematic for tilers.
 Leaving choices to the user increases room for errors.
 Increases coupling of in-memory vertex data with shaders.
 Different vendors recommend different things for performance.
●
Exposed as properties in the extension.
●
Lower number of invocations, loop.
●
Higher number of invocations, access arrays with gl_LocalInvocationIndex.
Replacing the geometry pipeline with mesh shaders
Ricardo Garcia, 2022-10-04
Q&A
Replacing the geometry pipeline with mesh shaders

Más contenido relacionado

Similar a Replacing the geometry pipeline with mesh shaders

Greg Hogan – To Petascale and Beyond- Apache Flink in the Clouds
Greg Hogan – To Petascale and Beyond- Apache Flink in the CloudsGreg Hogan – To Petascale and Beyond- Apache Flink in the Clouds
Greg Hogan – To Petascale and Beyond- Apache Flink in the CloudsFlink Forward
 
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its author
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its authorKaggle Winning Solution Xgboost algorithm -- Let us learn from its author
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its authorVivian S. Zhang
 
pyjamas22_ generic composite in python.pdf
pyjamas22_ generic composite in python.pdfpyjamas22_ generic composite in python.pdf
pyjamas22_ generic composite in python.pdfAsher Sterkin
 
Refactoring - improving the smell of your code
Refactoring - improving the smell of your codeRefactoring - improving the smell of your code
Refactoring - improving the smell of your codevmandrychenko
 
Extend GraphQL with directives
Extend GraphQL with directivesExtend GraphQL with directives
Extend GraphQL with directivesGreg Bergé
 
Introduction to CUDA C: NVIDIA : Notes
Introduction to CUDA C: NVIDIA : NotesIntroduction to CUDA C: NVIDIA : Notes
Introduction to CUDA C: NVIDIA : NotesSubhajit Sahu
 
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Data Con LA
 
Improving Apache Spark Downscaling
 Improving Apache Spark Downscaling Improving Apache Spark Downscaling
Improving Apache Spark DownscalingDatabricks
 
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...Alessandro Confetti
 
NoSQL - An introduction to CouchDB
NoSQL - An introduction to CouchDBNoSQL - An introduction to CouchDB
NoSQL - An introduction to CouchDBJonathan Weiss
 
Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...
Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...
Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...DataStax
 
Using Spark to Load Oracle Data into Cassandra
Using Spark to Load Oracle Data into CassandraUsing Spark to Load Oracle Data into Cassandra
Using Spark to Load Oracle Data into CassandraJim Hatcher
 
Unlocking Your Hadoop Data with Apache Spark and CDH5
Unlocking Your Hadoop Data with Apache Spark and CDH5Unlocking Your Hadoop Data with Apache Spark and CDH5
Unlocking Your Hadoop Data with Apache Spark and CDH5SAP Concur
 
CouchDB on Rails - FrozenRails 2010
CouchDB on Rails - FrozenRails 2010CouchDB on Rails - FrozenRails 2010
CouchDB on Rails - FrozenRails 2010Jonathan Weiss
 
クラウドDWHとしても進化を続けるPivotal Greenplumご紹介
クラウドDWHとしても進化を続けるPivotal Greenplumご紹介クラウドDWHとしても進化を続けるPivotal Greenplumご紹介
クラウドDWHとしても進化を続けるPivotal Greenplumご紹介Masayuki Matsushita
 
Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8Ovadiah Myrgorod
 
CouchDB on Rails - RailsWayCon 2010
CouchDB on Rails - RailsWayCon 2010CouchDB on Rails - RailsWayCon 2010
CouchDB on Rails - RailsWayCon 2010Jonathan Weiss
 
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeks
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeksBeginning direct3d gameprogramming05_thebasics_20160421_jintaeks
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeksJinTaek Seo
 

Similar a Replacing the geometry pipeline with mesh shaders (20)

Greg Hogan – To Petascale and Beyond- Apache Flink in the Clouds
Greg Hogan – To Petascale and Beyond- Apache Flink in the CloudsGreg Hogan – To Petascale and Beyond- Apache Flink in the Clouds
Greg Hogan – To Petascale and Beyond- Apache Flink in the Clouds
 
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its author
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its authorKaggle Winning Solution Xgboost algorithm -- Let us learn from its author
Kaggle Winning Solution Xgboost algorithm -- Let us learn from its author
 
Backbone js-slides
Backbone js-slidesBackbone js-slides
Backbone js-slides
 
pyjamas22_ generic composite in python.pdf
pyjamas22_ generic composite in python.pdfpyjamas22_ generic composite in python.pdf
pyjamas22_ generic composite in python.pdf
 
Refactoring - improving the smell of your code
Refactoring - improving the smell of your codeRefactoring - improving the smell of your code
Refactoring - improving the smell of your code
 
Extend GraphQL with directives
Extend GraphQL with directivesExtend GraphQL with directives
Extend GraphQL with directives
 
Introduction to CUDA C: NVIDIA : Notes
Introduction to CUDA C: NVIDIA : NotesIntroduction to CUDA C: NVIDIA : Notes
Introduction to CUDA C: NVIDIA : Notes
 
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
 
Improving Apache Spark Downscaling
 Improving Apache Spark Downscaling Improving Apache Spark Downscaling
Improving Apache Spark Downscaling
 
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
 
NoSQL - An introduction to CouchDB
NoSQL - An introduction to CouchDBNoSQL - An introduction to CouchDB
NoSQL - An introduction to CouchDB
 
Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...
Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...
Using Spark to Load Oracle Data into Cassandra (Jim Hatcher, IHS Markit) | C*...
 
Using Spark to Load Oracle Data into Cassandra
Using Spark to Load Oracle Data into CassandraUsing Spark to Load Oracle Data into Cassandra
Using Spark to Load Oracle Data into Cassandra
 
Unlocking Your Hadoop Data with Apache Spark and CDH5
Unlocking Your Hadoop Data with Apache Spark and CDH5Unlocking Your Hadoop Data with Apache Spark and CDH5
Unlocking Your Hadoop Data with Apache Spark and CDH5
 
CouchDB on Rails - FrozenRails 2010
CouchDB on Rails - FrozenRails 2010CouchDB on Rails - FrozenRails 2010
CouchDB on Rails - FrozenRails 2010
 
CouchDB on Rails
CouchDB on RailsCouchDB on Rails
CouchDB on Rails
 
クラウドDWHとしても進化を続けるPivotal Greenplumご紹介
クラウドDWHとしても進化を続けるPivotal Greenplumご紹介クラウドDWHとしても進化を続けるPivotal Greenplumご紹介
クラウドDWHとしても進化を続けるPivotal Greenplumご紹介
 
Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8
 
CouchDB on Rails - RailsWayCon 2010
CouchDB on Rails - RailsWayCon 2010CouchDB on Rails - RailsWayCon 2010
CouchDB on Rails - RailsWayCon 2010
 
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeks
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeksBeginning direct3d gameprogramming05_thebasics_20160421_jintaeks
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeks
 

Más de Igalia

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

Más de 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
 
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
 
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...
 

Último

Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxNeo4j
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101vincent683379
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfUK Journal
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessUXDXConf
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jNeo4j
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 

Último (20)

Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 

Replacing the geometry pipeline with mesh shaders

  • 1. Replacing the geometry pipeline with mesh shaders Ricardo Garcia October 4 XDC 2022, Minneapolis
  • 2. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Main Points  What are mesh shaders?  Comparison between classic and mesh shading pipelines  Problems mesh shaders try to solve  What a mesh shader looks like  Problems introduced by mesh shaders
  • 3. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 What is mesh shading?  New type of graphics pipeline with simplified stages  Tries to address shortcoming with classic graphics pipelines on modern HW  Brings the geometry part of the pipeline closer to the compute model
  • 4. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Classic Graphics Pipeline
  • 5. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Mesh Shading Pipeline
  • 6. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Mesh Shading Pipeline (Full)
  • 7. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Classic Pipeline Problems  Vertex inputs are annoying  No control over how geometry is arranged  Waste of compute resources  Waste of memory bandwidth  Geometry amplification and modification should be simpler and more flexible  Maybe we can use a model that’s closer to compute shaders
  • 8. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 How do they look? #version 450 #extension GL_EXT_mesh_shader : enable void main () { }
  • 9. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 How do they look? #version 450 #extension GL_EXT_mesh_shader : enable layout (local_size_x=X, local_size_y=Y, local_size_z=Z) in; // Typical limit: 128 invocations. void main () { // Typical compute built-ins: gl_NumWorkGroups, gl_WorkGroupID, gl_LocalInvocationID, etc. // Typical subgroup functionality: gl_NumSubgroups, gl_SubgroupID, subgroupElect(), etc. }
  • 10. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 How do they look? #version 450 #extension GL_EXT_mesh_shader : enable layout (local_size_x=X, local_size_y=Y, local_size_z=Z) in; // Typical limit: 128 invocations. layout (triangles) out; // May also be points or lines. void main () { // Typical compute built-ins: gl_NumWorkGroups, gl_WorkGroupID, gl_LocalInvocationID, etc. // Typical subgroup functionality: gl_NumSubgroups, gl_SubgroupID, subgroupElect(), etc. }
  • 11. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 How do they look? #version 450 #extension GL_EXT_mesh_shader : enable layout (local_size_x=X, local_size_y=Y, local_size_z=Z) in; // Typical limit: 128 invocations. layout (triangles) out; // May also be points or lines. layout (max_vertices=V, max_primitives=P) out; // Typical limit: 256 vert/prim. void main () { // Typical compute built-ins: gl_NumWorkGroups, gl_WorkGroupID, gl_LocalInvocationID, etc. // Typical subgroup functionality: gl_NumSubgroups, gl_SubgroupID, subgroupElect(), etc. }
  • 12. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 How do they look? #version 450 #extension GL_EXT_mesh_shader : enable layout (local_size_x=X, local_size_y=Y, local_size_z=Z) in; // Typical limit: 128 invocations. layout (triangles) out; // May also be points or lines. layout (max_vertices=V, max_primitives=P) out; // Typical limit: 256 vert/prim. void main () { // Typical compute built-ins: gl_NumWorkGroups, gl_WorkGroupID, gl_LocalInvocationID, etc. // Typical subgroup functionality: gl_NumSubgroups, gl_SubgroupID, subgroupElect(), etc. SetMeshOutputsEXT(ACTUAL_V, ACTUAL_P); gl_MeshVerticesEXT[FOO].gl_Position = vec4(…); gl_PrimitiveTriangleIndicesEXT[BAR] = uvec3(…); }
  • 13. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 How do they look? #version 450 #extension GL_EXT_mesh_shader : enable layout (local_size_x=X, local_size_y=Y, local_size_z=Z) in; // Typical limit: 128 invocations. layout (triangles) out; // May also be points or lines. layout (max_vertices=V, max_primitives=P) out; // Typical limit: 256 vert/prim. layout (location=0) out vec4 out0[]; // Per-vertex. layout (location=1) perprimitiveEXT out vec4 out1[]; // Per-primitive. void main () { // Typical compute built-ins: gl_NumWorkGroups, gl_WorkGroupID, gl_LocalInvocationID, etc. // Typical subgroup functionality: gl_NumSubgroups, gl_SubgroupID, subgroupElect(), etc. SetMeshOutputsEXT(ACTUAL_V, ACTUAL_P); gl_MeshVerticesEXT[FOO].gl_Position = vec4(…); gl_PrimitiveTriangleIndicesEXT[BAR] = uvec3(…); }
  • 14. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Some built-in arrays // write only access out uint gl_PrimitivePointIndicesEXT[]; out uvec2 gl_PrimitiveLineIndicesEXT[]; out uvec3 gl_PrimitiveTriangleIndicesEXT[]; // write only access out gl_MeshPerVertexEXT { vec4 gl_Position; float gl_PointSize; float gl_ClipDistance[]; float gl_CullDistance[]; } gl_MeshVerticesEXT[]; // write only access perprimitiveEXT out gl_MeshPerPrimitiveEXT { int gl_PrimitiveID; int gl_Layer; int gl_ViewportIndex; bool gl_CullPrimitiveEXT; int gl_PrimitiveShadingRateEXT; } gl_MeshPrimitivesEXT[];
  • 15. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Meshlets Image source: https://developer.nvidia.com/blog/introduction-turing-mesh-shaders/
  • 16. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Dispatching Work Groups  vkCmdDrawMeshTasksEXT(cmdBuffer, X, Y, Z);  vkCmdDrawMeshTasksIndirectEXT(cmdBuffer, ...)  vkCmdDrawMeshTasksIndirectCountEXT(cmdBuffer, …);
  • 17. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Mesh Shading Pipeline (Full)
  • 18. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Task (Amplification) Shader Similar to a two-level compute dispatch
  • 19. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Task (Amplification) Shader To uniquely identify the work that needs to be done in each mesh shader work group, info needs to be passed from the task shader to the mesh shader.
  • 20. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Payload #version 450 #extension GL_EXT_mesh_shader : enable // Typical limit: 128 invocations. layout (local_size_x=X, local_size_y=Y, local_size_z=Z) in; struct TaskData { … }; taskPayloadSharedEXT TaskData td; void main () { // Prepare payload for children. td.SOMETHING = SOMETHING_ELSE; // Example: (2, 1, 1) EmitMeshTasksEXT(MeshX, MeshY, MeshZ); } #version 450 #extension GL_EXT_mesh_shader : enable layout (local_size_x=X, local_size_y=Y, local_size_z=Z) in; layout (triangles) out; layout (max_vertices=V, max_primitives=P); struct TaskData { … }; taskPayloadSharedEXT TaskData td; void main () { // Use data from td. SetMeshOutputsEXT(ACTUAL_V, ACTUAL_P); gl_MeshVerticesEXT[FOO].gl_Position = …; gl_MeshTriangleIndicesEXT[BAR] = uvec3(…); }
  • 21. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Mesh Shading Pros  Avoids input assembly bottlenecks.  Can pre-compute data and discard geometry in advance.  Can save memory bandwidth by not pulling in unneeded data.  Flexible geometry amplification.  Non-sequential programming model.  Can be used to streamline compute pre-passes into pipeline.  Can be used as a two-level compute pipeline.
  • 22. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Mesh Shading Cons  Problematic for tilers.  Leaving choices to the user increases room for errors.  Increases coupling of in-memory vertex data with shaders.  Different vendors recommend different things for performance. ● Exposed as properties in the extension. ● Lower number of invocations, loop. ● Higher number of invocations, access arrays with gl_LocalInvocationIndex.
  • 23. Replacing the geometry pipeline with mesh shaders Ricardo Garcia, 2022-10-04 Q&A