Lines Matching +full:clang +full:- +full:format +full:- +full:13
7 // http://www.apache.org/licenses/LICENSE-2.0
21 #include "spirv-tools/libspirv.hpp"
29 return alignment * ((val + alignment - 1) / alignment); in alignUp()
87 printf("-- WARNING: Disassembly does not match assembly: ---\n\n"); in compileSpirv()
89 auto splitLines = [](const std::string &str) -> std::vector<std::string> { in compileSpirv()
109 printf("\n\n---\nExpected:\n\n%s", disassembled.c_str()); in compileSpirv()
152 ASSERT_TRUE(device->IsValid()); in test()
171 size_t magic0Offset = alignElements - 1; in test()
174 size_t magic2Offset = alignUp(magic1Offset + 1, alignElements) - 1; in test()
181 VK_ASSERT(device->AllocateMemory(buffersSize, in test()
186 VK_ASSERT(device->MapMemory(memory, 0, buffersSize, 0, (void **)&buffers)); in test()
200 device->UnmapMemory(memory); in test()
204 VK_ASSERT(device->CreateStorageBuffer(memory, in test()
210 VK_ASSERT(device->CreateStorageBuffer(memory, in test()
216 VK_ASSERT(device->CreateShaderModule(code, &shaderModule)); in test()
236 VK_ASSERT(device->CreateDescriptorSetLayout(descriptorSetLayoutBindings, &descriptorSetLayout)); in test()
239 VK_ASSERT(device->CreatePipelineLayout(descriptorSetLayout, &pipelineLayout)); in test()
242 VK_ASSERT(device->CreateComputePipeline(shaderModule, pipelineLayout, &pipeline)); in test()
245 VK_ASSERT(device->CreateStorageBufferDescriptorPool(2, &descriptorPool)); in test()
248 VK_ASSERT(device->AllocateDescriptorSet(descriptorPool, descriptorSetLayout, &descriptorSet)); in test()
262 device->UpdateStorageBufferDescriptorSets(descriptorSet, descriptorBufferInfos); in test()
265 VK_ASSERT(device->CreateCommandPool(&commandPool)); in test()
268 VK_ASSERT(device->AllocateCommandBuffer(commandPool, &commandBuffer)); in test()
270 VK_ASSERT(device->BeginCommandBuffer(VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, commandBuffer)); in test()
281 VK_ASSERT(device->QueueSubmitAndWait(commandBuffer)); in test()
283 VK_ASSERT(device->MapMemory(memory, 0, buffersSize, 0, (void **)&buffers)); in test()
297 device->UnmapMemory(memory); in test()
300 device->FreeCommandBuffer(commandPool, commandBuffer); in test()
301 device->FreeMemory(memory); in test()
302 device->DestroyPipeline(pipeline); in test()
303 device->DestroyCommandPool(commandPool); in test()
304 device->DestroyPipelineLayout(pipelineLayout); in test()
305 device->DestroyDescriptorSetLayout(descriptorSetLayout); in test()
306 device->DestroyDescriptorPool(descriptorPool); in test()
307 device->DestroyBuffer(bufferIn); in test()
308 device->DestroyBuffer(bufferOut); in test()
309 device->DestroyShaderModule(shaderModule); in test()
316 … // Non-multiple of SIMD-lane.
336 // clang-format off in TEST_P()
362 "%13 = OpConstant %10 0\n" // uint32(0) in TEST_P()
369 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
371 "%19 = OpAccessChain %16 %2 %13\n" // &gl_GlobalInvocationId.x in TEST_P()
379 // clang-format on in TEST_P()
388 // clang-format off in TEST_P()
414 "%13 = OpConstant %9 1\n" // int32(1) in TEST_P()
424 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
440 // clang-format on in TEST_P()
450 // clang-format off in TEST_P()
476 "%13 = OpConstant %10 0\n" // uint32(0) in TEST_P()
483 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
485 "%19 = OpAccessChain %16 %2 %13\n" // &gl_GlobalInvocationId.x in TEST_P()
503 // clang-format on in TEST_P()
512 // clang-format off in TEST_P()
538 "%13 = OpConstant %10 0\n" // uint32(0) in TEST_P()
545 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
547 "%19 = OpAccessChain %16 %2 %13\n" // &gl_GlobalInvocationId.x in TEST_P()
566 // clang-format on in TEST_P()
575 // clang-format off in TEST_P()
601 "%13 = OpConstant %9 0\n" // int32(0) in TEST_P()
610 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
614 "%23 = OpAccessChain %19 %6 %13 %22\n" // &in.arr[gl_GlobalInvocationId.x] in TEST_P()
616 "%25 = OpAccessChain %19 %5 %13 %22\n" // &out.arr[gl_GlobalInvocationId.x] in TEST_P()
620 "%27 = OpIEqual %11 %26 %13\n" // (in % 2) == 0 in TEST_P()
629 // clang-format on in TEST_P()
638 // clang-format off in TEST_P()
664 "%13 = OpConstant %9 0\n" // int32(0) in TEST_P()
673 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
677 "%23 = OpAccessChain %19 %6 %13 %22\n" // &in.arr[gl_GlobalInvocationId.x] in TEST_P()
679 "%25 = OpAccessChain %19 %5 %13 %22\n" // &out.arr[gl_GlobalInvocationId.x] in TEST_P()
683 "%27 = OpIEqual %11 %26 %13\n" // (in % 2) == 0 in TEST_P()
696 // clang-format on in TEST_P()
706 // clang-format off in TEST_P()
732 "%13 = OpConstant %9 0\n" // int32(0) in TEST_P()
742 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
746 "%24 = OpAccessChain %20 %6 %13 %23\n" // &in.arr[gl_GlobalInvocationId.x] in TEST_P()
748 "%26 = OpAccessChain %20 %5 %13 %23\n" // &out.arr[gl_GlobalInvocationId.x] in TEST_P()
752 "%28 = OpIEqual %11 %27 %13\n" // (in % 2) == 0 in TEST_P()
765 // clang-format on in TEST_P()
774 // clang-format off in TEST_P()
800 "%13 = OpConstant %9 0\n" // int32(0) in TEST_P()
810 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
814 "%24 = OpAccessChain %20 %6 %13 %23\n" // &in.arr[gl_GlobalInvocationId.x] in TEST_P()
816 "%26 = OpAccessChain %20 %5 %13 %23\n" // &out.arr[gl_GlobalInvocationId.x] in TEST_P()
820 "%28 = OpIEqual %11 %27 %13\n" // (in % 2) == 0 in TEST_P()
830 // clang-format on in TEST_P()
840 // clang-format off in TEST_P()
866 "%13 = OpConstant %9 0\n" // int32(0) in TEST_P()
876 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
880 "%24 = OpAccessChain %20 %6 %13 %23\n" // &in.arr[gl_GlobalInvocationId.x] in TEST_P()
882 "%26 = OpAccessChain %20 %5 %13 %23\n" // &out.arr[gl_GlobalInvocationId.x] in TEST_P()
886 "%28 = OpIEqual %11 %27 %13\n" // (in % 2) == 0 in TEST_P()
899 // clang-format on in TEST_P()
908 // clang-format off in TEST_P()
934 "%13 = OpConstant %9 0\n" // int32(0) in TEST_P()
943 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
947 "%23 = OpAccessChain %19 %6 %13 %22\n" // &in.arr[gl_GlobalInvocationId.x] in TEST_P()
949 "%25 = OpAccessChain %19 %5 %13 %22\n" // &out.arr[gl_GlobalInvocationId.x] in TEST_P()
965 // clang-format on in TEST_P()
974 // clang-format off in TEST_P()
1000 "%13 = OpConstant %9 0\n" // int32(0) in TEST_P()
1010 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
1014 "%24 = OpAccessChain %20 %6 %13 %23\n" // &in.arr[gl_GlobalInvocationId.x] in TEST_P()
1016 "%26 = OpAccessChain %20 %5 %13 %23\n" // &out.arr[gl_GlobalInvocationId.x] in TEST_P()
1032 // clang-format on in TEST_P()
1041 // clang-format off in TEST_P()
1067 "%13 = OpConstant %9 0\n" // int32(0) in TEST_P()
1077 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
1081 "%24 = OpAccessChain %20 %6 %13 %23\n" // &in.arr[gl_GlobalInvocationId.x] in TEST_P()
1083 "%26 = OpAccessChain %20 %5 %13 %23\n" // &out.arr[gl_GlobalInvocationId.x] in TEST_P()
1098 // clang-format on in TEST_P()
1107 // clang-format off in TEST_P()
1133 "%13 = OpConstant %9 0\n" // int32(0) in TEST_P()
1143 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
1147 "%24 = OpAccessChain %20 %6 %13 %23\n" // &in.arr[gl_GlobalInvocationId.x] in TEST_P()
1149 "%26 = OpAccessChain %20 %5 %13 %23\n" // &out.arr[gl_GlobalInvocationId.x] in TEST_P()
1164 // clang-format on in TEST_P()
1173 // clang-format off in TEST_P()
1199 "%13 = OpConstant %9 0\n" // int32(0) in TEST_P()
1209 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
1213 "%24 = OpAccessChain %20 %6 %13 %23\n" // &in.arr[gl_GlobalInvocationId.x] in TEST_P()
1215 "%26 = OpAccessChain %20 %5 %13 %23\n" // &out.arr[gl_GlobalInvocationId.x] in TEST_P()
1234 // clang-format on in TEST_P()
1243 // clang-format off in TEST_P()
1269 "%13 = OpConstant %9 0\n" // int32(0) in TEST_P()
1279 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
1283 "%24 = OpAccessChain %20 %6 %13 %23\n" // &in.arr[gl_GlobalInvocationId.x] in TEST_P()
1285 "%26 = OpAccessChain %20 %5 %13 %23\n" // &out.arr[gl_GlobalInvocationId.x] in TEST_P()
1306 // clang-format on in TEST_P()
1315 // clang-format off in TEST_P()
1341 "%13 = OpConstant %9 0\n" // int32(0) in TEST_P()
1351 "%1 = OpFunction %7 None %8\n" // -- Function begin -- in TEST_P()
1355 "%24 = OpAccessChain %20 %6 %13 %23\n" // &in.arr[gl_GlobalInvocationId.x] in TEST_P()
1357 "%26 = OpAccessChain %20 %5 %13 %23\n" // &out.arr[gl_GlobalInvocationId.x] in TEST_P()
1373 // clang-format on in TEST_P()
1406 // clang-format off in TEST_P()
1430 "%13 = OpConstant %12 0\n" in TEST_P()
1465 "%39 = OpAccessChain %22 %6 %13 %27\n" in TEST_P()
1474 "%41 = OpPhi %12 %13 %29 %40 %38\n" // %40: phi in TEST_P()
1475 "%42 = OpAccessChain %22 %9 %13 %27\n" in TEST_P()
1479 // clang-format on in TEST_P()