mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-13 08:13:34 +00:00
cac
This commit is contained in:
32
Tests/Shaders/Vulkan-OpenGL/BufferCopy.nzsl
git.filemode.normal_file
32
Tests/Shaders/Vulkan-OpenGL/BufferCopy.nzsl
git.filemode.normal_file
@@ -0,0 +1,32 @@
|
||||
[nzsl_version("1.0")]
|
||||
module;
|
||||
|
||||
struct Input
|
||||
{
|
||||
[builtin(global_invocation_indices)] indices: vec3[u32]
|
||||
}
|
||||
|
||||
[layout(std430)]
|
||||
struct SSBO
|
||||
{
|
||||
data: dyn_array[u32]
|
||||
}
|
||||
|
||||
[set(0)]
|
||||
external
|
||||
{
|
||||
[binding(0)] read_ssbo: storage[SSBO, readonly],
|
||||
}
|
||||
|
||||
[set(1)]
|
||||
external
|
||||
{
|
||||
[binding(0)] write_ssbo: storage[SSBO, writeonly],
|
||||
}
|
||||
|
||||
[entry(compute)]
|
||||
[workgroup(16, 16, 1)]
|
||||
fn main(input: Input)
|
||||
{
|
||||
write_ssbo.data[input.indices.x * input.indices.y] = read_ssbo.data[input.indices.x * input.indices.y];
|
||||
}
|
||||
Reference in New Issue
Block a user