mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 07:23:35 +00:00
nope
This commit is contained in:
39
Tests/Shaders/Vulkan-OpenGL/BufferCopy.comp.glsl
git.filemode.normal_file
39
Tests/Shaders/Vulkan-OpenGL/BufferCopy.comp.glsl
git.filemode.normal_file
@@ -0,0 +1,39 @@
|
||||
#version 310 es
|
||||
|
||||
// compute shader - this file was generated by NZSL compiler (Nazara Shading Language)
|
||||
|
||||
precision highp int;
|
||||
#if GL_FRAGMENT_PRECISION_HIGH
|
||||
precision highp float;
|
||||
#else
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in;
|
||||
|
||||
// header end
|
||||
|
||||
struct Input
|
||||
{
|
||||
uvec3 indices;
|
||||
};
|
||||
|
||||
// struct SSBO omitted (used as UBO/SSBO)
|
||||
|
||||
layout(binding = 0, std430) readonly buffer _nzslBindingread_ssbo
|
||||
{
|
||||
uint data[];
|
||||
} read_ssbo;
|
||||
|
||||
layout(binding = 1, std430) writeonly buffer _nzslBindingwrite_ssbo
|
||||
{
|
||||
uint data[];
|
||||
} write_ssbo;
|
||||
|
||||
void main()
|
||||
{
|
||||
Input input_;
|
||||
input_.indices = gl_GlobalInvocationID;
|
||||
|
||||
write_ssbo.data[input_.indices.x * input_.indices.y] = read_ssbo.data[input_.indices.x * input_.indices.y];
|
||||
}
|
||||
36
Tests/Shaders/Vulkan-OpenGL/ReadOnlyBindings.comp.glsl
git.filemode.normal_file
36
Tests/Shaders/Vulkan-OpenGL/ReadOnlyBindings.comp.glsl
git.filemode.normal_file
@@ -0,0 +1,36 @@
|
||||
#version 310 es
|
||||
|
||||
// compute shader - this file was generated by NZSL compiler (Nazara Shading Language)
|
||||
|
||||
precision highp int;
|
||||
#if GL_FRAGMENT_PRECISION_HIGH
|
||||
precision highp float;
|
||||
precision highp image2D;
|
||||
#else
|
||||
precision mediump float;
|
||||
precision mediump image2D;
|
||||
#endif
|
||||
|
||||
layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in;
|
||||
|
||||
// header end
|
||||
|
||||
struct Input
|
||||
{
|
||||
uvec3 indices;
|
||||
};
|
||||
|
||||
// struct SSBO omitted (used as UBO/SSBO)
|
||||
|
||||
layout(binding = 0, rgba8) uniform readonly image2D read_texture;
|
||||
layout(binding = 1, std430) readonly buffer _nzslBindingread_ssbo
|
||||
{
|
||||
uint data[];
|
||||
} read_ssbo;
|
||||
|
||||
void main()
|
||||
{
|
||||
Input input_;
|
||||
input_.indices = gl_GlobalInvocationID;
|
||||
|
||||
}
|
||||
42
Tests/Shaders/Vulkan-OpenGL/ReadWriteBindings.comp.glsl
git.filemode.normal_file
42
Tests/Shaders/Vulkan-OpenGL/ReadWriteBindings.comp.glsl
git.filemode.normal_file
@@ -0,0 +1,42 @@
|
||||
#version 310 es
|
||||
|
||||
// compute shader - this file was generated by NZSL compiler (Nazara Shading Language)
|
||||
|
||||
precision highp int;
|
||||
#if GL_FRAGMENT_PRECISION_HIGH
|
||||
precision highp float;
|
||||
precision highp image2D;
|
||||
#else
|
||||
precision mediump float;
|
||||
precision mediump image2D;
|
||||
#endif
|
||||
|
||||
layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in;
|
||||
|
||||
// header end
|
||||
|
||||
struct Input
|
||||
{
|
||||
uvec3 indices;
|
||||
};
|
||||
|
||||
// struct SSBO omitted (used as UBO/SSBO)
|
||||
|
||||
layout(binding = 0, rgba8) uniform readonly image2D read_texture;
|
||||
layout(binding = 1, std430) readonly buffer _nzslBindingread_ssbo
|
||||
{
|
||||
uint data[];
|
||||
} read_ssbo;
|
||||
|
||||
layout(binding = 2) uniform image2D write_texture;
|
||||
layout(binding = 3, std430) writeonly buffer _nzslBindingwrite_ssbo
|
||||
{
|
||||
uint data[];
|
||||
} write_ssbo;
|
||||
|
||||
void main()
|
||||
{
|
||||
Input input_;
|
||||
input_.indices = gl_GlobalInvocationID;
|
||||
|
||||
}
|
||||
26
Tests/Shaders/Vulkan-OpenGL/Simple.comp.glsl
git.filemode.normal_file
26
Tests/Shaders/Vulkan-OpenGL/Simple.comp.glsl
git.filemode.normal_file
@@ -0,0 +1,26 @@
|
||||
#version 310 es
|
||||
|
||||
// compute shader - this file was generated by NZSL compiler (Nazara Shading Language)
|
||||
|
||||
precision highp int;
|
||||
#if GL_FRAGMENT_PRECISION_HIGH
|
||||
precision highp float;
|
||||
#else
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
layout(local_size_x = 32, local_size_y = 32, local_size_z = 1) in;
|
||||
|
||||
// header end
|
||||
|
||||
struct Input
|
||||
{
|
||||
uvec3 indices;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
Input input_;
|
||||
input_.indices = gl_GlobalInvocationID;
|
||||
|
||||
}
|
||||
34
Tests/Shaders/Vulkan-OpenGL/SimpleBufferWrite.comp.glsl
git.filemode.normal_file
34
Tests/Shaders/Vulkan-OpenGL/SimpleBufferWrite.comp.glsl
git.filemode.normal_file
@@ -0,0 +1,34 @@
|
||||
#version 310 es
|
||||
|
||||
// compute shader - this file was generated by NZSL compiler (Nazara Shading Language)
|
||||
|
||||
precision highp int;
|
||||
#if GL_FRAGMENT_PRECISION_HIGH
|
||||
precision highp float;
|
||||
#else
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in;
|
||||
|
||||
// header end
|
||||
|
||||
struct Input
|
||||
{
|
||||
uvec3 indices;
|
||||
};
|
||||
|
||||
// struct SSBO omitted (used as UBO/SSBO)
|
||||
|
||||
layout(binding = 0, std430) buffer _nzslBindingssbo
|
||||
{
|
||||
uint data[];
|
||||
} ssbo;
|
||||
|
||||
void main()
|
||||
{
|
||||
Input input_;
|
||||
input_.indices = gl_GlobalInvocationID;
|
||||
|
||||
ssbo.data[input_.indices.x * input_.indices.y] = uint(-1);
|
||||
}
|
||||
36
Tests/Shaders/Vulkan-OpenGL/WriteOnlyBindings.comp.glsl
git.filemode.normal_file
36
Tests/Shaders/Vulkan-OpenGL/WriteOnlyBindings.comp.glsl
git.filemode.normal_file
@@ -0,0 +1,36 @@
|
||||
#version 310 es
|
||||
|
||||
// compute shader - this file was generated by NZSL compiler (Nazara Shading Language)
|
||||
|
||||
precision highp int;
|
||||
#if GL_FRAGMENT_PRECISION_HIGH
|
||||
precision highp float;
|
||||
precision highp image2D;
|
||||
#else
|
||||
precision mediump float;
|
||||
precision mediump image2D;
|
||||
#endif
|
||||
|
||||
layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in;
|
||||
|
||||
// header end
|
||||
|
||||
struct Input
|
||||
{
|
||||
uvec3 indices;
|
||||
};
|
||||
|
||||
// struct SSBO omitted (used as UBO/SSBO)
|
||||
|
||||
layout(binding = 0, rgba8) uniform image2D write_texture;
|
||||
layout(binding = 1, std430) buffer _nzslBindingwrite_ssbo
|
||||
{
|
||||
uint data[];
|
||||
} write_ssbo;
|
||||
|
||||
void main()
|
||||
{
|
||||
Input input_;
|
||||
input_.indices = gl_GlobalInvocationID;
|
||||
|
||||
}
|
||||
@@ -79,11 +79,11 @@ function nzsl(backend)
|
||||
batchcmds:show_progress(opt.progress, "${color.build.object}compiling.shader %s", shaderfile)
|
||||
local argv = {}
|
||||
if backend == Backend.VULKAN then
|
||||
argv = { "--compile=spv-header", "--optimize" }
|
||||
argv = { "--compile=spv-header" }
|
||||
elseif backend == Backend.OPENGL_ES then
|
||||
argv = { "--compile=glsl-header", "--optimize", "--gl-version", "310", "--gl-es", "--gl-bindingmap" }
|
||||
argv = { "--compile=glsl,glsl-header", "--gl-version", "310", "--gl-es", "--gl-bindingmap" }
|
||||
else
|
||||
argv = { "--compile=glsl-header", "--optimize", "--gl-version", "310", "--gl-bindingmap" }
|
||||
argv = { "--compile=glsl,glsl-header", "--gl-version", "310", "--gl-bindingmap" }
|
||||
end
|
||||
if outputdir then
|
||||
batchcmds:mkdir(outputdir)
|
||||
|
||||
Reference in New Issue
Block a user