working on Vulkan descriptor sets

This commit is contained in:
2025-02-19 21:07:16 +01:00
parent 4bbbf4e5dd
commit c8f6245c2c
12 changed files with 127 additions and 36 deletions

View File

@@ -3,11 +3,23 @@ module;
struct Input
{
[builtin(global_invocation_indices)] indices: vec3[u32]
[builtin(global_invocation_indices)] indices: vec3[u32]
}
[layout(std430)]
struct SSBO
{
data: dyn_array[i32]
}
external
{
[set(0), binding(0)] ssbo: storage[SSBO],
}
[entry(compute)]
[workgroup(8, 8, 8)]
[workgroup(32, 32, 1)]
fn main(input: Input)
{
ssbo.data[input.indices.x * input.indices.y] = 1;
}