summaryrefslogtreecommitdiffstats
path: root/src/libs/dxvk-native-1.9.2a/src/dxvk/shaders/dxvk_clear_image2darr_u.comp
blob: c8babb78d540aa66359c9f72619fe728ae5ba6b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#version 450

layout(
  local_size_x = 8,
  local_size_y = 8,
  local_size_z = 1) in;

layout(binding = 0)
writeonly uniform uimage2DArray dst;

layout(push_constant)
uniform u_info_t {
  uvec4 clear_value;
  ivec4 dst_offset;
  ivec4 dst_extent;
} u_info;

void main() {
  ivec3 thread_id = ivec3(gl_GlobalInvocationID);
  
  if (all(lessThan(thread_id.xy, u_info.dst_extent.xy))) {
    imageStore(dst,
      ivec3(u_info.dst_offset.xy + thread_id.xy, thread_id.z),
      u_info.clear_value);
  }
}