Skip to content

Instantly share code, notes, and snippets.

View Ipotrick's full-sized avatar
🏠
Working from home

Ipotrick

🏠
Working from home
View GitHub Profile
@Ipotrick
Ipotrick / Efficient GPU Work Expansion.md
Last active June 18, 2025 23:04
Efficient GPU Work Expansion

What is "Work Expansion"

In a GPU-driven renderer, "work expansion" is a commonly occurring problem. "Work Expansion" means that a single item of work spawns N following work items. Typically one work item will be executed by one shader thread/invocation.

An example for work expansion is gpu driven meshlet culling following mesh culling. In this example a "work item" is culling a mesh, where each mesh cull work item spawns N following meshlet cull work items.

There are many diverse cases of this problem and many solutions. Some are trivial to solve, for example, when N (how many work items are spawned) is fixed.

import java.util.*;
import static java.lang.System.*;
public class IO {
public static void print(Object object) {
out.print(object);
}
public static void println(Object object) {
out.println(object);