2018-04-11 13:07:04 +02:00
|
|
|
#version 450
|
|
|
|
|
|
|
|
layout(
|
2018-04-11 23:12:55 +02:00
|
|
|
local_size_x = 128,
|
2018-04-11 13:07:04 +02:00
|
|
|
local_size_y = 1,
|
|
|
|
local_size_z = 1) in;
|
|
|
|
|
|
|
|
layout(binding = 0)
|
|
|
|
writeonly uniform imageBuffer 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 23:12:55 +02:00
|
|
|
int thread_id = int(gl_GlobalInvocationID.x);
|
2018-04-11 13:07:04 +02:00
|
|
|
|
2018-04-11 23:12:55 +02:00
|
|
|
if (thread_id < u_info.dst_extent.x) {
|
2018-04-11 17:16:18 +02:00
|
|
|
imageStore(dst,
|
2018-04-11 23:12:55 +02:00
|
|
|
u_info.dst_offset.x + thread_id,
|
2018-04-11 17:16:18 +02:00
|
|
|
u_info.clear_value);
|
|
|
|
}
|
2018-04-11 13:07:04 +02:00
|
|
|
}
|