2018-04-11 13:07:04 +02:00
|
|
|
#version 450
|
|
|
|
|
|
|
|
layout(
|
2018-04-11 17:16:18 +02:00
|
|
|
local_size_x = 4,
|
|
|
|
local_size_y = 4,
|
|
|
|
local_size_z = 4) in;
|
2018-04-11 13:07:04 +02:00
|
|
|
|
|
|
|
layout(binding = 0)
|
|
|
|
writeonly uniform image3D dst;
|
|
|
|
|
|
|
|
layout(push_constant)
|
|
|
|
uniform u_info_t {
|
|
|
|
vec4 clear_value;
|
|
|
|
ivec4 dst_offset;
|
2018-04-11 17:16:18 +02:00
|
|
|
ivec4 dst_extent;
|
2018-04-11 13:07:04 +02:00
|
|
|
} u_info;
|
|
|
|
|
|
|
|
void main() {
|
2018-04-11 17:16:18 +02:00
|
|
|
ivec3 thread_id = ivec3(gl_GlobalInvocationID);
|
2018-04-11 13:07:04 +02:00
|
|
|
|
2018-04-11 17:16:18 +02:00
|
|
|
if (all(lessThan(thread_id.xyz, u_info.dst_extent.xyz))) {
|
|
|
|
imageStore(dst,
|
|
|
|
u_info.dst_offset.xyz + thread_id.xyz,
|
|
|
|
u_info.clear_value);
|
|
|
|
}
|
2018-04-11 13:07:04 +02:00
|
|
|
}
|