Lines Matching full:n
294 "layout(location = 0) in vec4 in_color;\n" in initFrameBufferPrograms()
295 "layout(location = 0) out vec4 out_color;\n" in initFrameBufferPrograms()
296 "void main()\n" in initFrameBufferPrograms()
297 {\n" in initFrameBufferPrograms()
298 " out_color = in_color;\n" in initFrameBufferPrograms()
299 "}\n"; in initFrameBufferPrograms()
302 "; SPIR-V\n" in initFrameBufferPrograms()
303 "; Version: 1.3\n" in initFrameBufferPrograms()
304 "; Generator: Khronos Glslang Reference Front End; 2\n" in initFrameBufferPrograms()
305 "; Bound: 13\n" in initFrameBufferPrograms()
306 "; Schema: 0\n" in initFrameBufferPrograms()
307 "OpCapability Shader\n" in initFrameBufferPrograms()
308 "%1 = OpExtInstImport \"GLSL.std.450\"\n" in initFrameBufferPrograms()
309 "OpMemoryModel Logical GLSL450\n" in initFrameBufferPrograms()
310 "OpEntryPoint Fragment %4 \"main\" %9 %11\n" in initFrameBufferPrograms()
311 "OpExecutionMode %4 OriginUpperLeft\n" in initFrameBufferPrograms()
312 "OpDecorate %9 Location 0\n" in initFrameBufferPrograms()
313 "OpDecorate %11 Location 0\n" in initFrameBufferPrograms()
314 "%2 = OpTypeVoid\n" in initFrameBufferPrograms()
315 "%3 = OpTypeFunction %2\n" in initFrameBufferPrograms()
316 "%6 = OpTypeFloat 32\n" in initFrameBufferPrograms()
317 "%7 = OpTypeVector %6 4\n" in initFrameBufferPrograms()
318 "%8 = OpTypePointer Output %7\n" in initFrameBufferPrograms()
319 "%9 = OpVariable %8 Output\n" in initFrameBufferPrograms()
320 "%10 = OpTypePointer Input %7\n" in initFrameBufferPrograms()
321 "%11 = OpVariable %10 Input\n" in initFrameBufferPrograms()
322 "%4 = OpFunction %2 None %3\n" in initFrameBufferPrograms()
323 "%5 = OpLabel\n" in initFrameBufferPrograms()
324 "%12 = OpLoad %7 %11\n" in initFrameBufferPrograms()
325 "OpStore %9 %12\n" in initFrameBufferPrograms()
326 "OpReturn\n" in initFrameBufferPrograms()
327 "OpFunctionEnd\n"; in initFrameBufferPrograms()
333 "#version 450\n" in initFrameBufferPrograms()
334 "void main (void)\n" in initFrameBufferPrograms()
335 "{\n" in initFrameBufferPrograms()
336 " vec2 uv = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);\n" in initFrameBufferPrograms()
337 " gl_Position = vec4(uv * 2.0f + -1.0f, 0.0f, 1.0f);\n" in initFrameBufferPrograms()
338 " gl_PointSize = 1.0f;\n" in initFrameBufferPrograms()
339 "}\n"; in initFrameBufferPrograms()
342 "; SPIR-V\n" in initFrameBufferPrograms()
343 "; Version: 1.3\n" in initFrameBufferPrograms()
344 "; Generator: Khronos Glslang Reference Front End; 2\n" in initFrameBufferPrograms()
345 "; Bound: 44\n" in initFrameBufferPrograms()
346 "; Schema: 0\n" in initFrameBufferPrograms()
347 "OpCapability Shader\n" in initFrameBufferPrograms()
348 "%1 = OpExtInstImport \"GLSL.std.450\"\n" in initFrameBufferPrograms()
349 "OpMemoryModel Logical GLSL450\n" in initFrameBufferPrograms()
350 "OpEntryPoint Vertex %4 \"main\" %12 %29\n" in initFrameBufferPrograms()
351 "OpDecorate %12 BuiltIn VertexIndex\n" in initFrameBufferPrograms()
352 "OpMemberDecorate %27 0 BuiltIn Position\n" in initFrameBufferPrograms()
353 "OpMemberDecorate %27 1 BuiltIn PointSize\n" in initFrameBufferPrograms()
354 "OpMemberDecorate %27 2 BuiltIn ClipDistance\n" in initFrameBufferPrograms()
355 "OpMemberDecorate %27 3 BuiltIn CullDistance\n" in initFrameBufferPrograms()
356 "OpDecorate %27 Block\n" in initFrameBufferPrograms()
357 "%2 = OpTypeVoid\n" in initFrameBufferPrograms()
358 "%3 = OpTypeFunction %2\n" in initFrameBufferPrograms()
359 "%6 = OpTypeFloat 32\n" in initFrameBufferPrograms()
360 "%7 = OpTypeVector %6 2\n" in initFrameBufferPrograms()
361 "%8 = OpTypePointer Function %7\n" in initFrameBufferPrograms()
362 "%10 = OpTypeInt 32 1\n" in initFrameBufferPrograms()
363 "%11 = OpTypePointer Input %10\n" in initFrameBufferPrograms()
364 "%12 = OpVariable %11 Input\n" in initFrameBufferPrograms()
365 "%14 = OpConstant %10 1\n" in initFrameBufferPrograms()
366 "%16 = OpConstant %10 2\n" in initFrameBufferPrograms()
367 "%23 = OpTypeVector %6 4\n" in initFrameBufferPrograms()
368 "%24 = OpTypeInt 32 0\n" in initFrameBufferPrograms()
369 "%25 = OpConstant %24 1\n" in initFrameBufferPrograms()
370 "%26 = OpTypeArray %6 %25\n" in initFrameBufferPrograms()
371 "%27 = OpTypeStruct %23 %6 %26 %26\n" in initFrameBufferPrograms()
372 "%28 = OpTypePointer Output %27\n" in initFrameBufferPrograms()
373 "%29 = OpVariable %28 Output\n" in initFrameBufferPrograms()
374 "%30 = OpConstant %10 0\n" in initFrameBufferPrograms()
375 "%32 = OpConstant %6 2\n" in initFrameBufferPrograms()
376 "%34 = OpConstant %6 -1\n" in initFrameBufferPrograms()
377 "%37 = OpConstant %6 0\n" in initFrameBufferPrograms()
378 "%38 = OpConstant %6 1\n" in initFrameBufferPrograms()
379 "%42 = OpTypePointer Output %23\n" in initFrameBufferPrograms()
380 "%44 = OpTypePointer Output %6\n" in initFrameBufferPrograms()
381 "%4 = OpFunction %2 None %3\n" in initFrameBufferPrograms()
382 "%5 = OpLabel\n" in initFrameBufferPrograms()
383 "%9 = OpVariable %8 Function\n" in initFrameBufferPrograms()
384 "%13 = OpLoad %10 %12\n" in initFrameBufferPrograms()
385 "%15 = OpShiftLeftLogical %10 %13 %14\n" in initFrameBufferPrograms()
386 "%17 = OpBitwiseAnd %10 %15 %16\n" in initFrameBufferPrograms()
387 "%18 = OpConvertSToF %6 %17\n" in initFrameBufferPrograms()
388 "%19 = OpLoad %10 %12\n" in initFrameBufferPrograms()
389 "%20 = OpBitwiseAnd %10 %19 %16\n" in initFrameBufferPrograms()
390 "%21 = OpConvertSToF %6 %20\n" in initFrameBufferPrograms()
391 "%22 = OpCompositeConstruct %7 %18 %21\n" in initFrameBufferPrograms()
392 "OpStore %9 %22\n" in initFrameBufferPrograms()
393 "%31 = OpLoad %7 %9\n" in initFrameBufferPrograms()
394 "%33 = OpVectorTimesScalar %7 %31 %32\n" in initFrameBufferPrograms()
395 "%35 = OpCompositeConstruct %7 %34 %34\n" in initFrameBufferPrograms()
396 "%36 = OpFAdd %7 %33 %35\n" in initFrameBufferPrograms()
397 "%39 = OpCompositeExtract %6 %36 0\n" in initFrameBufferPrograms()
398 "%40 = OpCompositeExtract %6 %36 1\n" in initFrameBufferPrograms()
399 "%41 = OpCompositeConstruct %23 %39 %40 %37 %38\n" in initFrameBufferPrograms()
400 "%43 = OpAccessChain %42 %29 %30\n" in initFrameBufferPrograms()
401 "OpStore %43 %41\n" in initFrameBufferPrograms()
402 "%45 = OpAccessChain %44 %29 %14\n" in initFrameBufferPrograms()
403 "OpStore %45 %38\n" in initFrameBufferPrograms()
404 "OpReturn\n" in initFrameBufferPrograms()
405 "OpFunctionEnd\n"; in initFrameBufferPrograms()
421 "#extension GL_KHR_shader_subgroup_basic: enable\n" in initFrameBufferPrograms()
422 "layout(location = 0) out vec4 out_color;\n" in initFrameBufferPrograms()
423 "layout(location = 0) in highp vec4 in_position;\n" in initFrameBufferPrograms()
424 "\n" in initFrameBufferPrograms()
425 "void main (void)\n" in initFrameBufferPrograms()
426 "{\n" in initFrameBufferPrograms()
427 " if (subgroupElect())\n" in initFrameBufferPrograms()
428 " {\n" in initFrameBufferPrograms()
429 " out_color.r = " << ELECTED_VALUE << ";\n" in initFrameBufferPrograms()
430 " out_color.g = 1.0f;\n" in initFrameBufferPrograms()
431 " }\n" in initFrameBufferPrograms()
432 " else\n" in initFrameBufferPrograms()
433 " {\n" in initFrameBufferPrograms()
434 " out_color.r = " << UNELECTED_VALUE << ";\n" in initFrameBufferPrograms()
435 " out_color.g = 0.0f;\n" in initFrameBufferPrograms()
436 " }\n" in initFrameBufferPrograms()
437 " gl_Position = in_position;\n" in initFrameBufferPrograms()
438 " gl_PointSize = 1.0f;\n" in initFrameBufferPrograms()
439 "}\n"; in initFrameBufferPrograms()
442 "; SPIR-V\n" in initFrameBufferPrograms()
443 "; Version: 1.3\n" in initFrameBufferPrograms()
444 "; Generator: Khronos Glslang Reference Front End; 2\n" in initFrameBufferPrograms()
445 "; Bound: 38\n" in initFrameBufferPrograms()
446 "; Schema: 0\n" in initFrameBufferPrograms()
447 "OpCapability Shader\n" in initFrameBufferPrograms()
448 "OpCapability GroupNonUniform\n" in initFrameBufferPrograms()
449 "%1 = OpExtInstImport \"GLSL.std.450\"\n" in initFrameBufferPrograms()
450 "OpMemoryModel Logical GLSL450\n" in initFrameBufferPrograms()
451 "OpEntryPoint Vertex %4 \"main\" %15 %31 %35\n" in initFrameBufferPrograms()
452 "OpDecorate %15 Location 0\n" in initFrameBufferPrograms()
453 "OpMemberDecorate %29 0 BuiltIn Position\n" in initFrameBufferPrograms()
454 "OpMemberDecorate %29 1 BuiltIn PointSize\n" in initFrameBufferPrograms()
455 "OpMemberDecorate %29 2 BuiltIn ClipDistance\n" in initFrameBufferPrograms()
456 "OpMemberDecorate %29 3 BuiltIn CullDistance\n" in initFrameBufferPrograms()
457 "OpDecorate %29 Block\n" in initFrameBufferPrograms()
458 "OpDecorate %35 Location 0\n" in initFrameBufferPrograms()
459 "%2 = OpTypeVoid\n" in initFrameBufferPrograms()
460 "%3 = OpTypeFunction %2\n" in initFrameBufferPrograms()
461 "%6 = OpTypeBool\n" in initFrameBufferPrograms()
462 "%7 = OpTypeInt 32 0\n" in initFrameBufferPrograms()
463 "%8 = OpConstant %7 3\n" in initFrameBufferPrograms()
464 "%12 = OpTypeFloat 32\n" in initFrameBufferPrograms()
465 "%13 = OpTypeVector %12 4\n" in initFrameBufferPrograms()
466 "%14 = OpTypePointer Output %13\n" in initFrameBufferPrograms()
467 "%15 = OpVariable %14 Output\n" in initFrameBufferPrograms()
468 "%16 = OpConstant %12 " + electedValue.str() + "\n" in initFrameBufferPrograms()
469 "%17 = OpConstant %7 0\n" in initFrameBufferPrograms()
470 "%18 = OpTypePointer Output %12\n" in initFrameBufferPrograms()
471 "%20 = OpConstant %12 1\n" in initFrameBufferPrograms()
472 "%21 = OpConstant %7 1\n" in initFrameBufferPrograms()
473 "%24 = OpConstant %12 " + unelectedValue.str() + "\n" in initFrameBufferPrograms()
474 "%26 = OpConstant %12 0\n" in initFrameBufferPrograms()
475 "%28 = OpTypeArray %12 %21\n" in initFrameBufferPrograms()
476 "%29 = OpTypeStruct %13 %12 %28 %28\n" in initFrameBufferPrograms()
477 "%30 = OpTypePointer Output %29\n" in initFrameBufferPrograms()
478 "%31 = OpVariable %30 Output\n" in initFrameBufferPrograms()
479 "%32 = OpTypeInt 32 1\n" in initFrameBufferPrograms()
480 "%33 = OpConstant %32 0\n" in initFrameBufferPrograms()
481 "%34 = OpTypePointer Input %13\n" in initFrameBufferPrograms()
482 "%35 = OpVariable %34 Input\n" in initFrameBufferPrograms()
483 "%38 = OpConstant %32 1\n" in initFrameBufferPrograms()
484 "%4 = OpFunction %2 None %3\n" in initFrameBufferPrograms()
485 "%5 = OpLabel\n" in initFrameBufferPrograms()
486 "%9 = OpGroupNonUniformElect %6 %8\n" in initFrameBufferPrograms()
487 "OpSelectionMerge %11 None\n" in initFrameBufferPrograms()
488 "OpBranchConditional %9 %10 %23\n" in initFrameBufferPrograms()
489 "%10 = OpLabel\n" in initFrameBufferPrograms()
490 "%19 = OpAccessChain %18 %15 %17\n" in initFrameBufferPrograms()
491 "OpStore %19 %16\n" in initFrameBufferPrograms()
492 "%22 = OpAccessChain %18 %15 %21\n" in initFrameBufferPrograms()
493 "OpStore %22 %20\n" in initFrameBufferPrograms()
494 "OpBranch %11\n" in initFrameBufferPrograms()
495 "%23 = OpLabel\n" in initFrameBufferPrograms()
496 "%25 = OpAccessChain %18 %15 %17\n" in initFrameBufferPrograms()
497 "OpStore %25 %24\n" in initFrameBufferPrograms()
498 "%27 = OpAccessChain %18 %15 %21\n" in initFrameBufferPrograms()
499 "OpStore %27 %26\n" in initFrameBufferPrograms()
500 "OpBranch %11\n" in initFrameBufferPrograms()
501 "%11 = OpLabel\n" in initFrameBufferPrograms()
502 "%36 = OpLoad %13 %35\n" in initFrameBufferPrograms()
503 "%37 = OpAccessChain %14 %31 %33\n" in initFrameBufferPrograms()
504 "OpStore %37 %36\n" in initFrameBufferPrograms()
505 "%39 = OpAccessChain %18 %31 %38\n" in initFrameBufferPrograms()
506 "OpStore %39 %20\n" in initFrameBufferPrograms()
507 "OpReturn\n" in initFrameBufferPrograms()
508 "OpFunctionEnd\n"; in initFrameBufferPrograms()
514 "#version 450\n" in initFrameBufferPrograms()
515 "#extension GL_KHR_shader_subgroup_basic: enable\n" in initFrameBufferPrograms()
516 "layout(points) in;\n" in initFrameBufferPrograms()
517 "layout(points, max_vertices = 1) out;\n" in initFrameBufferPrograms()
518 "layout(location = 0) out vec4 out_color;\n" in initFrameBufferPrograms()
519 "void main (void)\n" in initFrameBufferPrograms()
520 "{\n" in initFrameBufferPrograms()
521 " if (subgroupElect())\n" in initFrameBufferPrograms()
522 " {\n" in initFrameBufferPrograms()
523 " out_color.r = " << ELECTED_VALUE << ";\n" in initFrameBufferPrograms()
524 " out_color.g = 1.0f;\n" in initFrameBufferPrograms()
525 " }\n" in initFrameBufferPrograms()
526 " else\n" in initFrameBufferPrograms()
527 " {\n" in initFrameBufferPrograms()
528 " out_color.r = " << UNELECTED_VALUE << ";\n" in initFrameBufferPrograms()
529 " out_color.g = 0.0f;\n" in initFrameBufferPrograms()
530 " }\n" in initFrameBufferPrograms()
531 " gl_Position = gl_in[0].gl_Position;\n" in initFrameBufferPrograms()
532 " EmitVertex();\n" in initFrameBufferPrograms()
533 " EndPrimitive();\n" in initFrameBufferPrograms()
534 "}\n"; in initFrameBufferPrograms()
537 "; SPIR-V\n" in initFrameBufferPrograms()
538 "; Version: 1.3\n" in initFrameBufferPrograms()
539 "; Generator: Khronos Glslang Reference Front End; 2\n" in initFrameBufferPrograms()
540 "; Bound: 42\n" in initFrameBufferPrograms()
541 "; Schema: 0\n" in initFrameBufferPrograms()
542 "OpCapability Geometry\n" in initFrameBufferPrograms()
543 "OpCapability GroupNonUniform\n" in initFrameBufferPrograms()
544 "%1 = OpExtInstImport \"GLSL.std.450\"\n" in initFrameBufferPrograms()
545 "OpMemoryModel Logical GLSL450\n" in initFrameBufferPrograms()
546 "OpEntryPoint Geometry %4 \"main\" %15 %31 %37\n" in initFrameBufferPrograms()
547 "OpExecutionMode %4 InputPoints\n" in initFrameBufferPrograms()
548 "OpExecutionMode %4 Invocations 1\n" in initFrameBufferPrograms()
549 "OpExecutionMode %4 OutputPoints\n" in initFrameBufferPrograms()
550 "OpExecutionMode %4 OutputVertices 1\n" in initFrameBufferPrograms()
551 "OpDecorate %15 Location 0\n" in initFrameBufferPrograms()
552 "OpMemberDecorate %29 0 BuiltIn Position\n" in initFrameBufferPrograms()
553 "OpMemberDecorate %29 1 BuiltIn PointSize\n" in initFrameBufferPrograms()
554 "OpMemberDecorate %29 2 BuiltIn ClipDistance\n" in initFrameBufferPrograms()
555 "OpMemberDecorate %29 3 BuiltIn CullDistance\n" in initFrameBufferPrograms()
556 "OpDecorate %29 Block\n" in initFrameBufferPrograms()
557 "OpMemberDecorate %34 0 BuiltIn Position\n" in initFrameBufferPrograms()
558 "OpMemberDecorate %34 1 BuiltIn PointSize\n" in initFrameBufferPrograms()
559 "OpMemberDecorate %34 2 BuiltIn ClipDistance\n" in initFrameBufferPrograms()
560 "OpMemberDecorate %34 3 BuiltIn CullDistance\n" in initFrameBufferPrograms()
561 "OpDecorate %34 Block\n" in initFrameBufferPrograms()
562 "%2 = OpTypeVoid\n" in initFrameBufferPrograms()
563 "%3 = OpTypeFunction %2\n" in initFrameBufferPrograms()
564 "%6 = OpTypeBool\n" in initFrameBufferPrograms()
565 "%7 = OpTypeInt 32 0\n" in initFrameBufferPrograms()
566 "%8 = OpConstant %7 3\n" in initFrameBufferPrograms()
567 "%12 = OpTypeFloat 32\n" in initFrameBufferPrograms()
568 "%13 = OpTypeVector %12 4\n" in initFrameBufferPrograms()
569 "%14 = OpTypePointer Output %13\n" in initFrameBufferPrograms()
570 "%15 = OpVariable %14 Output\n" in initFrameBufferPrograms()
571 "%16 = OpConstant %12 " + electedValue.str() + "\n" in initFrameBufferPrograms()
572 "%17 = OpConstant %7 0\n" in initFrameBufferPrograms()
573 "%18 = OpTypePointer Output %12\n" in initFrameBufferPrograms()
574 "%20 = OpConstant %12 1\n" in initFrameBufferPrograms()
575 "%21 = OpConstant %7 1\n" in initFrameBufferPrograms()
576 "%24 = OpConstant %12 " + unelectedValue.str() + "\n" in initFrameBufferPrograms()
577 "%26 = OpConstant %12 0\n" in initFrameBufferPrograms()
578 "%28 = OpTypeArray %12 %21\n" in initFrameBufferPrograms()
579 "%29 = OpTypeStruct %13 %12 %28 %28\n" in initFrameBufferPrograms()
580 "%30 = OpTypePointer Output %29\n" in initFrameBufferPrograms()
581 "%31 = OpVariable %30 Output\n" in initFrameBufferPrograms()
582 "%32 = OpTypeInt 32 1\n" in initFrameBufferPrograms()
583 "%33 = OpConstant %32 0\n" in initFrameBufferPrograms()
584 "%34 = OpTypeStruct %13 %12 %28 %28\n" in initFrameBufferPrograms()
585 "%35 = OpTypeArray %34 %21\n" in initFrameBufferPrograms()
586 "%36 = OpTypePointer Input %35\n" in initFrameBufferPrograms()
587 "%37 = OpVariable %36 Input\n" in initFrameBufferPrograms()
588 "%38 = OpTypePointer Input %13\n" in initFrameBufferPrograms()
589 "%4 = OpFunction %2 None %3\n" in initFrameBufferPrograms()
590 "%5 = OpLabel\n" in initFrameBufferPrograms()
591 "%9 = OpGroupNonUniformElect %6 %8\n" in initFrameBufferPrograms()
592 "OpSelectionMerge %11 None\n" in initFrameBufferPrograms()
593 "OpBranchConditional %9 %10 %23\n" in initFrameBufferPrograms()
594 "%10 = OpLabel\n" in initFrameBufferPrograms()
595 "%19 = OpAccessChain %18 %15 %17\n" in initFrameBufferPrograms()
596 "OpStore %19 %16\n" in initFrameBufferPrograms()
597 "%22 = OpAccessChain %18 %15 %21\n" in initFrameBufferPrograms()
598 "OpStore %22 %20\n" in initFrameBufferPrograms()
599 "OpBranch %11\n" in initFrameBufferPrograms()
600 "%23 = OpLabel\n" in initFrameBufferPrograms()
601 "%25 = OpAccessChain %18 %15 %17\n" in initFrameBufferPrograms()
602 "OpStore %25 %24\n" in initFrameBufferPrograms()
603 "%27 = OpAccessChain %18 %15 %21\n" in initFrameBufferPrograms()
604 "OpStore %27 %26\n" in initFrameBufferPrograms()
605 "OpBranch %11\n" in initFrameBufferPrograms()
606 "%11 = OpLabel\n" in initFrameBufferPrograms()
607 "%39 = OpAccessChain %38 %37 %33 %33\n" in initFrameBufferPrograms()
608 "%40 = OpLoad %13 %39\n" in initFrameBufferPrograms()
609 "%41 = OpAccessChain %14 %31 %33\n" in initFrameBufferPrograms()
610 "OpStore %41 %40\n" in initFrameBufferPrograms()
611 "OpEmitVertex\n" in initFrameBufferPrograms()
612 "OpEndPrimitive\n" in initFrameBufferPrograms()
613 "OpReturn\n" in initFrameBufferPrograms()
614 "OpFunctionEnd\n"; in initFrameBufferPrograms()
620 << "#extension GL_KHR_shader_subgroup_basic: enable\n" in initFrameBufferPrograms()
621 << "#extension GL_EXT_tessellation_shader : require\n" in initFrameBufferPrograms()
622 << "layout(vertices = 2) out;\n" in initFrameBufferPrograms()
623 << "void main (void)\n" in initFrameBufferPrograms()
624 << "{\n" in initFrameBufferPrograms()
625 << " if (gl_InvocationID == 0)\n" in initFrameBufferPrograms()
626 <<" {\n" in initFrameBufferPrograms()
627 << " gl_TessLevelOuter[0] = 1.0f;\n" in initFrameBufferPrograms()
628 << " gl_TessLevelOuter[1] = 1.0f;\n" in initFrameBufferPrograms()
629 << " }\n" in initFrameBufferPrograms()
630 << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" in initFrameBufferPrograms()
631 << "}\n"; in initFrameBufferPrograms()
634 "; SPIR-V\n" in initFrameBufferPrograms()
635 "; Version: 1.3\n" in initFrameBufferPrograms()
636 "; Generator: Khronos Glslang Reference Front End; 2\n" in initFrameBufferPrograms()
637 "; Bound: 46\n" in initFrameBufferPrograms()
638 "; Schema: 0\n" in initFrameBufferPrograms()
639 "OpCapability Tessellation\n" in initFrameBufferPrograms()
640 "%1 = OpExtInstImport \"GLSL.std.450\"\n" in initFrameBufferPrograms()
641 "OpMemoryModel Logical GLSL450\n" in initFrameBufferPrograms()
642 "OpEntryPoint TessellationControl %4 \"main\" %8 %20 %33 %39\n" in initFrameBufferPrograms()
643 "OpExecutionMode %4 OutputVertices 2\n" in initFrameBufferPrograms()
644 "OpDecorate %8 BuiltIn InvocationId\n" in initFrameBufferPrograms()
645 "OpDecorate %20 Patch\n" in initFrameBufferPrograms()
646 "OpDecorate %20 BuiltIn TessLevelOuter\n" in initFrameBufferPrograms()
647 "OpMemberDecorate %29 0 BuiltIn Position\n" in initFrameBufferPrograms()
648 "OpMemberDecorate %29 1 BuiltIn PointSize\n" in initFrameBufferPrograms()
649 "OpMemberDecorate %29 2 BuiltIn ClipDistance\n" in initFrameBufferPrograms()
650 "OpMemberDecorate %29 3 BuiltIn CullDistance\n" in initFrameBufferPrograms()
651 "OpDecorate %29 Block\n" in initFrameBufferPrograms()
652 "OpMemberDecorate %35 0 BuiltIn Position\n" in initFrameBufferPrograms()
653 "OpMemberDecorate %35 1 BuiltIn PointSize\n" in initFrameBufferPrograms()
654 "OpMemberDecorate %35 2 BuiltIn ClipDistance\n" in initFrameBufferPrograms()
655 "OpMemberDecorate %35 3 BuiltIn CullDistance\n" in initFrameBufferPrograms()
656 "OpDecorate %35 Block\n" in initFrameBufferPrograms()
657 "%2 = OpTypeVoid\n" in initFrameBufferPrograms()
658 "%3 = OpTypeFunction %2\n" in initFrameBufferPrograms()
659 "%6 = OpTypeInt 32 1\n" in initFrameBufferPrograms()
660 "%7 = OpTypePointer Input %6\n" in initFrameBufferPrograms()
661 "%8 = OpVariable %7 Input\n" in initFrameBufferPrograms()
662 "%10 = OpConstant %6 0\n" in initFrameBufferPrograms()
663 "%11 = OpTypeBool\n" in initFrameBufferPrograms()
664 "%15 = OpTypeFloat 32\n" in initFrameBufferPrograms()
665 "%16 = OpTypeInt 32 0\n" in initFrameBufferPrograms()
666 "%17 = OpConstant %16 4\n" in initFrameBufferPrograms()
667 "%18 = OpTypeArray %15 %17\n" in initFrameBufferPrograms()
668 "%19 = OpTypePointer Output %18\n" in initFrameBufferPrograms()
669 "%20 = OpVariable %19 Output\n" in initFrameBufferPrograms()
670 "%21 = OpConstant %15 1\n" in initFrameBufferPrograms()
671 "%22 = OpTypePointer Output %15\n" in initFrameBufferPrograms()
672 "%24 = OpConstant %6 1\n" in initFrameBufferPrograms()
673 "%26 = OpTypeVector %15 4\n" in initFrameBufferPrograms()
674 "%27 = OpConstant %16 1\n" in initFrameBufferPrograms()
675 "%28 = OpTypeArray %15 %27\n" in initFrameBufferPrograms()
676 "%29 = OpTypeStruct %26 %15 %28 %28\n" in initFrameBufferPrograms()
677 "%30 = OpConstant %16 2\n" in initFrameBufferPrograms()
678 "%31 = OpTypeArray %29 %30\n" in initFrameBufferPrograms()
679 "%32 = OpTypePointer Output %31\n" in initFrameBufferPrograms()
680 "%33 = OpVariable %32 Output\n" in initFrameBufferPrograms()
681 "%35 = OpTypeStruct %26 %15 %28 %28\n" in initFrameBufferPrograms()
682 "%36 = OpConstant %16 32\n" in initFrameBufferPrograms()
683 "%37 = OpTypeArray %35 %36\n" in initFrameBufferPrograms()
684 "%38 = OpTypePointer Input %37\n" in initFrameBufferPrograms()
685 "%39 = OpVariable %38 Input\n" in initFrameBufferPrograms()
686 "%41 = OpTypePointer Input %26\n" in initFrameBufferPrograms()
687 "%44 = OpTypePointer Output %26\n" in initFrameBufferPrograms()
688 "%4 = OpFunction %2 None %3\n" in initFrameBufferPrograms()
689 "%5 = OpLabel\n" in initFrameBufferPrograms()
690 "%9 = OpLoad %6 %8\n" in initFrameBufferPrograms()
691 "%12 = OpIEqual %11 %9 %10\n" in initFrameBufferPrograms()
692 "OpSelectionMerge %14 None\n" in initFrameBufferPrograms()
693 "OpBranchConditional %12 %13 %14\n" in initFrameBufferPrograms()
694 "%13 = OpLabel\n" in initFrameBufferPrograms()
695 "%23 = OpAccessChain %22 %20 %10\n" in initFrameBufferPrograms()
696 "OpStore %23 %21\n" in initFrameBufferPrograms()
697 "%25 = OpAccessChain %22 %20 %24\n" in initFrameBufferPrograms()
698 "OpStore %25 %21\n" in initFrameBufferPrograms()
699 "OpBranch %14\n" in initFrameBufferPrograms()
700 "%14 = OpLabel\n" in initFrameBufferPrograms()
701 "%34 = OpLoad %6 %8\n" in initFrameBufferPrograms()
702 "%40 = OpLoad %6 %8\n" in initFrameBufferPrograms()
703 "%42 = OpAccessChain %41 %39 %40 %10\n" in initFrameBufferPrograms()
704 "%43 = OpLoad %26 %42\n" in initFrameBufferPrograms()
705 "%45 = OpAccessChain %44 %33 %34 %10\n" in initFrameBufferPrograms()
706 "OpStore %45 %43\n" in initFrameBufferPrograms()
707 "OpReturn\n" in initFrameBufferPrograms()
708 "OpFunctionEnd\n"; in initFrameBufferPrograms()
712 "#extension GL_KHR_shader_subgroup_basic: enable\n" in initFrameBufferPrograms()
713 "#extension GL_EXT_tessellation_shader : require\n" in initFrameBufferPrograms()
714 "layout(isolines, equal_spacing, ccw ) in;\n" in initFrameBufferPrograms()
715 "layout(location = 0) out vec4 out_color;\n" in initFrameBufferPrograms()
716 "\n" in initFrameBufferPrograms()
717 "void main (void)\n" in initFrameBufferPrograms()
718 "{\n" in initFrameBufferPrograms()
719 " if (subgroupElect())\n" in initFrameBufferPrograms()
720 " {\n" in initFrameBufferPrograms()
721 " out_color.r = " << 2 * ELECTED_VALUE - UNELECTED_VALUE << ";\n" in initFrameBufferPrograms()
722 " out_color.g = 2.0f;\n" in initFrameBufferPrograms()
723 " }\n" in initFrameBufferPrograms()
724 " else\n" in initFrameBufferPrograms()
725 " {\n" in initFrameBufferPrograms()
726 " out_color.r = " << UNELECTED_VALUE << ";\n" in initFrameBufferPrograms()
727 " out_color.g = 0.0f;\n" in initFrameBufferPrograms()
728 " }\n" in initFrameBufferPrograms()
729 " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" in initFrameBufferPrograms()
730 "}\n"; in initFrameBufferPrograms()
734 "; SPIR-V\n" in initFrameBufferPrograms()
735 "; Version: 1.3\n" in initFrameBufferPrograms()
736 "; Generator: Khronos Glslang Reference Front End; 2\n" in initFrameBufferPrograms()
737 "; Bound: 54\n" in initFrameBufferPrograms()
738 "; Schema: 0\n" in initFrameBufferPrograms()
739 "OpCapability Tessellation\n" in initFrameBufferPrograms()
740 "OpCapability GroupNonUniform\n" in initFrameBufferPrograms()
741 "%1 = OpExtInstImport \"GLSL.std.450\"\n" in initFrameBufferPrograms()
742 "OpMemoryModel Logical GLSL450\n" in initFrameBufferPrograms()
743 "OpEntryPoint TessellationEvaluation %4 \"main\" %15 %31 %38 %47\n" in initFrameBufferPrograms()
744 "OpExecutionMode %4 Isolines\n" in initFrameBufferPrograms()
745 "OpExecutionMode %4 SpacingEqual\n" in initFrameBufferPrograms()
746 "OpExecutionMode %4 VertexOrderCcw\n" in initFrameBufferPrograms()
747 "OpDecorate %15 Location 0\n" in initFrameBufferPrograms()
748 "OpMemberDecorate %29 0 BuiltIn Position\n" in initFrameBufferPrograms()
749 "OpMemberDecorate %29 1 BuiltIn PointSize\n" in initFrameBufferPrograms()
750 "OpMemberDecorate %29 2 BuiltIn ClipDistance\n" in initFrameBufferPrograms()
751 "OpMemberDecorate %29 3 BuiltIn CullDistance\n" in initFrameBufferPrograms()
752 "OpDecorate %29 Block\n" in initFrameBufferPrograms()
753 "OpMemberDecorate %34 0 BuiltIn Position\n" in initFrameBufferPrograms()
754 "OpMemberDecorate %34 1 BuiltIn PointSize\n" in initFrameBufferPrograms()
755 "OpMemberDecorate %34 2 BuiltIn ClipDistance\n" in initFrameBufferPrograms()
756 "OpMemberDecorate %34 3 BuiltIn CullDistance\n" in initFrameBufferPrograms()
757 "OpDecorate %34 Block\n" in initFrameBufferPrograms()
758 "OpDecorate %47 BuiltIn TessCoord\n" in initFrameBufferPrograms()
759 "%2 = OpTypeVoid\n" in initFrameBufferPrograms()
760 "%3 = OpTypeFunction %2\n" in initFrameBufferPrograms()
761 "%6 = OpTypeBool\n" in initFrameBufferPrograms()
762 "%7 = OpTypeInt 32 0\n" in initFrameBufferPrograms()
763 "%8 = OpConstant %7 3\n" in initFrameBufferPrograms()
764 "%12 = OpTypeFloat 32\n" in initFrameBufferPrograms()
765 "%13 = OpTypeVector %12 4\n" in initFrameBufferPrograms()
766 "%14 = OpTypePointer Output %13\n" in initFrameBufferPrograms()
767 "%15 = OpVariable %14 Output\n" in initFrameBufferPrograms()
768 "%16 = OpConstant %12 71\n"//electedValue in initFrameBufferPrograms()
769 "%17 = OpConstant %7 0\n" in initFrameBufferPrograms()
770 "%18 = OpTypePointer Output %12\n" in initFrameBufferPrograms()
771 "%20 = OpConstant %12 2\n" in initFrameBufferPrograms()
772 "%21 = OpConstant %7 1\n" in initFrameBufferPrograms()
773 "%24 = OpConstant %12 " + unelectedValue.str() + "\n" in initFrameBufferPrograms()
774 "%26 = OpConstant %12 0\n" in initFrameBufferPrograms()
775 "%28 = OpTypeArray %12 %21\n" in initFrameBufferPrograms()
776 "%29 = OpTypeStruct %13 %12 %28 %28\n" in initFrameBufferPrograms()
777 "%30 = OpTypePointer Output %29\n" in initFrameBufferPrograms()
778 "%31 = OpVariable %30 Output\n" in initFrameBufferPrograms()
779 "%32 = OpTypeInt 32 1\n" in initFrameBufferPrograms()
780 "%33 = OpConstant %32 0\n" in initFrameBufferPrograms()
781 "%34 = OpTypeStruct %13 %12 %28 %28\n" in initFrameBufferPrograms()
782 "%35 = OpConstant %7 32\n" in initFrameBufferPrograms()
783 "%36 = OpTypeArray %34 %35\n" in initFrameBufferPrograms()
784 "%37 = OpTypePointer Input %36\n" in initFrameBufferPrograms()
785 "%38 = OpVariable %37 Input\n" in initFrameBufferPrograms()
786 "%39 = OpTypePointer Input %13\n" in initFrameBufferPrograms()
787 "%42 = OpConstant %32 1\n" in initFrameBufferPrograms()
788 "%45 = OpTypeVector %12 3\n" in initFrameBufferPrograms()
789 "%46 = OpTypePointer Input %45\n" in initFrameBufferPrograms()
790 "%47 = OpVariable %46 Input\n" in initFrameBufferPrograms()
791 "%48 = OpTypePointer Input %12\n" in initFrameBufferPrograms()
792 "%4 = OpFunction %2 None %3\n" in initFrameBufferPrograms()
793 "%5 = OpLabel\n" in initFrameBufferPrograms()
794 "%9 = OpGroupNonUniformElect %6 %8\n" in initFrameBufferPrograms()
795 "OpSelectionMerge %11 None\n" in initFrameBufferPrograms()
796 "OpBranchConditional %9 %10 %23\n" in initFrameBufferPrograms()
797 "%10 = OpLabel\n" in initFrameBufferPrograms()
798 "%19 = OpAccessChain %18 %15 %17\n" in initFrameBufferPrograms()
799 "OpStore %19 %16\n" in initFrameBufferPrograms()
800 "%22 = OpAccessChain %18 %15 %21\n" in initFrameBufferPrograms()
801 "OpStore %22 %20\n" in initFrameBufferPrograms()
802 "OpBranch %11\n" in initFrameBufferPrograms()
803 "%23 = OpLabel\n" in initFrameBufferPrograms()
804 "%25 = OpAccessChain %18 %15 %17\n" in initFrameBufferPrograms()
805 "OpStore %25 %24\n" in initFrameBufferPrograms()
806 "%27 = OpAccessChain %18 %15 %21\n" in initFrameBufferPrograms()
807 "OpStore %27 %26\n" in initFrameBufferPrograms()
808 "OpBranch %11\n" in initFrameBufferPrograms()
809 "%11 = OpLabel\n" in initFrameBufferPrograms()
810 "%40 = OpAccessChain %39 %38 %33 %33\n" in initFrameBufferPrograms()
811 "%41 = OpLoad %13 %40\n" in initFrameBufferPrograms()
812 "%43 = OpAccessChain %39 %38 %42 %33\n" in initFrameBufferPrograms()
813 "%44 = OpLoad %13 %43\n" in initFrameBufferPrograms()
814 "%49 = OpAccessChain %48 %47 %17\n" in initFrameBufferPrograms()
815 "%50 = OpLoad %12 %49\n" in initFrameBufferPrograms()
816 "%51 = OpCompositeConstruct %13 %50 %50 %50 %50\n" in initFrameBufferPrograms()
817 "%52 = OpExtInst %13 %1 FMix %41 %44 %51\n" in initFrameBufferPrograms()
818 "%53 = OpAccessChain %14 %31 %33\n" in initFrameBufferPrograms()
819 "OpStore %53 %52\n" in initFrameBufferPrograms()
820 "OpReturn\n" in initFrameBufferPrograms()
821 "OpFunctionEnd\n"; in initFrameBufferPrograms()
828 "#extension GL_KHR_shader_subgroup_basic: enable\n" in initFrameBufferPrograms()
829 "#extension GL_EXT_tessellation_shader : require\n" in initFrameBufferPrograms()
830 "layout(vertices = 2) out;\n" in initFrameBufferPrograms()
831 "layout(location = 0) out vec4 out_color[];\n" in initFrameBufferPrograms()
832 "void main (void)\n" in initFrameBufferPrograms()
833 "{\n" in initFrameBufferPrograms()
834 " if (gl_InvocationID == 0)\n" in initFrameBufferPrograms()
835 {\n" in initFrameBufferPrograms()
836 " gl_TessLevelOuter[0] = 1.0f;\n" in initFrameBufferPrograms()
837 " gl_TessLevelOuter[1] = 1.0f;\n" in initFrameBufferPrograms()
838 " }\n" in initFrameBufferPrograms()
839 " if (subgroupElect())\n" in initFrameBufferPrograms()
840 " {\n" in initFrameBufferPrograms()
841 " out_color[gl_InvocationID].r = " << ELECTED_VALUE << ";\n" in initFrameBufferPrograms()
842 " out_color[gl_InvocationID].g = 1.0f;\n" in initFrameBufferPrograms()
843 " }\n" in initFrameBufferPrograms()
844 " else\n" in initFrameBufferPrograms()
845 " {\n" in initFrameBufferPrograms()
846 " out_color[gl_InvocationID].r = " << UNELECTED_VALUE << ";\n" in initFrameBufferPrograms()
847 " out_color[gl_InvocationID].g = 0.0f;\n" in initFrameBufferPrograms()
848 " }\n" in initFrameBufferPrograms()
849 " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" in initFrameBufferPrograms()
850 "}\n"; in initFrameBufferPrograms()
853 "; SPIR-V\n" in initFrameBufferPrograms()
854 "; Version: 1.3\n" in initFrameBufferPrograms()
855 "; Generator: Khronos Glslang Reference Front End; 2\n" in initFrameBufferPrograms()
856 "; Bound: 66\n" in initFrameBufferPrograms()
857 "; Schema: 0\n" in initFrameBufferPrograms()
858 "OpCapability Tessellation\n" in initFrameBufferPrograms()
859 "OpCapability GroupNonUniform\n" in initFrameBufferPrograms()
860 "%1 = OpExtInstImport \"GLSL.std.450\"\n" in initFrameBufferPrograms()
861 "OpMemoryModel Logical GLSL450\n" in initFrameBufferPrograms()
862 "OpEntryPoint TessellationControl %4 \"main\" %8 %20 %34 %53 %59\n" in initFrameBufferPrograms()
863 "OpExecutionMode %4 OutputVertices 2\n" in initFrameBufferPrograms()
864 "OpDecorate %8 BuiltIn InvocationId\n" in initFrameBufferPrograms()
865 "OpDecorate %20 Patch\n" in initFrameBufferPrograms()
866 "OpDecorate %20 BuiltIn TessLevelOuter\n" in initFrameBufferPrograms()
867 "OpDecorate %34 Location 0\n" in initFrameBufferPrograms()
868 "OpMemberDecorate %50 0 BuiltIn Position\n" in initFrameBufferPrograms()
869 "OpMemberDecorate %50 1 BuiltIn PointSize\n" in initFrameBufferPrograms()
870 "OpMemberDecorate %50 2 BuiltIn ClipDistance\n" in initFrameBufferPrograms()
871 "OpMemberDecorate %50 3 BuiltIn CullDistance\n" in initFrameBufferPrograms()
872 "OpDecorate %50 Block\n" in initFrameBufferPrograms()
873 "OpMemberDecorate %55 0 BuiltIn Position\n" in initFrameBufferPrograms()
874 "OpMemberDecorate %55 1 BuiltIn PointSize\n" in initFrameBufferPrograms()
875 "OpMemberDecorate %55 2 BuiltIn ClipDistance\n" in initFrameBufferPrograms()
876 "OpMemberDecorate %55 3 BuiltIn CullDistance\n" in initFrameBufferPrograms()
877 "OpDecorate %55 Block\n" in initFrameBufferPrograms()
878 "%2 = OpTypeVoid\n" in initFrameBufferPrograms()
879 "%3 = OpTypeFunction %2\n" in initFrameBufferPrograms()
880 "%6 = OpTypeInt 32 1\n" in initFrameBufferPrograms()
881 "%7 = OpTypePointer Input %6\n" in initFrameBufferPrograms()
882 "%8 = OpVariable %7 Input\n" in initFrameBufferPrograms()
883 "%10 = OpConstant %6 0\n" in initFrameBufferPrograms()
884 "%11 = OpTypeBool\n" in initFrameBufferPrograms()
885 "%15 = OpTypeFloat 32\n" in initFrameBufferPrograms()
886 "%16 = OpTypeInt 32 0\n" in initFrameBufferPrograms()
887 "%17 = OpConstant %16 4\n" in initFrameBufferPrograms()
888 "%18 = OpTypeArray %15 %17\n" in initFrameBufferPrograms()
889 "%19 = OpTypePointer Output %18\n" in initFrameBufferPrograms()
890 "%20 = OpVariable %19 Output\n" in initFrameBufferPrograms()
891 "%21 = OpConstant %15 1\n" in initFrameBufferPrograms()
892 "%22 = OpTypePointer Output %15\n" in initFrameBufferPrograms()
893 "%24 = OpConstant %6 1\n" in initFrameBufferPrograms()
894 "%26 = OpConstant %16 3\n" in initFrameBufferPrograms()
895 "%30 = OpTypeVector %15 4\n" in initFrameBufferPrograms()
896 "%31 = OpConstant %16 2\n" in initFrameBufferPrograms()
897 "%32 = OpTypeArray %30 %31\n" in initFrameBufferPrograms()
898 "%33 = OpTypePointer Output %32\n" in initFrameBufferPrograms()
899 "%34 = OpVariable %33 Output\n" in initFrameBufferPrograms()
900 "%36 = OpConstant %15 " + electedValue.str() + "\n" in initFrameBufferPrograms()
901 "%37 = OpConstant %16 0\n" in initFrameBufferPrograms()
902 "%40 = OpConstant %16 1\n" in initFrameBufferPrograms()
903 "%44 = OpConstant %15 " + unelectedValue.str() + "\n" in initFrameBufferPrograms()
904 "%47 = OpConstant %15 0\n" in initFrameBufferPrograms()
905 "%49 = OpTypeArray %15 %40\n" in initFrameBufferPrograms()
906 "%50 = OpTypeStruct %30 %15 %49 %49\n" in initFrameBufferPrograms()
907 "%51 = OpTypeArray %50 %31\n" in initFrameBufferPrograms()
908 "%52 = OpTypePointer Output %51\n" in initFrameBufferPrograms()
909 "%53 = OpVariable %52 Output\n" in initFrameBufferPrograms()
910 "%55 = OpTypeStruct %30 %15 %49 %49\n" in initFrameBufferPrograms()
911 "%56 = OpConstant %16 32\n" in initFrameBufferPrograms()
912 "%57 = OpTypeArray %55 %56\n" in initFrameBufferPrograms()
913 "%58 = OpTypePointer Input %57\n" in initFrameBufferPrograms()
914 "%59 = OpVariable %58 Input\n" in initFrameBufferPrograms()
915 "%61 = OpTypePointer Input %30\n" in initFrameBufferPrograms()
916 "%64 = OpTypePointer Output %30\n" in initFrameBufferPrograms()
917 "%4 = OpFunction %2 None %3\n" in initFrameBufferPrograms()
918 "%5 = OpLabel\n" in initFrameBufferPrograms()
919 "%9 = OpLoad %6 %8\n" in initFrameBufferPrograms()
920 "%12 = OpIEqual %11 %9 %10\n" in initFrameBufferPrograms()
921 "OpSelectionMerge %14 None\n" in initFrameBufferPrograms()
922 "OpBranchConditional %12 %13 %14\n" in initFrameBufferPrograms()
923 "%13 = OpLabel\n" in initFrameBufferPrograms()
924 "%23 = OpAccessChain %22 %20 %10\n" in initFrameBufferPrograms()
925 "OpStore %23 %21\n" in initFrameBufferPrograms()
926 "%25 = OpAccessChain %22 %20 %24\n" in initFrameBufferPrograms()
927 "OpStore %25 %21\n" in initFrameBufferPrograms()
928 "OpBranch %14\n" in initFrameBufferPrograms()
929 "%14 = OpLabel\n" in initFrameBufferPrograms()
930 "%27 = OpGroupNonUniformElect %11 %26\n" in initFrameBufferPrograms()
931 "OpSelectionMerge %29 None\n" in initFrameBufferPrograms()
932 "OpBranchConditional %27 %28 %42\n" in initFrameBufferPrograms()
933 "%28 = OpLabel\n" in initFrameBufferPrograms()
934 "%35 = OpLoad %6 %8\n" in initFrameBufferPrograms()
935 "%38 = OpAccessChain %22 %34 %35 %37\n" in initFrameBufferPrograms()
936 "OpStore %38 %36\n" in initFrameBufferPrograms()
937 "%39 = OpLoad %6 %8\n" in initFrameBufferPrograms()
938 "%41 = OpAccessChain %22 %34 %39 %40\n" in initFrameBufferPrograms()
939 "OpStore %41 %21\n" in initFrameBufferPrograms()
940 "OpBranch %29\n" in initFrameBufferPrograms()
941 "%42 = OpLabel\n" in initFrameBufferPrograms()
942 "%43 = OpLoad %6 %8\n" in initFrameBufferPrograms()
943 "%45 = OpAccessChain %22 %34 %43 %37\n" in initFrameBufferPrograms()
944 "OpStore %45 %44\n" in initFrameBufferPrograms()
945 "%46 = OpLoad %6 %8\n" in initFrameBufferPrograms()
946 "%48 = OpAccessChain %22 %34 %46 %40\n" in initFrameBufferPrograms()
947 "OpStore %48 %47\n" in initFrameBufferPrograms()
948 "OpBranch %29\n" in initFrameBufferPrograms()
949 "%29 = OpLabel\n" in initFrameBufferPrograms()
950 "%54 = OpLoad %6 %8\n" in initFrameBufferPrograms()
951 "%60 = OpLoad %6 %8\n" in initFrameBufferPrograms()
952 "%62 = OpAccessChain %61 %59 %60 %10\n" in initFrameBufferPrograms()
953 "%63 = OpLoad %30 %62\n" in initFrameBufferPrograms()
954 "%65 = OpAccessChain %64 %53 %54 %10\n" in initFrameBufferPrograms()
955 "OpStore %65 %63\n" in initFrameBufferPrograms()
956 "OpReturn\n" in initFrameBufferPrograms()
957 "OpFunctionEnd\n"; in initFrameBufferPrograms()
961 "#extension GL_KHR_shader_subgroup_ballot: enable\n" in initFrameBufferPrograms()
962 "#extension GL_EXT_tessellation_shader : require\n" in initFrameBufferPrograms()
963 "layout(isolines, equal_spacing, ccw ) in;\n" in initFrameBufferPrograms()
964 "layout(location = 0) in vec4 in_color[];\n" in initFrameBufferPrograms()
965 "layout(location = 0) out vec4 out_color;\n" in initFrameBufferPrograms()
966 "\n" in initFrameBufferPrograms()
967 "void main (void)\n" in initFrameBufferPrograms()
968 "{\n" in initFrameBufferPrograms()
969 " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" in initFrameBufferPrograms()
970 " out_color = in_color[0];\n" in initFrameBufferPrograms()
971 "}\n"; in initFrameBufferPrograms()
975 "; SPIR-V\n" in initFrameBufferPrograms()
976 "; Version: 1.3\n" in initFrameBufferPrograms()
977 "; Generator: Khronos Glslang Reference Front End; 2\n" in initFrameBufferPrograms()
978 "; Bound: 44\n" in initFrameBufferPrograms()
979 "; Schema: 0\n" in initFrameBufferPrograms()
980 "OpCapability Tessellation\n" in initFrameBufferPrograms()
981 "%1 = OpExtInstImport \"GLSL.std.450\"\n" in initFrameBufferPrograms()
982 "OpMemoryModel Logical GLSL450\n" in initFrameBufferPrograms()
983 "OpEntryPoint TessellationEvaluation %4 \"main\" %13 %20 %29 %38 %41\n" in initFrameBufferPrograms()
984 "OpExecutionMode %4 Isolines\n" in initFrameBufferPrograms()
985 "OpExecutionMode %4 SpacingEqual\n" in initFrameBufferPrograms()
986 "OpExecutionMode %4 VertexOrderCcw\n" in initFrameBufferPrograms()
987 "OpMemberDecorate %11 0 BuiltIn Position\n" in initFrameBufferPrograms()
988 "OpMemberDecorate %11 1 BuiltIn PointSize\n" in initFrameBufferPrograms()
989 "OpMemberDecorate %11 2 BuiltIn ClipDistance\n" in initFrameBufferPrograms()
990 "OpMemberDecorate %11 3 BuiltIn CullDistance\n" in initFrameBufferPrograms()
991 "OpDecorate %11 Block\n" in initFrameBufferPrograms()
992 "OpMemberDecorate %16 0 BuiltIn Position\n" in initFrameBufferPrograms()
993 "OpMemberDecorate %16 1 BuiltIn PointSize\n" in initFrameBufferPrograms()
994 "OpMemberDecorate %16 2 BuiltIn ClipDistance\n" in initFrameBufferPrograms()
995 "OpMemberDecorate %16 3 BuiltIn CullDistance\n" in initFrameBufferPrograms()
996 "OpDecorate %16 Block\n" in initFrameBufferPrograms()
997 "OpDecorate %29 BuiltIn TessCoord\n" in initFrameBufferPrograms()
998 "OpDecorate %38 Location 0\n" in initFrameBufferPrograms()
999 "OpDecorate %41 Location 0\n" in initFrameBufferPrograms()
1000 "%2 = OpTypeVoid\n" in initFrameBufferPrograms()
1001 "%3 = OpTypeFunction %2\n" in initFrameBufferPrograms()
1002 "%6 = OpTypeFloat 32\n" in initFrameBufferPrograms()
1003 "%7 = OpTypeVector %6 4\n" in initFrameBufferPrograms()
1004 "%8 = OpTypeInt 32 0\n" in initFrameBufferPrograms()
1005 "%9 = OpConstant %8 1\n" in initFrameBufferPrograms()
1006 "%10 = OpTypeArray %6 %9\n" in initFrameBufferPrograms()
1007 "%11 = OpTypeStruct %7 %6 %10 %10\n" in initFrameBufferPrograms()
1008 "%12 = OpTypePointer Output %11\n" in initFrameBufferPrograms()
1009 "%13 = OpVariable %12 Output\n" in initFrameBufferPrograms()
1010 "%14 = OpTypeInt 32 1\n" in initFrameBufferPrograms()
1011 "%15 = OpConstant %14 0\n" in initFrameBufferPrograms()
1012 "%16 = OpTypeStruct %7 %6 %10 %10\n" in initFrameBufferPrograms()
1013 "%17 = OpConstant %8 32\n" in initFrameBufferPrograms()
1014 "%18 = OpTypeArray %16 %17\n" in initFrameBufferPrograms()
1015 "%19 = OpTypePointer Input %18\n" in initFrameBufferPrograms()
1016 "%20 = OpVariable %19 Input\n" in initFrameBufferPrograms()
1017 "%21 = OpTypePointer Input %7\n" in initFrameBufferPrograms()
1018 "%24 = OpConstant %14 1\n" in initFrameBufferPrograms()
1019 "%27 = OpTypeVector %6 3\n" in initFrameBufferPrograms()
1020 "%28 = OpTypePointer Input %27\n" in initFrameBufferPrograms()
1021 "%29 = OpVariable %28 Input\n" in initFrameBufferPrograms()
1022 "%30 = OpConstant %8 0\n" in initFrameBufferPrograms()
1023 "%31 = OpTypePointer Input %6\n" in initFrameBufferPrograms()
1024 "%36 = OpTypePointer Output %7\n" in initFrameBufferPrograms()
1025 "%38 = OpVariable %36 Output\n" in initFrameBufferPrograms()
1026 "%39 = OpTypeArray %7 %17\n" in initFrameBufferPrograms()
1027 "%40 = OpTypePointer Input %39\n" in initFrameBufferPrograms()
1028 "%41 = OpVariable %40 Input\n" in initFrameBufferPrograms()
1029 "%4 = OpFunction %2 None %3\n" in initFrameBufferPrograms()
1030 "%5 = OpLabel\n" in initFrameBufferPrograms()
1031 "%22 = OpAccessChain %21 %20 %15 %15\n" in initFrameBufferPrograms()
1032 "%23 = OpLoad %7 %22\n" in initFrameBufferPrograms()
1033 "%25 = OpAccessChain %21 %20 %24 %15\n" in initFrameBufferPrograms()
1034 "%26 = OpLoad %7 %25\n" in initFrameBufferPrograms()
1035 "%32 = OpAccessChain %31 %29 %30\n" in initFrameBufferPrograms()
1036 "%33 = OpLoad %6 %32\n" in initFrameBufferPrograms()
1037 "%34 = OpCompositeConstruct %7 %33 %33 %33 %33\n" in initFrameBufferPrograms()
1038 "%35 = OpExtInst %7 %1 FMix %23 %26 %34\n" in initFrameBufferPrograms()
1039 "%37 = OpAccessChain %36 %13 %15\n" in initFrameBufferPrograms()
1040 "OpStore %37 %35\n" in initFrameBufferPrograms()
1041 "%42 = OpAccessChain %21 %41 %15\n" in initFrameBufferPrograms()
1042 "%43 = OpLoad %7 %42\n" in initFrameBufferPrograms()
1043 "OpStore %38 %43\n" in initFrameBufferPrograms()
1044 "OpReturn\n" in initFrameBufferPrograms()
1045 "OpFunctionEnd\n"; in initFrameBufferPrograms()
1056 …L_BIT == caseDef.shaderStage) ? "out_color[gl_InvocationID].b = 1.0f;\n" : "out_color.b = 1.0f;\n"; in initFrameBufferPrograms()
1066 bdy << " tempResult2 = tempBuffer[id];\n" in initFrameBufferPrograms()
1067 << " if (subgroupElect())\n" in initFrameBufferPrograms()
1068 << " {\n" in initFrameBufferPrograms()
1069 << " tempResult = value;\n" in initFrameBufferPrograms()
1071 << " }\n" in initFrameBufferPrograms()
1072 << " else\n" in initFrameBufferPrograms()
1073 << " {\n" in initFrameBufferPrograms()
1074 << " tempResult = tempBuffer[id];\n" in initFrameBufferPrograms()
1075 << " }\n" in initFrameBufferPrograms()
1076 << " " << getOpTypeName(caseDef.opType) << "();\n"; in initFrameBufferPrograms()
1080 bdy <<"tempResult2 = imageLoad(tempImage, ivec2(id, 0)).x;\n" in initFrameBufferPrograms()
1081 << " if (subgroupElect())\n" in initFrameBufferPrograms()
1082 << " {\n" in initFrameBufferPrograms()
1083 << " tempResult = value;\n" in initFrameBufferPrograms()
1085 << " }\n" in initFrameBufferPrograms()
1086 << " else\n" in initFrameBufferPrograms()
1087 << " {\n" in initFrameBufferPrograms()
1088 << " tempResult = imageLoad(tempImage, ivec2(id, 0)).x;\n" in initFrameBufferPrograms()
1089 << " }\n" in initFrameBufferPrograms()
1090 << " subgroupMemoryBarrierImage();\n"; in initFrameBufferPrograms()
1098 fragment << glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_450)<<"\n" in initFrameBufferPrograms()
1099 << "#extension GL_KHR_shader_subgroup_basic: enable\n" in initFrameBufferPrograms()
1100 << "#extension GL_KHR_shader_subgroup_ballot: enable\n" in initFrameBufferPrograms()
1101 << "layout(location = 0) out vec4 out_color;\n" in initFrameBufferPrograms()
1102 << "\n" in initFrameBufferPrograms()
1103 << "layout(set = 0, binding = 0) uniform Buffer1\n" in initFrameBufferPrograms()
1104 << "{\n" in initFrameBufferPrograms()
1105 << " uint tempBuffer["<<SHADER_BUFFER_SIZE/4ull<<"];\n" in initFrameBufferPrograms()
1106 << "};\n" in initFrameBufferPrograms()
1107 << "\n" in initFrameBufferPrograms()
1108 << "layout(set = 0, binding = 1) uniform Buffer2\n" in initFrameBufferPrograms()
1109 << "{\n" in initFrameBufferPrograms()
1110 << " uint value;\n" in initFrameBufferPrograms()
1111 << "};\n" in initFrameBufferPrograms()
1112 …opType ? "layout(set = 0, binding = 2, r32ui) readonly uniform highp uimage2D tempImage;\n" : "\n") in initFrameBufferPrograms()
1113 << "void main (void)\n" in initFrameBufferPrograms()
1114 << "{\n" in initFrameBufferPrograms()
1115 << " if (gl_HelperInvocation) return;\n" in initFrameBufferPrograms()
1116 << " uint id = 0;\n" in initFrameBufferPrograms()
1117 << " if (subgroupElect())\n" in initFrameBufferPrograms()
1118 << " {\n" in initFrameBufferPrograms()
1119 << " id = uint(gl_FragCoord.x);\n" in initFrameBufferPrograms()
1120 << " }\n" in initFrameBufferPrograms()
1121 << " id = subgroupBroadcastFirst(id);\n" in initFrameBufferPrograms()
1122 << " uint localId = id;\n" in initFrameBufferPrograms()
1123 << " uint tempResult = 0u;\n" in initFrameBufferPrograms()
1124 << " uint tempResult2 = 0u;\n" in initFrameBufferPrograms()
1125 << " out_color.b = 0.0f;\n" in initFrameBufferPrograms()
1127 << " out_color.r = float(tempResult);\n" in initFrameBufferPrograms()
1128 << " out_color.g = float(value);\n" in initFrameBufferPrograms()
1129 << " out_color.a = float(tempResult2);\n" in initFrameBufferPrograms()
1130 << "}\n"; in initFrameBufferPrograms()
1137 vertex << glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_450)<<"\n" in initFrameBufferPrograms()
1138 << "#extension GL_KHR_shader_subgroup_basic: enable\n" in initFrameBufferPrograms()
1139 << "#extension GL_KHR_shader_subgroup_ballot: enable\n" in initFrameBufferPrograms()
1140 <<"\n" in initFrameBufferPrograms()
1141 << "layout(location = 0) out vec4 out_color;\n" in initFrameBufferPrograms()
1142 << "layout(location = 0) in highp vec4 in_position;\n" in initFrameBufferPrograms()
1143 << "\n" in initFrameBufferPrograms()
1144 << "layout(set = 0, binding = 0) uniform Buffer1\n" in initFrameBufferPrograms()
1145 << "{\n" in initFrameBufferPrograms()
1146 << " uint tempBuffer["<<SHADER_BUFFER_SIZE/4ull<<"];\n" in initFrameBufferPrograms()
1147 << "};\n" in initFrameBufferPrograms()
1148 << "\n" in initFrameBufferPrograms()
1149 << "layout(set = 0, binding = 1) uniform Buffer2\n" in initFrameBufferPrograms()
1150 << "{\n" in initFrameBufferPrograms()
1151 << " uint value;\n" in initFrameBufferPrograms()
1152 << "};\n" in initFrameBufferPrograms()
1153 …opType ? "layout(set = 0, binding = 2, r32ui) readonly uniform highp uimage2D tempImage;\n" : "\n") in initFrameBufferPrograms()
1154 << "void main (void)\n" in initFrameBufferPrograms()
1155 << "{\n" in initFrameBufferPrograms()
1156 << " uint id = 0;\n" in initFrameBufferPrograms()
1157 << " if (subgroupElect())\n" in initFrameBufferPrograms()
1158 << " {\n" in initFrameBufferPrograms()
1159 << " id = gl_VertexIndex;\n" in initFrameBufferPrograms()
1160 << " }\n" in initFrameBufferPrograms()
1161 << " id = subgroupBroadcastFirst(id);\n" in initFrameBufferPrograms()
1162 << " uint tempResult = 0u;\n" in initFrameBufferPrograms()
1163 << " uint tempResult2 = 0u;\n" in initFrameBufferPrograms()
1164 << " out_color.b = 0.0f;\n" in initFrameBufferPrograms()
1166 << " out_color.r = float(tempResult);\n" in initFrameBufferPrograms()
1167 << " out_color.g = float(value);\n" in initFrameBufferPrograms()
1168 << " out_color.a = float(tempResult2);\n" in initFrameBufferPrograms()
1169 << " gl_Position = in_position;\n" in initFrameBufferPrograms()
1170 << " gl_PointSize = 1.0f;\n" in initFrameBufferPrograms()
1171 << "}\n"; in initFrameBufferPrograms()
1179 geometry << "#version 450\n" in initFrameBufferPrograms()
1180 << "#extension GL_KHR_shader_subgroup_ballot: enable\n" in initFrameBufferPrograms()
1181 << "#extension GL_KHR_shader_subgroup_basic: enable\n" in initFrameBufferPrograms()
1182 << "layout(points) in;\n" in initFrameBufferPrograms()
1183 << "layout(points, max_vertices = 1) out;\n" in initFrameBufferPrograms()
1184 << "layout(location = 0) out vec4 out_color;\n" in initFrameBufferPrograms()
1185 << "layout(set = 0, binding = 0) uniform Buffer1\n" in initFrameBufferPrograms()
1186 << "{\n" in initFrameBufferPrograms()
1187 << " uint tempBuffer["<<SHADER_BUFFER_SIZE/4ull<<"];\n" in initFrameBufferPrograms()
1188 << "};\n" in initFrameBufferPrograms()
1189 << "\n" in initFrameBufferPrograms()
1190 << "layout(set = 0, binding = 1) uniform Buffer2\n" in initFrameBufferPrograms()
1191 << "{\n" in initFrameBufferPrograms()
1192 << " uint value;\n" in initFrameBufferPrograms()
1193 << "};\n" in initFrameBufferPrograms()
1194 …opType ? "layout(set = 0, binding = 2, r32ui) readonly uniform highp uimage2D tempImage;\n" : "\n") in initFrameBufferPrograms()
1195 << "void main (void)\n" in initFrameBufferPrograms()
1196 << "{\n" in initFrameBufferPrograms()
1197 << " uint id = 0;\n" in initFrameBufferPrograms()
1198 << " if (subgroupElect())\n" in initFrameBufferPrograms()
1199 << " {\n" in initFrameBufferPrograms()
1200 << " id = gl_InvocationID;\n" in initFrameBufferPrograms()
1201 << " }\n" in initFrameBufferPrograms()
1202 << " id = subgroupBroadcastFirst(id);\n" in initFrameBufferPrograms()
1203 << " uint tempResult = 0u;\n" in initFrameBufferPrograms()
1204 << " uint tempResult2 = 0u;\n" in initFrameBufferPrograms()
1205 << " out_color.b = 0.0f;\n" in initFrameBufferPrograms()
1207 << " out_color.r = float(tempResult);\n" in initFrameBufferPrograms()
1208 << " out_color.g = float(value);\n" in initFrameBufferPrograms()
1209 << " out_color.a = float(tempResult2);\n" in initFrameBufferPrograms()
1210 << " gl_Position = gl_in[0].gl_Position;\n" in initFrameBufferPrograms()
1211 << " EmitVertex();\n" in initFrameBufferPrograms()
1212 << " EndPrimitive();\n" in initFrameBufferPrograms()
1213 << "}\n"; in initFrameBufferPrograms()
1223 controlSource << glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_450)<<"\n" in initFrameBufferPrograms()
1224 << "#extension GL_EXT_tessellation_shader : require\n" in initFrameBufferPrograms()
1225 << "layout(vertices = 2) out;\n" in initFrameBufferPrograms()
1226 << "void main (void)\n" in initFrameBufferPrograms()
1227 << "{\n" in initFrameBufferPrograms()
1228 << " if (gl_InvocationID == 0)\n" in initFrameBufferPrograms()
1229 <<" {\n" in initFrameBufferPrograms()
1230 << " gl_TessLevelOuter[0] = 1.0f;\n" in initFrameBufferPrograms()
1231 << " gl_TessLevelOuter[1] = 1.0f;\n" in initFrameBufferPrograms()
1232 << " }\n" in initFrameBufferPrograms()
1233 << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" in initFrameBufferPrograms()
1234 << "}\n"; in initFrameBufferPrograms()
1236 evaluationSource << glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_450)<<"\n" in initFrameBufferPrograms()
1237 << "#extension GL_KHR_shader_subgroup_basic: enable\n" in initFrameBufferPrograms()
1238 << "#extension GL_KHR_shader_subgroup_ballot: enable\n" in initFrameBufferPrograms()
1239 << "#extension GL_EXT_tessellation_shader : require\n" in initFrameBufferPrograms()
1240 << "layout(isolines, equal_spacing, ccw ) in;\n" in initFrameBufferPrograms()
1241 << "layout(location = 0) out vec4 out_color;\n" in initFrameBufferPrograms()
1242 << "layout(set = 0, binding = 0) uniform Buffer1\n" in initFrameBufferPrograms()
1243 << "{\n" in initFrameBufferPrograms()
1244 << " uint tempBuffer["<<SHADER_BUFFER_SIZE/4ull<<"];\n" in initFrameBufferPrograms()
1245 << "};\n" in initFrameBufferPrograms()
1246 << "\n" in initFrameBufferPrograms()
1247 << "layout(set = 0, binding = 1) uniform Buffer2\n" in initFrameBufferPrograms()
1248 << "{\n" in initFrameBufferPrograms()
1249 << " uint value;\n" in initFrameBufferPrograms()
1250 << "};\n" in initFrameBufferPrograms()
1251 …opType ? "layout(set = 0, binding = 2, r32ui) readonly uniform highp uimage2D tempImage;\n" : "\n") in initFrameBufferPrograms()
1252 << "void main (void)\n" in initFrameBufferPrograms()
1253 << "{\n" in initFrameBufferPrograms()
1254 << " uint id = 0;\n" in initFrameBufferPrograms()
1255 << " if (subgroupElect())\n" in initFrameBufferPrograms()
1256 << " {\n" in initFrameBufferPrograms()
1257 << " id = gl_PrimitiveID;\n" in initFrameBufferPrograms()
1258 << " }\n" in initFrameBufferPrograms()
1259 << " id = subgroupBroadcastFirst(id);\n" in initFrameBufferPrograms()
1260 << " uint tempResult = 0u;\n" in initFrameBufferPrograms()
1261 << " uint tempResult2 = 0u;\n" in initFrameBufferPrograms()
1262 << " out_color.b = 0.0f;\n" in initFrameBufferPrograms()
1264 << " out_color.r = float(tempResult);\n" in initFrameBufferPrograms()
1265 << " out_color.g = float(value);\n" in initFrameBufferPrograms()
1266 << " out_color.a = float(tempResult2);\n" in initFrameBufferPrograms()
1267 << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" in initFrameBufferPrograms()
1268 << "}\n"; in initFrameBufferPrograms()
1280 controlSource << glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_450)<<"\n" in initFrameBufferPrograms()
1281 << "#extension GL_KHR_shader_subgroup_basic: enable\n" in initFrameBufferPrograms()
1282 << "#extension GL_KHR_shader_subgroup_ballot: enable\n" in initFrameBufferPrograms()
1283 << "#extension GL_EXT_tessellation_shader : require\n" in initFrameBufferPrograms()
1284 << "layout(vertices = 2) out;\n" in initFrameBufferPrograms()
1285 << "layout(location = 0) out vec4 out_color[];\n" in initFrameBufferPrograms()
1286 << "layout(set = 0, binding = 0) uniform Buffer1\n" in initFrameBufferPrograms()
1287 << "{\n" in initFrameBufferPrograms()
1288 << " uint tempBuffer["<<SHADER_BUFFER_SIZE/4ull<<"];\n" in initFrameBufferPrograms()
1289 << "};\n" in initFrameBufferPrograms()
1290 << "\n" in initFrameBufferPrograms()
1291 << "layout(set = 0, binding = 1) uniform Buffer2\n" in initFrameBufferPrograms()
1292 << "{\n" in initFrameBufferPrograms()
1293 << " uint value;\n" in initFrameBufferPrograms()
1294 << "};\n" in initFrameBufferPrograms()
1295 …opType ? "layout(set = 0, binding = 2, r32ui) readonly uniform highp uimage2D tempImage;\n" : "\n") in initFrameBufferPrograms()
1296 << "void main (void)\n" in initFrameBufferPrograms()
1297 << "{\n" in initFrameBufferPrograms()
1298 << " uint id = 0;\n" in initFrameBufferPrograms()
1299 << " if (gl_InvocationID == 0)\n" in initFrameBufferPrograms()
1300 <<" {\n" in initFrameBufferPrograms()
1301 << " gl_TessLevelOuter[0] = 1.0f;\n" in initFrameBufferPrograms()
1302 << " gl_TessLevelOuter[1] = 1.0f;\n" in initFrameBufferPrograms()
1303 << " }\n" in initFrameBufferPrograms()
1304 << " if (subgroupElect())\n" in initFrameBufferPrograms()
1305 << " {\n" in initFrameBufferPrograms()
1306 << " id = gl_InvocationID;\n" in initFrameBufferPrograms()
1307 << " }\n" in initFrameBufferPrograms()
1308 << " id = subgroupBroadcastFirst(id);\n" in initFrameBufferPrograms()
1309 << " uint tempResult = 0u;\n" in initFrameBufferPrograms()
1310 << " uint tempResult2 = 0u;\n" in initFrameBufferPrograms()
1311 << " out_color[gl_InvocationID].b = 0.0f;\n" in initFrameBufferPrograms()
1313 << " out_color[gl_InvocationID].r = float(tempResult);\n" in initFrameBufferPrograms()
1314 << " out_color[gl_InvocationID].g = float(value);\n" in initFrameBufferPrograms()
1315 << " out_color[gl_InvocationID].a = float(tempResult2);\n" in initFrameBufferPrograms()
1316 << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" in initFrameBufferPrograms()
1317 << "}\n"; in initFrameBufferPrograms()
1319 evaluationSource << glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_450)<<"\n" in initFrameBufferPrograms()
1320 << "#extension GL_KHR_shader_subgroup_ballot: enable\n" in initFrameBufferPrograms()
1321 << "#extension GL_EXT_tessellation_shader : require\n" in initFrameBufferPrograms()
1322 << "layout(isolines, equal_spacing, ccw ) in;\n" in initFrameBufferPrograms()
1323 << "layout(location = 0) in vec4 in_color[];\n" in initFrameBufferPrograms()
1324 << "layout(location = 0) out vec4 out_color;\n" in initFrameBufferPrograms()
1325 << "\n" in initFrameBufferPrograms()
1326 << "void main (void)\n" in initFrameBufferPrograms()
1327 << "{\n" in initFrameBufferPrograms()
1328 << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" in initFrameBufferPrograms()
1329 << " out_color = in_color[0];\n" in initFrameBufferPrograms()
1330 << "}\n"; in initFrameBufferPrograms()
1352 src << "#version 450\n" in initPrograms()
1353 << "#extension GL_KHR_shader_subgroup_basic: enable\n" in initPrograms()
1355 "local_size_z_id = 2) in;\n" in initPrograms()
1356 << "layout(set = 0, binding = 0, std430) buffer Buffer1\n" in initPrograms()
1357 << "{\n" in initPrograms()
1358 << " uint result[];\n" in initPrograms()
1359 << "};\n" in initPrograms()
1360 << "\n" in initPrograms()
1362 << "void main (void)\n" in initPrograms()
1363 << "{\n" in initPrograms()
1364 << " uvec3 globalSize = gl_NumWorkGroups * gl_WorkGroupSize;\n" in initPrograms()
1367 "gl_GlobalInvocationID.x;\n" in initPrograms()
1368 << " uint value = " << UNELECTED_VALUE << ";\n" in initPrograms()
1369 << " if (subgroupElect())\n" in initPrograms()
1370 << " {\n" in initPrograms()
1371 << " value = " << ELECTED_VALUE << ";\n" in initPrograms()
1372 << " }\n" in initPrograms()
1373 << " uvec4 bits = bitCount(sharedMemoryBallot(value == " << ELECTED_VALUE << "));\n" in initPrograms()
1374 << " result[offset] = bits.x + bits.y + bits.z + bits.w;\n" in initPrograms()
1375 << "}\n"; in initPrograms()
1384 vertex << "#version 450\n" in initPrograms()
1385 << "#extension GL_KHR_shader_subgroup_basic: enable\n" in initPrograms()
1386 << "layout(set = 0, binding = 0, std430) buffer Buffer1\n" in initPrograms()
1387 << "{\n" in initPrograms()
1388 << " uint result[];\n" in initPrograms()
1389 << "};\n" in initPrograms()
1390 << "layout(set = 0, binding = 4, std430) buffer Buffer2\n" in initPrograms()
1391 << "{\n" in initPrograms()
1392 << " uint numSubgroupsExecuted;\n" in initPrograms()
1393 << "};\n" in initPrograms()
1394 << "\n" in initPrograms()
1395 << "void main (void)\n" in initPrograms()
1396 << "{\n" in initPrograms()
1397 << " if (subgroupElect())\n" in initPrograms()
1398 << " {\n" in initPrograms()
1399 << " result[gl_VertexIndex] = " << ELECTED_VALUE << ";\n" in initPrograms()
1400 << " atomicAdd(numSubgroupsExecuted, 1);\n" in initPrograms()
1401 << " }\n" in initPrograms()
1402 << " else\n" in initPrograms()
1403 << " {\n" in initPrograms()
1404 << " result[gl_VertexIndex] = " << UNELECTED_VALUE << ";\n" in initPrograms()
1405 << " }\n" in initPrograms()
1406 << " float pixelSize = 2.0f/1024.0f;\n" in initPrograms()
1407 << " float pixelPosition = pixelSize/2.0f - 1.0f;\n" in initPrograms()
1408 … << " gl_Position = vec4(float(gl_VertexIndex) * pixelSize + pixelPosition, 0.0f, 0.0f, 1.0f);\n" in initPrograms()
1409 << " gl_PointSize = 1.0f;\n" in initPrograms()
1410 << "}\n"; in initPrograms()
1417 tesc << "#version 450\n" in initPrograms()
1418 << "#extension GL_KHR_shader_subgroup_basic: enable\n" in initPrograms()
1419 << "layout(vertices=1) out;\n" in initPrograms()
1420 << "layout(set = 0, binding = 1, std430) buffer Buffer1\n" in initPrograms()
1421 << "{\n" in initPrograms()
1422 << " uint result[];\n" in initPrograms()
1423 << "};\n" in initPrograms()
1424 << "layout(set = 0, binding = 5, std430) buffer Buffer2\n" in initPrograms()
1425 << "{\n" in initPrograms()
1426 << " uint numSubgroupsExecuted;\n" in initPrograms()
1427 << "};\n" in initPrograms()
1428 << "\n" in initPrograms()
1429 << "void main (void)\n" in initPrograms()
1430 << "{\n" in initPrograms()
1431 << " if (subgroupElect())\n" in initPrograms()
1432 << " {\n" in initPrograms()
1433 << " result[gl_PrimitiveID] = " << ELECTED_VALUE << ";\n" in initPrograms()
1434 << " atomicAdd(numSubgroupsExecuted, 1);\n" in initPrograms()
1435 << " }\n" in initPrograms()
1436 << " else\n" in initPrograms()
1437 << " {\n" in initPrograms()
1438 << " result[gl_PrimitiveID] = " << UNELECTED_VALUE << ";\n" in initPrograms()
1439 << " }\n" in initPrograms()
1440 << " if (gl_InvocationID == 0)\n" in initPrograms()
1441 << " {\n" in initPrograms()
1442 << " gl_TessLevelOuter[0] = 1.0f;\n" in initPrograms()
1443 << " gl_TessLevelOuter[1] = 1.0f;\n" in initPrograms()
1444 << " }\n" in initPrograms()
1445 << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" in initPrograms()
1446 << "}\n"; in initPrograms()
1453 tese << "#version 450\n" in initPrograms()
1454 << "#extension GL_KHR_shader_subgroup_basic: enable\n" in initPrograms()
1455 << "layout(isolines) in;\n" in initPrograms()
1456 << "layout(set = 0, binding = 2, std430) buffer Buffer1\n" in initPrograms()
1457 << "{\n" in initPrograms()
1458 << " uint result[];\n" in initPrograms()
1459 << "};\n" in initPrograms()
1460 << "layout(set = 0, binding = 6, std430) buffer Buffer2\n" in initPrograms()
1461 << "{\n" in initPrograms()
1462 << " uint numSubgroupsExecuted;\n" in initPrograms()
1463 << "};\n" in initPrograms()
1464 << "\n" in initPrograms()
1465 << "void main (void)\n" in initPrograms()
1466 << "{\n" in initPrograms()
1467 << " if (subgroupElect())\n" in initPrograms()
1468 << " {\n" in initPrograms()
1469 << " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = " << ELECTED_VALUE << ";\n" in initPrograms()
1470 << " atomicAdd(numSubgroupsExecuted, 1);\n" in initPrograms()
1471 << " }\n" in initPrograms()
1472 << " else\n" in initPrograms()
1473 << " {\n" in initPrograms()
1474 … << " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = " << UNELECTED_VALUE << ";\n" in initPrograms()
1475 << " }\n" in initPrograms()
1476 << " float pixelSize = 2.0f/1024.0f;\n" in initPrograms()
1477 << " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" in initPrograms()
1478 << "}\n"; in initPrograms()
1485 geometry << "#version 450\n" in initPrograms()
1486 << "#extension GL_KHR_shader_subgroup_basic: enable\n" in initPrograms()
1487 << "layout(${TOPOLOGY}) in;\n" in initPrograms()
1488 << "layout(points, max_vertices = 1) out;\n" in initPrograms()
1489 << "layout(set = 0, binding = 3, std430) buffer Buffer1\n" in initPrograms()
1490 << "{\n" in initPrograms()
1491 << " uint result[];\n" in initPrograms()
1492 << "};\n" in initPrograms()
1493 << "layout(set = 0, binding = 7, std430) buffer Buffer2\n" in initPrograms()
1494 << "{\n" in initPrograms()
1495 << " uint numSubgroupsExecuted;\n" in initPrograms()
1496 << "};\n" in initPrograms()
1497 << "\n" in initPrograms()
1498 << "void main (void)\n" in initPrograms()
1499 << "{\n" in initPrograms()
1500 << " if (subgroupElect())\n" in initPrograms()
1501 << " {\n" in initPrograms()
1502 << " result[gl_PrimitiveIDIn] = " << ELECTED_VALUE << ";\n" in initPrograms()
1503 << " atomicAdd(numSubgroupsExecuted, 1);\n" in initPrograms()
1504 << " }\n" in initPrograms()
1505 << " else\n" in initPrograms()
1506 << " {\n" in initPrograms()
1507 << " result[gl_PrimitiveIDIn] = " << UNELECTED_VALUE << ";\n" in initPrograms()
1508 << " }\n" in initPrograms()
1509 << " gl_Position = gl_in[0].gl_Position;\n" in initPrograms()
1510 << " EmitVertex();\n" in initPrograms()
1511 << " EndPrimitive();\n" in initPrograms()
1512 << "}\n"; in initPrograms()
1519 fragment << "#version 450\n" in initPrograms()
1520 << "#extension GL_KHR_shader_subgroup_basic: enable\n" in initPrograms()
1521 << "layout(location = 0) out uint data;\n" in initPrograms()
1522 << "layout(set = 0, binding = 8, std430) buffer Buffer\n" in initPrograms()
1523 << "{\n" in initPrograms()
1524 << " uint numSubgroupsExecuted;\n" in initPrograms()
1525 << "};\n" in initPrograms()
1526 << "void main (void)\n" in initPrograms()
1527 << "{\n" in initPrograms()
1528 << " if (gl_HelperInvocation) return;\n" in initPrograms()
1529 << " if (subgroupElect())\n" in initPrograms()
1530 << " {\n" in initPrograms()
1531 << " data = " << ELECTED_VALUE << ";\n" in initPrograms()
1532 << " atomicAdd(numSubgroupsExecuted, 1);\n" in initPrograms()
1533 << " }\n" in initPrograms()
1534 << " else\n" in initPrograms()
1535 << " {\n" in initPrograms()
1536 << " data = " << UNELECTED_VALUE << ";\n" in initPrograms()
1537 << " }\n" in initPrograms()
1538 << "}\n"; in initPrograms()
1557 bdy << " if (subgroupElect())\n" in initPrograms()
1558 << " {\n" in initPrograms()
1559 << " tempBuffer[id] = value;\n" in initPrograms()
1560 << " }\n" in initPrograms()
1561 << " " << getOpTypeName(caseDef.opType) << "();\n" in initPrograms()
1562 << " tempResult = tempBuffer[id];\n"; in initPrograms()
1565 bdy << " if (subgroupElect())\n" in initPrograms()
1566 << " {\n" in initPrograms()
1567 << " tempShared[localId] = value;\n" in initPrograms()
1568 << " }\n" in initPrograms()
1569 << " subgroupMemoryBarrierShared();\n" in initPrograms()
1570 << " tempResult = tempShared[localId];\n"; in initPrograms()
1573 bdy << " if (subgroupElect())\n" in initPrograms()
1574 << " {\n" in initPrograms()
1575 << " imageStore(tempImage, ivec2(id, 0), ivec4(value));\n" in initPrograms()
1576 << " }\n" in initPrograms()
1577 << " subgroupMemoryBarrierImage();\n" in initPrograms()
1578 << " tempResult = imageLoad(tempImage, ivec2(id, 0)).x;\n"; in initPrograms()
1586 src << "#version 450\n" in initPrograms()
1587 << "#extension GL_KHR_shader_subgroup_basic: enable\n" in initPrograms()
1589 "local_size_z_id = 2) in;\n" in initPrograms()
1590 << "layout(set = 0, binding = 0, std430) buffer Buffer1\n" in initPrograms()
1591 << "{\n" in initPrograms()
1592 << " uint result[];\n" in initPrograms()
1593 << "};\n" in initPrograms()
1594 << "layout(set = 0, binding = 1, std430) buffer Buffer2\n" in initPrograms()
1595 << "{\n" in initPrograms()
1596 << " uint tempBuffer[];\n" in initPrograms()
1597 << "};\n" in initPrograms()
1598 << "layout(set = 0, binding = 2, std430) buffer Buffer3\n" in initPrograms()
1599 << "{\n" in initPrograms()
1600 << " uint value;\n" in initPrograms()
1601 << "};\n" in initPrograms()
1602 << "layout(set = 0, binding = 3, r32ui) uniform uimage2D tempImage;\n" in initPrograms()
1603 << "shared uint tempShared[gl_WorkGroupSize.x * gl_WorkGroupSize.y * gl_WorkGroupSize.z];\n" in initPrograms()
1604 << "\n" in initPrograms()
1605 << "void main (void)\n" in initPrograms()
1606 << "{\n" in initPrograms()
1607 << " uvec3 globalSize = gl_NumWorkGroups * gl_WorkGroupSize;\n" in initPrograms()
1610 "gl_GlobalInvocationID.x;\n" in initPrograms()
1611 << " uint localId = gl_SubgroupID;\n" in initPrograms()
1614 "gl_WorkGroupID.x + localId;\n" in initPrograms()
1615 << " uint tempResult = 0;\n" in initPrograms()
1617 << " result[offset] = tempResult;\n" in initPrograms()
1618 << "}\n"; in initPrograms()
1627 "#version 450\n" in initPrograms()
1628 "#extension GL_KHR_shader_subgroup_basic: enable\n" in initPrograms()
1629 "#extension GL_KHR_shader_subgroup_ballot: enable\n" in initPrograms()
1630 "layout(set = 0, binding = 0, std430) buffer Buffer1\n" in initPrograms()
1631 "{\n" in initPrograms()
1632 " uint result[];\n" in initPrograms()
1633 "};\n" in initPrograms()
1634 "layout(set = 0, binding = 4, std430) buffer Buffer2\n" in initPrograms()
1635 "{\n" in initPrograms()
1636 " uint tempBuffer[];\n" in initPrograms()
1637 "};\n" in initPrograms()
1638 "layout(set = 0, binding = 5, std430) buffer Buffer3\n" in initPrograms()
1639 "{\n" in initPrograms()
1640 " uint subgroupID;\n" in initPrograms()
1641 "};\n" in initPrograms()
1642 "layout(set = 0, binding = 6, std430) buffer Buffer4\n" in initPrograms()
1643 "{\n" in initPrograms()
1644 " uint value;\n" in initPrograms()
1645 "};\n" in initPrograms()
1646 "layout(set = 0, binding = 7, r32ui) uniform uimage2D tempImage;\n" in initPrograms()
1647 "void main (void)\n" in initPrograms()
1648 "{\n" in initPrograms()
1649 " uint id = 0;\n" in initPrograms()
1650 " if (subgroupElect())\n" in initPrograms()
1651 " {\n" in initPrograms()
1652 " id = atomicAdd(subgroupID, 1);\n" in initPrograms()
1653 " }\n" in initPrograms()
1654 " id = subgroupBroadcastFirst(id);\n" in initPrograms()
1655 " uint localId = id;\n" in initPrograms()
1656 " uint tempResult = 0;\n" in initPrograms()
1658 " result[gl_VertexIndex] = tempResult;\n" in initPrograms()
1659 " float pixelSize = 2.0f/1024.0f;\n" in initPrograms()
1660 " float pixelPosition = pixelSize/2.0f - 1.0f;\n" in initPrograms()
1661 " gl_Position = vec4(float(gl_VertexIndex) * pixelSize + pixelPosition, 0.0f, 0.0f, 1.0f);\n" in initPrograms()
1662 " gl_PointSize = 1.0f;\n" in initPrograms()
1663 "}\n"; in initPrograms()
1670 "#version 450\n" in initPrograms()
1671 "#extension GL_KHR_shader_subgroup_basic: enable\n" in initPrograms()
1672 "#extension GL_KHR_shader_subgroup_ballot: enable\n" in initPrograms()
1673 "layout(vertices=1) out;\n" in initPrograms()
1674 "layout(set = 0, binding = 1, std430) buffer Buffer1\n" in initPrograms()
1675 "{\n" in initPrograms()
1676 " uint result[];\n" in initPrograms()
1677 "};\n" in initPrograms()
1678 "layout(set = 0, binding = 8, std430) buffer Buffer2\n" in initPrograms()
1679 "{\n" in initPrograms()
1680 " uint tempBuffer[];\n" in initPrograms()
1681 "};\n" in initPrograms()
1682 "layout(set = 0, binding = 9, std430) buffer Buffer3\n" in initPrograms()
1683 "{\n" in initPrograms()
1684 " uint subgroupID;\n" in initPrograms()
1685 "};\n" in initPrograms()
1686 "layout(set = 0, binding = 10, std430) buffer Buffer4\n" in initPrograms()
1687 "{\n" in initPrograms()
1688 " uint value;\n" in initPrograms()
1689 "};\n" in initPrograms()
1690 "layout(set = 0, binding = 11, r32ui) uniform uimage2D tempImage;\n" in initPrograms()
1691 "void main (void)\n" in initPrograms()
1692 "{\n" in initPrograms()
1693 " uint id = 0;\n" in initPrograms()
1694 " if (subgroupElect())\n" in initPrograms()
1695 " {\n" in initPrograms()
1696 " id = atomicAdd(subgroupID, 1);\n" in initPrograms()
1697 " }\n" in initPrograms()
1698 " id = subgroupBroadcastFirst(id);\n" in initPrograms()
1699 " uint localId = id;\n" in initPrograms()
1700 " uint tempResult = 0;\n" in initPrograms()
1702 " result[gl_PrimitiveID] = tempResult;\n" in initPrograms()
1703 " if (gl_InvocationID == 0)\n" in initPrograms()
1704 " {\n" in initPrograms()
1705 " gl_TessLevelOuter[0] = 1.0f;\n" in initPrograms()
1706 " gl_TessLevelOuter[1] = 1.0f;\n" in initPrograms()
1707 " }\n" in initPrograms()
1708 " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" in initPrograms()
1709 "}\n"; in initPrograms()
1716 "#version 450\n" in initPrograms()
1717 "#extension GL_KHR_shader_subgroup_basic: enable\n" in initPrograms()
1718 "#extension GL_KHR_shader_subgroup_ballot: enable\n" in initPrograms()
1719 "layout(isolines) in;\n" in initPrograms()
1720 "layout(set = 0, binding = 2, std430) buffer Buffer1\n" in initPrograms()
1721 "{\n" in initPrograms()
1722 " uint result[];\n" in initPrograms()
1723 "};\n" in initPrograms()
1724 "layout(set = 0, binding = 12, std430) buffer Buffer2\n" in initPrograms()
1725 "{\n" in initPrograms()
1726 " uint tempBuffer[];\n" in initPrograms()
1727 "};\n" in initPrograms()
1728 "layout(set = 0, binding = 13, std430) buffer Buffer3\n" in initPrograms()
1729 "{\n" in initPrograms()
1730 " uint subgroupID;\n" in initPrograms()
1731 "};\n" in initPrograms()
1732 "layout(set = 0, binding = 14, std430) buffer Buffer4\n" in initPrograms()
1733 "{\n" in initPrograms()
1734 " uint value;\n" in initPrograms()
1735 "};\n" in initPrograms()
1736 "layout(set = 0, binding = 15, r32ui) uniform uimage2D tempImage;\n" in initPrograms()
1737 "void main (void)\n" in initPrograms()
1738 "{\n" in initPrograms()
1739 " uint id = 0;\n" in initPrograms()
1740 " if (subgroupElect())\n" in initPrograms()
1741 " {\n" in initPrograms()
1742 " id = atomicAdd(subgroupID, 1);\n" in initPrograms()
1743 " }\n" in initPrograms()
1744 " id = subgroupBroadcastFirst(id);\n" in initPrograms()
1745 " uint localId = id;\n" in initPrograms()
1746 " uint tempResult = 0;\n" in initPrograms()
1748 " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = tempResult;\n" in initPrograms()
1749 …" float pixelSize = 2.0f/1024.0f;\n"" gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixe… in initPrograms()
1750 "}\n"; in initPrograms()
1757 "#version 450\n" in initPrograms()
1758 "#extension GL_KHR_shader_subgroup_basic: enable\n" in initPrograms()
1759 "#extension GL_KHR_shader_subgroup_ballot: enable\n" in initPrograms()
1760 "layout(${TOPOLOGY}) in;\n" in initPrograms()
1761 "layout(points, max_vertices = 1) out;\n" in initPrograms()
1762 "layout(set = 0, binding = 3, std430) buffer Buffer1\n" in initPrograms()
1763 "{\n" in initPrograms()
1764 " uint result[];\n" in initPrograms()
1765 "};\n" in initPrograms()
1766 "layout(set = 0, binding = 16, std430) buffer Buffer2\n" in initPrograms()
1767 "{\n" in initPrograms()
1768 " uint tempBuffer[];\n" in initPrograms()
1769 "};\n" in initPrograms()
1770 "layout(set = 0, binding = 17, std430) buffer Buffer3\n" in initPrograms()
1771 "{\n" in initPrograms()
1772 " uint subgroupID;\n" in initPrograms()
1773 "};\n" in initPrograms()
1774 "layout(set = 0, binding = 18, std430) buffer Buffer4\n" in initPrograms()
1775 "{\n" in initPrograms()
1776 " uint value;\n" in initPrograms()
1777 "};\n" in initPrograms()
1778 "layout(set = 0, binding = 19, r32ui) uniform uimage2D tempImage;\n" in initPrograms()
1779 "void main (void)\n" in initPrograms()
1780 "{\n" in initPrograms()
1781 " uint id = 0;\n" in initPrograms()
1782 " if (subgroupElect())\n" in initPrograms()
1783 " {\n" in initPrograms()
1784 " id = atomicAdd(subgroupID, 1);\n" in initPrograms()
1785 " }\n" in initPrograms()
1786 " id = subgroupBroadcastFirst(id);\n" in initPrograms()
1787 " uint localId = id;\n" in initPrograms()
1788 " uint tempResult = 0;\n" in initPrograms()
1790 " result[gl_PrimitiveIDIn] = tempResult;\n" in initPrograms()
1791 " gl_Position = gl_in[0].gl_Position;\n" in initPrograms()
1792 " EmitVertex();\n" in initPrograms()
1793 " EndPrimitive();\n" in initPrograms()
1794 "}\n"; in initPrograms()
1801 "#version 450\n" in initPrograms()
1802 "#extension GL_KHR_shader_subgroup_basic: enable\n" in initPrograms()
1803 "#extension GL_KHR_shader_subgroup_ballot: enable\n" in initPrograms()
1804 "layout(location = 0) out uint result;\n" in initPrograms()
1805 "layout(set = 0, binding = 20, std430) buffer Buffer1\n" in initPrograms()
1806 "{\n" in initPrograms()
1807 " uint tempBuffer[];\n" in initPrograms()
1808 "};\n" in initPrograms()
1809 "layout(set = 0, binding = 21, std430) buffer Buffer2\n" in initPrograms()
1810 "{\n" in initPrograms()
1811 " uint subgroupID;\n" in initPrograms()
1812 "};\n" in initPrograms()
1813 "layout(set = 0, binding = 22, std430) buffer Buffer3\n" in initPrograms()
1814 "{\n" in initPrograms()
1815 " uint value;\n" in initPrograms()
1816 "};\n" in initPrograms()
1817 "layout(set = 0, binding = 23, r32ui) uniform uimage2D tempImage;\n" in initPrograms()
1818 "void main (void)\n" in initPrograms()
1819 "{\n" in initPrograms()
1820 " if (gl_HelperInvocation) return;\n" in initPrograms()
1821 " uint id = 0;\n" in initPrograms()
1822 " if (subgroupElect())\n" in initPrograms()
1823 " {\n" in initPrograms()
1824 " id = atomicAdd(subgroupID, 1);\n" in initPrograms()
1825 " }\n" in initPrograms()
1826 " id = subgroupBroadcastFirst(id);\n" in initPrograms()
1827 " uint localId = id;\n" in initPrograms()
1828 " uint tempResult = 0;\n" in initPrograms()
1830 " result = tempResult;\n" in initPrograms()
1831 "}\n"; in initPrograms()