Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions backends/vulkan/runtime/graph/ops/glsl/clone.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@

#version 450 core

#include "indexing_utils.h"

#define PRECISION ${PRECISION}

layout(std430) buffer;

layout(set = 0, binding = 0, ${IMAGE_FORMAT[DTYPE]}) uniform PRECISION restrict writeonly ${IMAGE_T[NDIM][DTYPE]} image_out;
layout(set = 0, binding = 1) uniform PRECISION sampler3D image_in;

layout(set = 0, binding = 2) uniform PRECISION restrict OutLimits {
ivec3 out_limits;
};
${layout_declare_tensor(B, "w", "t_out", DTYPE, STORAGE)}
${layout_declare_tensor(B, "r", "t_in", DTYPE, STORAGE)}
${layout_declare_ubo(B, "ivec3", "out_limits")}

layout(local_size_x_id = 0, local_size_y_id = 1, local_size_z_id = 2) in;

Expand All @@ -26,5 +25,5 @@ void main() {
if (any(greaterThanEqual(pos, out_limits))) {
return;
}
imageStore(image_out, pos, texelFetch(image_in, pos, 0));
imageStore(t_out, pos, load_texel(t_in, pos));
}
1 change: 1 addition & 0 deletions backends/vulkan/runtime/graph/ops/glsl/clone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ clone:
parameter_names_with_default_values:
DTYPE: float
NDIM: 3
STORAGE: texture3d
generate_variant_forall:
DTYPE:
- VALUE: half
Expand Down
Loading