mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 15:33:34 +00:00
yes
This commit is contained in:
2
Tests/Shaders/.gitignore
vendored
git.filemode.normal_file
2
Tests/Shaders/.gitignore
vendored
git.filemode.normal_file
@@ -0,0 +1,2 @@
|
||||
*.spv.h
|
||||
*.wgsl.h
|
||||
26
Tests/Shaders/Vulkan/BufferCopy.nzsl
git.filemode.normal_file
26
Tests/Shaders/Vulkan/BufferCopy.nzsl
git.filemode.normal_file
@@ -0,0 +1,26 @@
|
||||
[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_ssbo: storage[SSBO, readonly],
|
||||
[set(1), 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];
|
||||
}
|
||||
25
Tests/Shaders/Vulkan/ReadOnlyBindings.nzsl
git.filemode.normal_file
25
Tests/Shaders/Vulkan/ReadOnlyBindings.nzsl
git.filemode.normal_file
@@ -0,0 +1,25 @@
|
||||
[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],
|
||||
}
|
||||
|
||||
[entry(compute)]
|
||||
[workgroup(16, 16, 1)]
|
||||
fn main(input: Input)
|
||||
{
|
||||
}
|
||||
27
Tests/Shaders/Vulkan/ReadWriteBindings.nzsl
git.filemode.normal_file
27
Tests/Shaders/Vulkan/ReadWriteBindings.nzsl
git.filemode.normal_file
@@ -0,0 +1,27 @@
|
||||
[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)
|
||||
{
|
||||
}
|
||||
13
Tests/Shaders/Vulkan/Simple.nzsl
git.filemode.normal_file
13
Tests/Shaders/Vulkan/Simple.nzsl
git.filemode.normal_file
@@ -0,0 +1,13 @@
|
||||
[nzsl_version("1.0")]
|
||||
module;
|
||||
|
||||
struct Input
|
||||
{
|
||||
[builtin(global_invocation_indices)] indices: vec3[u32]
|
||||
}
|
||||
|
||||
[entry(compute)]
|
||||
[workgroup(32, 32, 1)]
|
||||
fn main(input: Input)
|
||||
{
|
||||
}
|
||||
25
Tests/Shaders/Vulkan/SimpleBufferWrite.nzsl
git.filemode.normal_file
25
Tests/Shaders/Vulkan/SimpleBufferWrite.nzsl
git.filemode.normal_file
@@ -0,0 +1,25 @@
|
||||
[nzsl_version("1.0")]
|
||||
module;
|
||||
|
||||
struct Input
|
||||
{
|
||||
[builtin(global_invocation_indices)] indices: vec3[u32]
|
||||
}
|
||||
|
||||
[layout(std430)]
|
||||
struct SSBO
|
||||
{
|
||||
data: dyn_array[u32]
|
||||
}
|
||||
|
||||
external
|
||||
{
|
||||
[set(1), binding(0)] ssbo: storage[SSBO],
|
||||
}
|
||||
|
||||
[entry(compute)]
|
||||
[workgroup(16, 16, 1)]
|
||||
fn main(input: Input)
|
||||
{
|
||||
ssbo.data[input.indices.x * input.indices.y] = u32(0xFFFFFFFF);
|
||||
}
|
||||
25
Tests/Shaders/Vulkan/WriteOnlyBindings.nzsl
git.filemode.normal_file
25
Tests/Shaders/Vulkan/WriteOnlyBindings.nzsl
git.filemode.normal_file
@@ -0,0 +1,25 @@
|
||||
[nzsl_version("1.0")]
|
||||
module;
|
||||
|
||||
struct Input
|
||||
{
|
||||
[builtin(global_invocation_indices)] indices: vec3[u32]
|
||||
}
|
||||
|
||||
[layout(std430)]
|
||||
struct SSBO
|
||||
{
|
||||
data: dyn_array[u32]
|
||||
}
|
||||
|
||||
external
|
||||
{
|
||||
[set(1), binding(0)] write_texture: texture2D[f32, readwrite, rgba8],
|
||||
[set(1), binding(1)] write_ssbo: storage[SSBO],
|
||||
}
|
||||
|
||||
[entry(compute)]
|
||||
[workgroup(16, 16, 1)]
|
||||
fn main(input: Input)
|
||||
{
|
||||
}
|
||||
8
Tests/Shaders/WebGPU/BufferCopy.wgsl
git.filemode.normal_file
8
Tests/Shaders/WebGPU/BufferCopy.wgsl
git.filemode.normal_file
@@ -0,0 +1,8 @@
|
||||
@group(0) @binding(0) var<storage, read_only> read_ssbo: array<u32>;
|
||||
@group(1) @binding(0) var<storage, read_write> write_ssbo: array<u32>;
|
||||
|
||||
@compute @workgroup_size(16, 16, 1)
|
||||
fn main(@builtin(global_invocation_id) grid: vec3<u32>)
|
||||
{
|
||||
write_ssbo[grid.x * grid.y] = read_ssbo[grid.x * grid.y];
|
||||
}
|
||||
7
Tests/Shaders/WebGPU/ReadOnlyBindings.wgsl
git.filemode.normal_file
7
Tests/Shaders/WebGPU/ReadOnlyBindings.wgsl
git.filemode.normal_file
@@ -0,0 +1,7 @@
|
||||
@group(0) @binding(0) var<storage, read_only> read_ssbo: array<u32>;
|
||||
@group(0) @binding(1) var read_texture: texture_storage_2d<rgba8unorm, read>;
|
||||
|
||||
@compute @workgroup_size(16, 16, 1)
|
||||
fn main(@builtin(global_invocation_id) grid: vec3<u32>)
|
||||
{
|
||||
}
|
||||
9
Tests/Shaders/WebGPU/ReadWriteBindings.wgsl
git.filemode.normal_file
9
Tests/Shaders/WebGPU/ReadWriteBindings.wgsl
git.filemode.normal_file
@@ -0,0 +1,9 @@
|
||||
@group(0) @binding(0) var<storage, read_only> read_ssbo: array<u32>;
|
||||
@group(0) @binding(1) var read_texture: texture_storage_2d<rgba8unorm, read>;
|
||||
@group(1) @binding(0) var<storage, read_write> write_ssbo: array<u32>;
|
||||
@group(1) @binding(1) var write_texture: texture_storage_2d<rgba8unorm, read_write>;
|
||||
|
||||
@compute @workgroup_size(16, 16, 1)
|
||||
fn main(@builtin(global_invocation_id) grid: vec3<u32>)
|
||||
{
|
||||
}
|
||||
4
Tests/Shaders/WebGPU/Simple.wgsl
git.filemode.normal_file
4
Tests/Shaders/WebGPU/Simple.wgsl
git.filemode.normal_file
@@ -0,0 +1,4 @@
|
||||
@compute @workgroup_size(16, 16, 1)
|
||||
fn main(@builtin(global_invocation_id) grid: vec3<u32>)
|
||||
{
|
||||
}
|
||||
7
Tests/Shaders/WebGPU/SimpleBufferWrite.wgsl
git.filemode.normal_file
7
Tests/Shaders/WebGPU/SimpleBufferWrite.wgsl
git.filemode.normal_file
@@ -0,0 +1,7 @@
|
||||
@group(1) @binding(0) var<storage, read_write> write_ssbo: array<u32>;
|
||||
|
||||
@compute @workgroup_size(16, 16, 1)
|
||||
fn main(@builtin(global_invocation_id) grid: vec3<u32>)
|
||||
{
|
||||
write_ssbo[grid.x * grid.y] = u32(0xFFFFFFFF);
|
||||
}
|
||||
7
Tests/Shaders/WebGPU/WriteOnlyBindings.wgsl
git.filemode.normal_file
7
Tests/Shaders/WebGPU/WriteOnlyBindings.wgsl
git.filemode.normal_file
@@ -0,0 +1,7 @@
|
||||
@group(1) @binding(0) var<storage, read_write> write_ssbo: array<u32>;
|
||||
@group(1) @binding(1) var write_texture: texture_storage_2d<rgba8unorm, write>;
|
||||
|
||||
@compute @workgroup_size(16, 16, 1)
|
||||
fn main(@builtin(global_invocation_id) grid: vec3<u32>)
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user