blob: c3a6f206de15994f0b0c48eb9c223433e2ac4405 [file] [log] [blame]
// RUN: clspv %s -o %t.spv
// RUN: spirv-dis -o %t2.spvasm %t.spv
// RUN: FileCheck %s < %t2.spvasm
// RUN: spirv-val --target-env vulkan1.0 %t.spv
void kernel __attribute__((reqd_work_group_size(1, 1, 1))) foo(constant uint* a, global uint* b)
{
*b = *a;
}
// CHECK: OpDecorate [[__runtimearr_uint:%[0-9a-zA-Z_]+]] ArrayStride 4
// CHECK: OpMemberDecorate [[__struct_3:%[0-9a-zA-Z_]+]] 0 Offset 0
// CHECK: OpDecorate [[__struct_3]] Block
// CHECK: OpDecorate [[_9:%[0-9a-zA-Z_]+]] DescriptorSet 0
// CHECK: OpDecorate [[_9]] Binding 0
// CHECK: OpDecorate [[_9]] NonWritable
// CHECK: [[_uint:%[0-9a-zA-Z_]+]] = OpTypeInt 32 0
// CHECK: [[__runtimearr_uint]] = OpTypeRuntimeArray [[_uint]]
// CHECK: [[__struct_3]] = OpTypeStruct [[__runtimearr_uint]]
// CHECK: [[__ptr_StorageBuffer__struct_3:%[0-9a-zA-Z_]+]] = OpTypePointer StorageBuffer [[__struct_3]]
// CHECK: [[__ptr_StorageBuffer_uint:%[0-9a-zA-Z_]+]] = OpTypePointer StorageBuffer [[_uint]]
// CHECK: [[_uint_0:%[0-9a-zA-Z_]+]] = OpConstant [[_uint]] 0
// CHECK: [[_9]] = OpVariable [[__ptr_StorageBuffer__struct_3]] StorageBuffer
// CHECK: [[_13:%[0-9a-zA-Z_]+]] = OpAccessChain [[__ptr_StorageBuffer_uint]] [[_9]] [[_uint_0]] [[_uint_0]]
// CHECK: [[_15:%[0-9a-zA-Z_]+]] = OpLoad [[_uint]] [[_13]]
// CHECK: OpStore {{.*}} [[_15]]