mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-03-03 20:06:36 +00:00
cac
This commit is contained in:
2
Tests/Shaders/.gitignore
vendored
2
Tests/Shaders/.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
*.spv.h
|
||||
*.wgsl.h
|
||||
*.json
|
||||
*.glsl.h
|
||||
|
||||
@@ -12,10 +12,16 @@ struct SSBO
|
||||
data: dyn_array[u32]
|
||||
}
|
||||
|
||||
[set(0)]
|
||||
external
|
||||
{
|
||||
[set(0), binding(0)] read_ssbo: storage[SSBO, readonly],
|
||||
[set(1), binding(0)] write_ssbo: storage[SSBO, writeonly],
|
||||
[binding(0)] read_ssbo: storage[SSBO, readonly],
|
||||
}
|
||||
|
||||
[set(1)]
|
||||
external
|
||||
{
|
||||
[binding(0)] write_ssbo: storage[SSBO, writeonly],
|
||||
}
|
||||
|
||||
[entry(compute)]
|
||||
33
Tests/Shaders/Vulkan-OpenGL/ReadWriteBindings.nzsl
git.filemode.normal_file
33
Tests/Shaders/Vulkan-OpenGL/ReadWriteBindings.nzsl
git.filemode.normal_file
@@ -0,0 +1,33 @@
|
||||
[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_texture: texture2D[f32, readonly, rgba8],
|
||||
[binding(1)] read_ssbo: storage[SSBO, readonly],
|
||||
}
|
||||
|
||||
[set(1)]
|
||||
external
|
||||
{
|
||||
[binding(0)] write_texture: texture2D[f32, rgba8],
|
||||
[binding(1)] write_ssbo: storage[SSBO, writeonly],
|
||||
}
|
||||
|
||||
[entry(compute)]
|
||||
[workgroup(16, 16, 1)]
|
||||
fn main(input: Input)
|
||||
{
|
||||
}
|
||||
@@ -12,9 +12,10 @@ struct SSBO
|
||||
data: dyn_array[u32]
|
||||
}
|
||||
|
||||
[set(1)]
|
||||
external
|
||||
{
|
||||
[set(1), binding(0)] ssbo: storage[SSBO],
|
||||
[binding(0)] ssbo: storage[SSBO],
|
||||
}
|
||||
|
||||
[entry(compute)]
|
||||
@@ -12,10 +12,11 @@ struct SSBO
|
||||
data: dyn_array[u32]
|
||||
}
|
||||
|
||||
[set(0)]
|
||||
external
|
||||
{
|
||||
[set(1), binding(0)] write_texture: texture2D[f32, readwrite, rgba8],
|
||||
[set(1), binding(1)] write_ssbo: storage[SSBO],
|
||||
[binding(0)] write_texture: texture2D[f32, readwrite, rgba8],
|
||||
[binding(1)] write_ssbo: storage[SSBO],
|
||||
}
|
||||
|
||||
[entry(compute)]
|
||||
@@ -1,27 +0,0 @@
|
||||
[nzsl_version("1.0")]
|
||||
module;
|
||||
|
||||
struct Input
|
||||
{
|
||||
[builtin(global_invocation_indices)] indices: vec3[u32]
|
||||
}
|
||||
|
||||
[layout(std430)]
|
||||
struct SSBO
|
||||
{
|
||||
data: dyn_array[u32]
|
||||
}
|
||||
|
||||
external
|
||||
{
|
||||
[set(0), binding(0)] read_texture: texture2D[f32, readonly, rgba8],
|
||||
[set(0), binding(1)] read_ssbo: storage[SSBO, readonly],
|
||||
[set(1), binding(0)] write_texture: texture2D[f32, readonly, rgba8],
|
||||
[set(1), binding(1)] write_ssbo: storage[SSBO, writeonly],
|
||||
}
|
||||
|
||||
[entry(compute)]
|
||||
[workgroup(16, 16, 1)]
|
||||
fn main(input: Input)
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user