summaryrefslogtreecommitdiff
path: root/chapters/pipelines.adoc
blob: 4529c6d94745129282df896134bc519577c25605 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
// Copyright 2015-2023 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

[[pipelines]]
= Pipelines

The following <<pipelines-block-diagram,figure>> shows a block diagram of
the Vulkan pipelines.
Some Vulkan commands specify geometric objects to be drawn or computational
work to be performed, while others specify state controlling how objects are
handled by the various pipeline stages, or control data transfer between
memory organized as images and buffers.
Commands are effectively sent through a processing pipeline, either a
_graphics pipeline_,
ifdef::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[]
a _ray tracing pipeline_,
endif::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[]
or a _compute pipeline_.

ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
The graphics pipeline can be operated in two modes, as either _primitive
shading_ or _mesh shading_ pipeline.

*Primitive Shading*

endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]

The first stage of the <<pipelines-graphics,graphics pipeline>>
(<<drawing,Input Assembler>>) assembles vertices to form geometric
primitives such as points, lines, and triangles, based on a requested
primitive topology.
In the next stage (<<shaders-vertex,Vertex Shader>>) vertices can: be
transformed, computing positions and attributes for each vertex.
If <<tessellation,tessellation>> and/or <<geometry,geometry>> shaders are
supported, they can: then generate multiple primitives from a single input
primitive, possibly changing the primitive topology or generating additional
attribute data in the process.

ifdef::VK_HUAWEI_cluster_culling_shader[]
*Cluster Culling Shading*

When using the Cluster Culling Shader, a compute-like shader will perform
cluster-based culling, a set of new built-in output variables are used to
express visible cluster, in addition, a new built-in function is used to
emit these variables from the cluster culling shader to the Input
Assembler(IA) stage, then IA can use these variables to fetches vertices of
visible cluster and drive vertex shader to work.

endif::VK_HUAWEI_cluster_culling_shader[]

ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
*Mesh Shading*

When using the <<mesh,_mesh shading_>> pipeline input primitives are not
assembled implicitly, but explicitly through the (<<shaders-mesh,Mesh
Shader>>).
The work on the mesh pipeline is initiated by the application
<<drawing-mesh-shading,drawing>> a set of mesh tasks.

If an optional (<<shaders-task,Task Shader>>) is active, each task triggers
the execution of a task shader workgroup that will generate a new set of
tasks upon completion.
Each of these spawned tasks, or each of the original dispatched tasks if no
task shader is present, triggers the execution of a mesh shader workgroup
that produces an output mesh with a variable-sized number of primitives
assembled from vertices stored in the output mesh.

*Common*
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]

The final resulting primitives are <<vertexpostproc-clipping,clipped>> to a
clip volume in preparation for the next stage, <<primsrast,Rasterization>>.
The rasterizer produces a series of _fragments_ associated with a region of
the framebuffer, from a two-dimensional description of a point, line
segment, or triangle.
These fragments are processed by <<fragops,fragment operations>> to
determine whether generated values will be written to the framebuffer.
<<fragops-shader, Fragment shading>> determines the values to be written to
the framebuffer attachments.
Framebuffer operations then read and write the color and depth/stencil
attachments of the framebuffer for a given subpass of a <<renderpass,render
pass instance>>.
The attachments can: be used as input attachments in the fragment shader in
a later subpass of the same render pass.

The <<pipelines-compute,compute pipeline>> is a separate pipeline from the
graphics pipeline, which operates on one-, two-, or three-dimensional
workgroups which can: read from and write to buffer and image memory.

This ordering is meant only as a tool for describing Vulkan, not as a strict
rule of how Vulkan is implemented, and we present it only as a means to
organize the various operations of the pipelines.
Actual ordering guarantees between pipeline stages are explained in detail
in the <<synchronization-pipeline-stages-order, synchronization chapter>>.

[[pipelines-block-diagram]]
ifndef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
image::{images}/pipeline.svg[title="Block diagram of the Vulkan pipeline",align="center",opts="{imageopts}"]
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
image::{images}/pipelinemesh.svg[title="Block diagram of the Vulkan pipeline",align="center",opts="{imageopts}"]
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]

Each pipeline is controlled by a monolithic object created from a
description of all of the shader stages and any relevant fixed-function
stages.
<<interfaces,Linking>> the whole pipeline together allows the optimization
of shaders based on their input/outputs and eliminates expensive draw time
state validation.

A pipeline object is bound to the current state using
flink:vkCmdBindPipeline.
Any pipeline object state that is specified as <<pipelines-dynamic-state,
dynamic>> is not applied to the current state when the pipeline object is
bound, but is instead set by dynamic state setting commands.

No state, including dynamic state, is inherited from one command buffer to
another.


[open,refpage='VkPipeline',desc='Opaque handle to a pipeline object',type='handles']
--
Compute,
ifdef::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[]
ray tracing,
endif::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[]
and graphics pipelines are each represented by sname:VkPipeline handles:

include::{generated}/api/handles/VkPipeline.adoc[]
--


[[pipelines-compute]]
== Compute Pipelines

Compute pipelines consist of a single static compute shader stage and the
pipeline layout.

The compute pipeline represents a compute shader and is created by calling
fname:vkCreateComputePipelines
ifndef::VKSC_VERSION_1_0[]
with pname:module and pname:pName selecting an entry point from a shader
module, where that entry point defines a valid compute shader, in the
slink:VkPipelineShaderStageCreateInfo structure contained within the
slink:VkComputePipelineCreateInfo structure.
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
with an offline compiled pipeline provided in pname:pipelineCache and the
pipeline identified by slink:VkPipelineOfflineCreateInfo structure in the
pname:pNext chain of slink:VkComputePipelineCreateInfo structure.
endif::VKSC_VERSION_1_0[]


[open,refpage='vkCreateComputePipelines',desc='Creates a new compute pipeline object',type='protos']
--
:refpage: vkCreateComputePipelines
:objectnameplural: compute pipelines
:objectnamecamelcase: computePipeline
:objectcount: pname:createInfoCount

To create compute pipelines, call:

include::{generated}/api/protos/vkCreateComputePipelines.adoc[]

  * pname:device is the logical device that creates the compute pipelines.
ifndef::VKSC_VERSION_1_0[]
  * pname:pipelineCache is either dlink:VK_NULL_HANDLE, indicating that
    pipeline caching is disabled; or the handle of a valid
    <<pipelines-cache,pipeline cache>> object, in which case use of that
    cache is enabled for the duration of the command.
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
  * pname:pipelineCache is the handle of a valid <<pipelines-cache,pipeline
    cache>> object.
endif::VKSC_VERSION_1_0[]
  * pname:createInfoCount is the length of the pname:pCreateInfos and
    pname:pPipelines arrays.
  * pname:pCreateInfos is a pointer to an array of
    slink:VkComputePipelineCreateInfo structures.
  * pname:pAllocator controls host memory allocation as described in the
    <<memory-allocation, Memory Allocation>> chapter.
  * pname:pPipelines is a pointer to an array of slink:VkPipeline handles in
    which the resulting compute pipeline objects are returned.
ifdef::editing-notes[]
+
[NOTE]
.editing-note
====
TODO (Jon) - Should we say something like "`the i'th element of the
pname:pPipelines array is created based on the corresponding element of the
pname:pCreateInfos array`"? Also for flink:vkCreateGraphicsPipelines below.
====
endif::editing-notes[]

ifdef::VKSC_VERSION_1_0[]
If a pipeline creation fails due to:

  * The identified pipeline not being present in pname:pipelineCache
  * The pname:pNext chain not including a slink:VkPipelineOfflineCreateInfo
    structure

the operation will continue as specified in <<pipelines-multiple, Multiple
Pipeline Creation>> and the command will return
ename:VK_ERROR_NO_PIPELINE_MATCH.
ifdef::hidden[]
// tag::scdeviation[]
  * flink:vkCreateComputePipelines returns ename:VK_ERROR_NO_PIPELINE_MATCH
    if the slink:VkComputePipelineCreateInfo::pname:pNext chain does not
    include a valid slink:VkPipelineOfflineCreateInfo structure <<SCID-1>>.
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

include::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]

.Valid Usage
****
ifndef::VKSC_VERSION_1_0[]
  * [[VUID-vkCreateComputePipelines-flags-00695]]
    If the pname:flags member of any element of pname:pCreateInfos contains
    the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the
    pname:basePipelineIndex member of that same element is not `-1`,
    pname:basePipelineIndex must: be less than the index into
    pname:pCreateInfos that corresponds to that element
  * [[VUID-vkCreateComputePipelines-flags-00696]]
    If the pname:flags member of any element of pname:pCreateInfos contains
    the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline
    must: have been created with the
    ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set
endif::VKSC_VERSION_1_0[]
ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
  * [[VUID-vkCreateComputePipelines-pipelineCache-02873]]
    If pname:pipelineCache was created with
    ename:VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, host access
    to pname:pipelineCache must: be
    <<fundamentals-threadingbehavior,externally synchronized>>
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
include::{chapters}/commonvalidity/memory_reservation_request_count_common.adoc[]
****
ifdef::VKSC_VERSION_1_0[]
ifdef::hidden[]
// tag::scdeviation[]
  * flink:vkCreateComputePipelines::pname:pipelineCache must: not be
    dlink:VK_NULL_HANDLE <<SCID-1>>, <<SCID-8>>.
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

include::{generated}/validity/protos/vkCreateComputePipelines.adoc[]
--

[open,refpage='VkComputePipelineCreateInfo',desc='Structure specifying parameters of a newly created compute pipeline',type='structs']
--
:refpage: VkComputePipelineCreateInfo

The sname:VkComputePipelineCreateInfo structure is defined as:

include::{generated}/api/structs/VkComputePipelineCreateInfo.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:flags is a bitmask of elink:VkPipelineCreateFlagBits specifying
    how the pipeline will be generated.
  * pname:stage is a slink:VkPipelineShaderStageCreateInfo structure
    describing the compute shader.
  * pname:layout is the description of binding locations used by both the
    pipeline and descriptor sets used with the pipeline.
  * pname:basePipelineHandle is a pipeline to derive from.
ifdef::VKSC_VERSION_1_0[]
    This is not used in Vulkan SC <<SCID-8>>.
endif::VKSC_VERSION_1_0[]
  * pname:basePipelineIndex is an index into the pname:pCreateInfos
    parameter to use as a pipeline to derive from.
ifdef::VKSC_VERSION_1_0[]
    This is not used in Vulkan SC <<SCID-8>>.
endif::VKSC_VERSION_1_0[]

The parameters pname:basePipelineHandle and pname:basePipelineIndex are
described in more detail in <<pipelines-pipeline-derivatives,Pipeline
Derivatives>>.

ifdef::VK_KHR_maintenance5[]
If a slink:VkPipelineCreateFlags2CreateInfoKHR structure is present in the
pname:pNext chain, slink:VkPipelineCreateFlags2CreateInfoKHR::pname:flags
from that structure is used instead of pname:flags from this structure.
endif::VK_KHR_maintenance5[]

.Valid Usage
****
:pipelineType: compute
include::{chapters}/commonvalidity/pipeline_create_info_common.adoc[]
include::{chapters}/commonvalidity/compute_graph_pipeline_create_info_common.adoc[]
  * [[VUID-VkComputePipelineCreateInfo-stage-00701]]
    The pname:stage member of pname:stage must: be
    ename:VK_SHADER_STAGE_COMPUTE_BIT
  * [[VUID-VkComputePipelineCreateInfo-stage-00702]]
    The shader code for the entry point identified by pname:stage and the
    rest of the state identified by this structure must: adhere to the
    pipeline linking rules described in the <<interfaces,Shader Interfaces>>
    chapter
  * [[VUID-VkComputePipelineCreateInfo-layout-01687]]
    The number of resources in pname:layout accessible to the compute shader
    stage must: be less than or equal to
    sname:VkPhysicalDeviceLimits::pname:maxPerStageResources
ifdef::VK_KHR_pipeline_library[]
  * [[VUID-VkComputePipelineCreateInfo-shaderEnqueue-09177]]
ifdef::VK_AMDX_shader_enqueue[]
    If <<features-shaderEnqueue,pname:shaderEnqueue>> is not enabled,
endif::VK_AMDX_shader_enqueue[]
    pname:flags must: not include ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR
ifdef::VK_AMDX_shader_enqueue[]
  * [[VUID-VkComputePipelineCreateInfo-flags-09178]]
    If pname:flags does not include
    ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, the shader specified by
    pname:stage must: not declare the code:ShaderEnqueueAMDX capability
endif::VK_AMDX_shader_enqueue[]
endif::VK_KHR_pipeline_library[]
ifdef::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[]
  * [[VUID-VkComputePipelineCreateInfo-pipelineStageCreationFeedbackCount-06566]]
    If
    slink:VkPipelineCreationFeedbackCreateInfo::pname:pipelineStageCreationFeedbackCount
    is not `0`, it must: be `1`
endif::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[]
ifdef::VK_EXT_opacity_micromap[]
  * [[VUID-VkComputePipelineCreateInfo-flags-07367]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT
endif::VK_EXT_opacity_micromap[]
ifdef::VK_NV_displacement_micromap[]
  * [[VUID-VkComputePipelineCreateInfo-flags-07996]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV
endif::VK_NV_displacement_micromap[]
****
ifdef::VKSC_VERSION_1_0[]
ifdef::hidden[]
// tag::scdeviation[]
  * slink:VkComputePipelineCreateInfo::pname:basePipelineHandle must: be
    dlink:VK_NULL_HANDLE <<SCID-8>>.
  * slink:VkComputePipelineCreateInfo::pname:basePipelineIndex must: be zero
    <<SCID-8>>.
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

include::{generated}/validity/structs/VkComputePipelineCreateInfo.adoc[]
--

[open,refpage='VkPipelineShaderStageCreateInfo',desc='Structure specifying parameters of a newly created pipeline shader stage',type='structs']
--
The sname:VkPipelineShaderStageCreateInfo structure is defined as:

include::{generated}/api/structs/VkPipelineShaderStageCreateInfo.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:flags is a bitmask of elink:VkPipelineShaderStageCreateFlagBits
    specifying how the pipeline shader stage will be generated.
  * pname:stage is a elink:VkShaderStageFlagBits value specifying a single
    pipeline stage.
ifdef::VK_EXT_graphics_pipeline_library,VK_EXT_shader_module_identifier,VK_KHR_maintenance5[]
  * pname:module is optionally a slink:VkShaderModule object containing the
    shader code for this stage.
endif::VK_EXT_graphics_pipeline_library,VK_EXT_shader_module_identifier,VK_KHR_maintenance5[]
ifndef::VK_EXT_graphics_pipeline_library,VK_EXT_shader_module_identifier,VK_KHR_maintenance5[]
  * pname:module is a slink:VkShaderModule object containing the shader code
    for this stage.
endif::VK_EXT_graphics_pipeline_library,VK_EXT_shader_module_identifier,VK_KHR_maintenance5[]
ifdef::VKSC_VERSION_1_0[]
    This is not used in Vulkan SC <<SCID-8>>.
endif::VKSC_VERSION_1_0[]
  * pname:pName is a pointer to a null-terminated UTF-8 string specifying
    the entry point name of the shader for this stage.
  * pname:pSpecializationInfo is a pointer to a slink:VkSpecializationInfo
    structure, as described in
    <<pipelines-specialization-constants,Specialization Constants>>, or
    `NULL`.

ifdef::VKSC_VERSION_1_0[]
In Vulkan SC, the pipeline compilation process occurs
<<pipelines-offline-compilation,offline>> and the pname:module, pname:pName,
and pname:pSpecializationInfo parameters are not used at runtime and should:
be ignored by the implementation.
If provided, the application must: set the pname:pName and
pname:pSpecializationInfo parameters to the values that were specified for
the offline compilation of this pipeline.
endif::VKSC_VERSION_1_0[]

ifdef::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[]
If pname:module is not dlink:VK_NULL_HANDLE, the shader code used by the
pipeline is defined by pname:module.
If pname:module is dlink:VK_NULL_HANDLE, the shader code is defined by the
chained slink:VkShaderModuleCreateInfo if present.
endif::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[]
ifndef::VKSC_VERSION_1_0,VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[]
The shader code used by the pipeline is defined by pname:module.
endif::VKSC_VERSION_1_0,VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[]

ifdef::VK_EXT_shader_module_identifier[]
If the <<features-shaderModuleIdentifier, pname:shaderModuleIdentifier>>
feature is enabled, applications can: omit shader code for pname:stage and
instead provide a module identifier.
This is done by including a
slink:VkPipelineShaderStageModuleIdentifierCreateInfoEXT struct with
pname:identifierSize not equal to 0 in the pname:pNext chain.
A shader stage created in this way is equivalent to one created using a
shader module with the same identifier.
The identifier allows an implementation to look up a pipeline without
consuming a valid SPIR-V module.
If a pipeline is not found, pipeline compilation is not possible and the
implementation must: fail as specified by
ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT.

When an identifier is used in lieu of a shader module, implementations may:
fail pipeline compilation with ename:VK_PIPELINE_COMPILE_REQUIRED for any
reason.

[NOTE]
.Note
====
The rationale for the relaxed requirement on implementations to return a
pipeline with slink:VkPipelineShaderStageModuleIdentifierCreateInfoEXT is
that layers or tools may intercept pipeline creation calls and require the
full SPIR-V context to operate correctly.
ICDs are not expected to fail pipeline compilation if the pipeline exists in
a cache somewhere.
====

ifdef::VK_KHR_pipeline_library[]
Applications can: use identifiers when creating pipelines with
ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR.
When creating such pipelines, ename:VK_SUCCESS may: be returned, but
subsequently fail when referencing the pipeline in a
slink:VkPipelineLibraryCreateInfoKHR struct.
Applications must: allow pipeline compilation to fail during link steps with
ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT as it may:
not be possible to determine if a pipeline can: be created from identifiers
until the link step.
endif::VK_KHR_pipeline_library[]
endif::VK_EXT_shader_module_identifier[]

.Valid Usage
****
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-00704]]
    If the <<features-geometryShader, pname:geometryShader>> feature is not
    enabled, pname:stage must: not be ename:VK_SHADER_STAGE_GEOMETRY_BIT
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-00705]]
    If the <<features-tessellationShader, pname:tessellationShader>> feature
    is not enabled, pname:stage must: not be
    ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or
    ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-02091]]
    If the <<features-meshShader, pname:meshShaders>> feature is not
    enabled, pname:stage must: not be ename:VK_SHADER_STAGE_MESH_BIT_EXT
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-02092]]
    If the <<features-taskShader, pname:taskShaders>> feature is not
    enabled, pname:stage must: not be ename:VK_SHADER_STAGE_TASK_BIT_EXT
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]

ifdef::VK_HUAWEI_cluster_culling_shader[]
  * [[VUID-VkPipelineShaderStageCreateInfo-clustercullingShader-07813]]
    If the <<features-clustercullingShader, pname:clustercullingShader>>
    feature is not enabled, pname:stage must: not be
    ename:VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI
endif::VK_HUAWEI_cluster_culling_shader[]
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-00706]]
    pname:stage must: not be ename:VK_SHADER_STAGE_ALL_GRAPHICS, or
    ename:VK_SHADER_STAGE_ALL
ifdef::VKSC_VERSION_1_0[]
  * [[VUID-VkPipelineShaderStageCreateInfo-module-05026]]
    pname:module must: be dlink:VK_NULL_HANDLE.
  * [[VUID-VkPipelineShaderStageCreateInfo-pName-05027]]
    If pname:pName is not `NULL`, it must: be the name of an
    code:OpEntryPoint in the SPIR-V shader module used for offline
    compilation of this pipeline with an execution model that matches
    pname:stage
endif::VKSC_VERSION_1_0[]
ifndef::VKSC_VERSION_1_0[]
  * [[VUID-VkPipelineShaderStageCreateInfo-pName-00707]]
    pname:pName must: be the name of an code:OpEntryPoint in pname:module
    with an execution model that matches pname:stage
endif::VKSC_VERSION_1_0[]
  * [[VUID-VkPipelineShaderStageCreateInfo-maxClipDistances-00708]]
    If the identified entry point includes any variable in its interface
    that is declared with the code:ClipDistance code:BuiltIn decoration,
    that variable must: not have an array size greater than
    sname:VkPhysicalDeviceLimits::pname:maxClipDistances
  * [[VUID-VkPipelineShaderStageCreateInfo-maxCullDistances-00709]]
    If the identified entry point includes any variable in its interface
    that is declared with the code:CullDistance code:BuiltIn decoration,
    that variable must: not have an array size greater than
    sname:VkPhysicalDeviceLimits::pname:maxCullDistances
  * [[VUID-VkPipelineShaderStageCreateInfo-maxCombinedClipAndCullDistances-00710]]
    If the identified entry point includes any variables in its interface
    that are declared with the code:ClipDistance or code:CullDistance
    code:BuiltIn decoration, those variables must: not have array sizes
    which sum to more than
    sname:VkPhysicalDeviceLimits::pname:maxCombinedClipAndCullDistances
  * [[VUID-VkPipelineShaderStageCreateInfo-maxSampleMaskWords-00711]]
    If the identified entry point includes any variable in its interface
    that is declared with the code:SampleMask code:BuiltIn decoration, that
    variable must: not have an array size greater than
    sname:VkPhysicalDeviceLimits::pname:maxSampleMaskWords
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-00713]]
    If pname:stage is ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or
    ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, and the identified
    entry point has an code:OpExecutionMode instruction specifying a patch
    size with code:OutputVertices, the patch size must: be greater than `0`
    and less than or equal to
    sname:VkPhysicalDeviceLimits::pname:maxTessellationPatchSize
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-00714]]
    If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, the identified
    entry point must: have an code:OpExecutionMode instruction specifying a
    maximum output vertex count that is greater than `0` and less than or
    equal to sname:VkPhysicalDeviceLimits::pname:maxGeometryOutputVertices
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-00715]]
    If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, the identified
    entry point must: have an code:OpExecutionMode instruction specifying an
    invocation count that is greater than `0` and less than or equal to
    sname:VkPhysicalDeviceLimits::pname:maxGeometryShaderInvocations
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-02596]]
    If pname:stage is either ename:VK_SHADER_STAGE_VERTEX_BIT,
    ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT,
    ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, or
    ename:VK_SHADER_STAGE_GEOMETRY_BIT, and the identified entry point
    writes to code:Layer for any primitive, it must: write the same value to
    code:Layer for all vertices of a given primitive
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-02597]]
    If pname:stage is either ename:VK_SHADER_STAGE_VERTEX_BIT,
    ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT,
    ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, or
    ename:VK_SHADER_STAGE_GEOMETRY_BIT, and the identified entry point
    writes to code:ViewportIndex for any primitive, it must: write the same
    value to code:ViewportIndex for all vertices of a given primitive
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-06685]]
    If pname:stage is ename:VK_SHADER_STAGE_FRAGMENT_BIT, and the identified
    entry point writes to code:FragDepth in any execution path, all
    execution paths that are not exclusive to helper invocations must:
    either discard the fragment, or write or initialize the value of
    code:FragDepth
ifdef::VK_EXT_shader_stencil_export[]
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-06686]]
    If pname:stage is ename:VK_SHADER_STAGE_FRAGMENT_BIT, and the identified
    entry point writes to code:FragStencilRefEXT in any execution path, all
    execution paths that are not exclusive to helper invocations must:
    either discard the fragment, or write or initialize the value of
    code:FragStencilRefEXT
endif::VK_EXT_shader_stencil_export[]
ifdef::VK_VERSION_1_3,VK_EXT_subgroup_size_control[]
  * [[VUID-VkPipelineShaderStageCreateInfo-flags-02784]]
    If pname:flags has the
    ename:VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT
    flag set, the <<features-subgroupSizeControl,
    pname:subgroupSizeControl>> feature must: be enabled
  * [[VUID-VkPipelineShaderStageCreateInfo-flags-02785]]
    If pname:flags has the
    ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag
    set, the <<features-computeFullSubgroups, pname:computeFullSubgroups>>
    feature must: be enabled
  * [[VUID-VkPipelineShaderStageCreateInfo-flags-08988]]
    If pname:flags includes
    ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT,
    pname:stage must: be
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
    one of ename:VK_SHADER_STAGE_MESH_BIT_EXT,
    ename:VK_SHADER_STAGE_TASK_BIT_EXT, or
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
    ename:VK_SHADER_STAGE_COMPUTE_BIT
  * [[VUID-VkPipelineShaderStageCreateInfo-pNext-02754]]
    If a slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure
    is included in the pname:pNext chain, pname:flags must: not have the
    ename:VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT
    flag set
  * [[VUID-VkPipelineShaderStageCreateInfo-pNext-02755]]
    If a slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure
    is included in the pname:pNext chain, the
    <<features-subgroupSizeControl, pname:subgroupSizeControl>> feature
    must: be enabled, and pname:stage must: be a valid bit specified in
    <<limits-requiredSubgroupSizeStages, pname:requiredSubgroupSizeStages>>
  * [[VUID-VkPipelineShaderStageCreateInfo-pNext-02756]]
    If a slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure
    is included in the pname:pNext chain and pname:stage is
    ename:VK_SHADER_STAGE_COMPUTE_BIT,
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[ename:VK_SHADER_STAGE_MESH_BIT_EXT, or ename:VK_SHADER_STAGE_TASK_BIT_EXT,]
    the local workgroup size of the shader must: be less than or equal to
    the product of
    slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo::pname:requiredSubgroupSize
    and <<limits-maxComputeWorkgroupSubgroups,
    pname:maxComputeWorkgroupSubgroups>>
  * [[VUID-VkPipelineShaderStageCreateInfo-pNext-02757]]
    If a slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure
    is included in the pname:pNext chain, and pname:flags has the
    ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag
    set, the local workgroup size in the X dimension of the pipeline must:
    be a multiple of
    slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo::pname:requiredSubgroupSize
  * [[VUID-VkPipelineShaderStageCreateInfo-flags-02758]]
    If pname:flags has both the
    ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT and
    ename:VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT
    flags set, the local workgroup size in the X dimension of the pipeline
    must: be a multiple of <<limits-maxSubgroupSize, pname:maxSubgroupSize>>
  * [[VUID-VkPipelineShaderStageCreateInfo-flags-02759]]
    If pname:flags has the
    ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag
    set and pname:flags does not have the
    ename:VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT
    flag set and no
    slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is
    included in the pname:pNext chain, the local workgroup size in the X
    dimension of the pipeline must: be a multiple of <<limits-subgroup-size,
    pname:subgroupSize>>
ifdef::VK_KHR_cooperative_matrix[]
  * [[VUID-VkPipelineShaderStageCreateInfo-module-08987]]
    If pname:module uses the code:OpTypeCooperativeMatrixKHR instruction
    with a code:Scope equal to code:Subgroup, then the local workgroup size
    in the X dimension of the pipeline must: be a multiple of
    <<limits-subgroup-size,pname:subgroupSize>>.
endif::VK_KHR_cooperative_matrix[]
endif::VK_VERSION_1_3,VK_EXT_subgroup_size_control[]

  * [[VUID-VkPipelineShaderStageCreateInfo-stage-08771]]
ifdef::VK_EXT_shader_module_identifier[]
    If a shader module identifier is not specified for this pname:stage,
endif::VK_EXT_shader_module_identifier[]
    pname:module must: be a valid slink:VkShaderModule
ifdef::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[]
    if none of the following features are enabled:
ifdef::VK_EXT_graphics_pipeline_library[]
  ** <<features-graphicsPipelineLibrary, pname:graphicsPipelineLibrary>>
endif::VK_EXT_graphics_pipeline_library[]
ifdef::VK_KHR_maintenance5[]
  ** <<features-maintenance5, pname:maintenance5>>
endif::VK_KHR_maintenance5[]
endif::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[]

ifdef::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[]
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-06845]]
ifdef::VK_EXT_shader_module_identifier[]
    If a shader module identifier is not specified for this pname:stage,
    pname:module must: be a valid slink:VkShaderModule, or
endif::VK_EXT_shader_module_identifier[]
ifndef::VK_EXT_shader_module_identifier[]
    If pname:module is dlink:VK_NULL_HANDLE]
endif::VK_EXT_shader_module_identifier[]
    there must: be a valid slink:VkShaderModuleCreateInfo structure in the
    pname:pNext chain
endif::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[]

ifdef::VK_EXT_shader_module_identifier[]
ifdef::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[]
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-06844]]
    If a shader module identifier is specified for this pname:stage, a
    slink:VkShaderModuleCreateInfo structure must: not be present in the
    pname:pNext chain
endif::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[]
  * [[VUID-VkPipelineShaderStageCreateInfo-stage-06848]]
    If a shader module identifier is specified for this pname:stage,
    pname:module must: be dlink:VK_NULL_HANDLE
endif::VK_EXT_shader_module_identifier[]
  * [[VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849]]
ifdef::VK_EXT_shader_module_identifier[]
    If a shader module identifier is not specified, the
endif::VK_EXT_shader_module_identifier[]
ifndef::VK_EXT_shader_module_identifier[The]
    shader code used by the pipeline must: be valid as described by the
    <<spirv-spec,Khronos SPIR-V Specification>> after applying the
    specializations provided in pname:pSpecializationInfo, if any, and then
    converting all specialization constants into fixed constants
****

include::{generated}/validity/structs/VkPipelineShaderStageCreateInfo.adoc[]
--

[open,refpage='VkPipelineShaderStageCreateFlags',desc='Bitmask of VkPipelineShaderStageCreateFlagBits',type='flags']
--
include::{generated}/api/flags/VkPipelineShaderStageCreateFlags.adoc[]

tname:VkPipelineShaderStageCreateFlags is a bitmask type for setting a mask
of zero or more elink:VkPipelineShaderStageCreateFlagBits.
--

[open,refpage='VkPipelineShaderStageCreateFlagBits',desc='Bitmask controlling how a pipeline shader stage is created',type='enums']
--
Possible values of the pname:flags member of
slink:VkPipelineShaderStageCreateInfo specifying how a pipeline shader stage
is created, are:

include::{generated}/api/enums/VkPipelineShaderStageCreateFlagBits.adoc[]

ifdef::VK_VERSION_1_3,VK_EXT_subgroup_size_control[]
  * ename:VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT
    specifies that the
    <<interfaces-builtin-variables-sgs,code:SubgroupSize>> may: vary in the
    shader stage.
  * ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT
    specifies that the subgroup sizes must: be launched with all invocations
    active in the
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[task, mesh, or]
    compute stage.

[NOTE]
.Note
====
If ename:VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT
and ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT are
specified and <<limits-minSubgroupSize, pname:minSubgroupSize>> does not
equal <<limits-maxSubgroupSize, pname:maxSubgroupSize>> and no
<<pipelines-required-subgroup-size, required subgroup size>> is specified,
then the only way to guarantee that the 'X' dimension of the local workgroup
size is a multiple of <<interfaces-builtin-variables-sgs,
code:SubgroupSize>> is to make it a multiple of pname:maxSubgroupSize.
Under these conditions, you are guaranteed full subgroups but not any
particular subgroup size.
====

endif::VK_VERSION_1_3,VK_EXT_subgroup_size_control[]
--

[open,refpage='VkShaderStageFlagBits',desc='Bitmask specifying a pipeline stage',type='enums']
--
Bits which can: be set by commands and structures, specifying one or more
shader stages, are:

include::{generated}/api/enums/VkShaderStageFlagBits.adoc[]

  * ename:VK_SHADER_STAGE_VERTEX_BIT specifies the vertex stage.
  * ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT specifies the
    tessellation control stage.
  * ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT specifies the
    tessellation evaluation stage.
  * ename:VK_SHADER_STAGE_GEOMETRY_BIT specifies the geometry stage.
  * ename:VK_SHADER_STAGE_FRAGMENT_BIT specifies the fragment stage.
  * ename:VK_SHADER_STAGE_COMPUTE_BIT specifies the compute stage.
  * ename:VK_SHADER_STAGE_ALL_GRAPHICS is a combination of bits used as
    shorthand to specify all graphics stages defined above (excluding the
    compute stage).
  * ename:VK_SHADER_STAGE_ALL is a combination of bits used as shorthand to
    specify all shader stages supported by the device, including all
    additional stages which are introduced by extensions.
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  * ename:VK_SHADER_STAGE_TASK_BIT_EXT specifies the task stage.
  * ename:VK_SHADER_STAGE_MESH_BIT_EXT specifies the mesh stage.
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
ifdef::VK_HUAWEI_cluster_culling_shader[]
  * ename:VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI specifies the cluster
    culling stage.
endif::VK_HUAWEI_cluster_culling_shader[]
ifdef::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[]
  * ename:VK_SHADER_STAGE_RAYGEN_BIT_KHR specifies the ray generation stage.
  * ename:VK_SHADER_STAGE_ANY_HIT_BIT_KHR specifies the any-hit stage.
  * ename:VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR specifies the closest hit
    stage.
  * ename:VK_SHADER_STAGE_MISS_BIT_KHR specifies the miss stage.
  * ename:VK_SHADER_STAGE_INTERSECTION_BIT_KHR specifies the intersection
    stage.
  * ename:VK_SHADER_STAGE_CALLABLE_BIT_KHR specifies the callable stage.
endif::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[]

[NOTE]
.Note
====
ename:VK_SHADER_STAGE_ALL_GRAPHICS only includes the original five graphics
stages included in Vulkan 1.0, and not any stages added by extensions.
Thus, it may not have the desired effect in all cases.
====
--

[open,refpage='VkShaderStageFlags',desc='Bitmask of VkShaderStageFlagBits',type='flags']
--
include::{generated}/api/flags/VkShaderStageFlags.adoc[]

tname:VkShaderStageFlags is a bitmask type for setting a mask of zero or
more elink:VkShaderStageFlagBits.
--

ifdef::VK_VERSION_1_3,VK_EXT_subgroup_size_control[]
[open,refpage='VkPipelineShaderStageRequiredSubgroupSizeCreateInfo',desc='Structure specifying the required subgroup size of a newly created pipeline shader stage',type='structs',alias='VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT']
--
The sname:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is
defined as:

include::{generated}/api/structs/VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.adoc[]

ifdef::VK_EXT_subgroup_size_control[]
or the equivalent

include::{generated}/api/structs/VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT.adoc[]
endif::VK_EXT_subgroup_size_control[]

ifdef::VK_EXT_shader_object[]
or the equiavlent

include::{generated}/api/structs/VkShaderRequiredSubgroupSizeCreateInfoEXT.adoc[]
endif::VK_EXT_shader_object[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * [[pipelines-required-subgroup-size]] pname:requiredSubgroupSize is an
    unsigned integer value specifying the required subgroup size for the
    newly created pipeline shader stage.

If a sname:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is
included in the pname:pNext chain of slink:VkPipelineShaderStageCreateInfo,
it specifies that the pipeline shader stage being compiled has a required
subgroup size.

ifdef::VK_EXT_shader_object[]
If a sname:VkShaderRequiredSubgroupSizeCreateInfoEXT structure is included
in the pname:pNext chain of slink:VkShaderCreateInfoEXT, it specifies that
the shader being compiled has a required subgroup size.
endif::VK_EXT_shader_object[]

.Valid Usage
****
  * [[VUID-VkPipelineShaderStageRequiredSubgroupSizeCreateInfo-requiredSubgroupSize-02760]]
    pname:requiredSubgroupSize must: be a power-of-two integer
  * [[VUID-VkPipelineShaderStageRequiredSubgroupSizeCreateInfo-requiredSubgroupSize-02761]]
    pname:requiredSubgroupSize must: be greater or equal to
    <<limits-minSubgroupSize, pname:minSubgroupSize>>
  * [[VUID-VkPipelineShaderStageRequiredSubgroupSizeCreateInfo-requiredSubgroupSize-02762]]
    pname:requiredSubgroupSize must: be less than or equal to
    <<limits-maxSubgroupSize, pname:maxSubgroupSize>>
****

include::{generated}/validity/structs/VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.adoc[]
--
endif::VK_VERSION_1_3,VK_EXT_subgroup_size_control[]

ifdef::VK_HUAWEI_subpass_shading[]
[open,refpage='VkSubpassShadingPipelineCreateInfoHUAWEI',desc='Structure specifying parameters of a newly created subpass shading pipeline',type='structs']
--
A subpass shading pipeline is a compute pipeline which must: be called only
in a subpass of a render pass with work dimensions specified by render area
size.
The subpass shading pipeline shader is a compute shader allowed to access
input attachments specified in the calling subpass.
To create a subpass shading pipeline, call flink:vkCreateComputePipelines
with slink:VkSubpassShadingPipelineCreateInfoHUAWEI in the pname:pNext chain
of slink:VkComputePipelineCreateInfo.

The sname:VkSubpassShadingPipelineCreateInfoHUAWEI structure is defined as:

include::{generated}/api/structs/VkSubpassShadingPipelineCreateInfoHUAWEI.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:renderPass is a handle to a render pass object describing the
    environment in which the pipeline will be used.
    The pipeline must: only be used with a render pass instance compatible
    with the one provided.
    See <<renderpass-compatibility,Render Pass Compatibility>> for more
    information.
  * pname:subpass is the index of the subpass in the render pass where this
    pipeline will be used.

.Valid Usage
****
  * [[VUID-VkSubpassShadingPipelineCreateInfoHUAWEI-subpass-04946]]
    pname:subpass must: be created with
    ename:VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI bind point
****

include::{generated}/validity/structs/VkSubpassShadingPipelineCreateInfoHUAWEI.adoc[]
--

[open,refpage='vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI',desc='Query maximum supported subpass shading workgroup size for a give render pass',type='protos']
--
A subpass shading pipeline's workgroup size is a 2D vector with number of
power-of-two in width and height.
The maximum number of width and height is implementation-dependent, and may:
vary for different formats and sample counts of attachments in a render
pass.

To query the maximum workgroup size, call:

include::{generated}/api/protos/vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI.adoc[]

  * pname:device is a handle to a local device object that was used to
    create the given render pass.
  * pname:renderPass is a handle to a render pass object describing the
    environment in which the pipeline will be used.
    The pipeline must: only be used with a render pass instance compatible
    with the one provided.
    See <<renderpass-compatibility,Render Pass Compatibility>> for more
    information.
  * pname:pMaxWorkgroupSize is a pointer to a slink:VkExtent2D structure.

include::{generated}/validity/protos/vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI.adoc[]
--
endif::VK_HUAWEI_subpass_shading[]

ifdef::VK_EXT_pipeline_robustness[]
[open,refpage='VkPipelineRobustnessCreateInfoEXT',desc='Structure controlling the robustness of a newly created pipeline shader stage',type='structs']
--
The sname:VkPipelineRobustnessCreateInfoEXT structure is defined as:

include::{generated}/api/structs/VkPipelineRobustnessCreateInfoEXT.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:storageBuffers sets the behaviour of out of bounds accesses made
    to resources bound as:
  ** ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
  ** ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
  ** ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
  * pname:uniformBuffers describes the behaviour of out of bounds accesses
    made to resources bound as:
  ** ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
  ** ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
  ** ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
ifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
  ** ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK
endif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[]
  * pname:vertexInputs describes the behaviour of out of bounds accesses
    made to vertex input attributes
  * pname:images describes the behaviour of out of bounds accesses made to
    resources bound as:
  ** ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
  ** ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE

ifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]
Resources bound as ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT will have the
robustness behavior that covers its active descriptor type.
endif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[]

The scope of the effect of sname:VkPipelineRobustnessCreateInfoEXT depends
on which structure's pname:pNext chain it is included in.

  * sname:VkGraphicsPipelineCreateInfo,
ifdef::VK_KHR_ray_tracing_pipeline[sname:VkRayTracingPipelineCreateInfoKHR,]
    sname:VkComputePipelineCreateInfo: +
    The robustness behavior described by
    sname:VkPipelineRobustnessCreateInfoEXT applies to all accesses through
    this pipeline
  * sname:VkPipelineShaderStageCreateInfo: +
    The robustness behavior described by
    sname:VkPipelineRobustnessCreateInfoEXT applies to all accesses
    emanating from the shader code of this shader stage

If sname:VkPipelineRobustnessCreateInfoEXT is specified for both a pipeline
and a pipeline stage, the sname:VkPipelineRobustnessCreateInfoEXT specified
for the pipeline stage will take precedence.

ifdef::VK_KHR_pipeline_library[]
When sname:VkPipelineRobustnessCreateInfoEXT is specified for a pipeline, it
only affects the subset of the pipeline that is specified by the create
info, as opposed to subsets linked from pipeline libraries.
ifdef::VK_EXT_graphics_pipeline_library[]
For slink:VkGraphicsPipelineCreateInfo, that subset is specified by
slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags.
endif::VK_EXT_graphics_pipeline_library[]
ifdef::VK_KHR_ray_tracing_pipeline[]
For slink:VkRayTracingPipelineCreateInfoKHR, that subset is specified by the
specific stages in slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages.
endif::VK_KHR_ray_tracing_pipeline[]
endif::VK_KHR_pipeline_library[]

.Valid Usage
****
  * [[VUID-VkPipelineRobustnessCreateInfoEXT-pipelineRobustness-06926]]
    If the <<features-pipelineRobustness, pname:pipelineRobustness>> feature
    is not enabled, pname:storageBuffers must: be
    ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT
  * [[VUID-VkPipelineRobustnessCreateInfoEXT-pipelineRobustness-06927]]
    If the <<features-pipelineRobustness, pname:pipelineRobustness>> feature
    is not enabled, pname:uniformBuffers must: be
    ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT
  * [[VUID-VkPipelineRobustnessCreateInfoEXT-pipelineRobustness-06928]]
    If the <<features-pipelineRobustness, pname:pipelineRobustness>> feature
    is not enabled, pname:vertexInputs must: be
    ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT
  * [[VUID-VkPipelineRobustnessCreateInfoEXT-pipelineRobustness-06929]]
    If the <<features-pipelineRobustness, pname:pipelineRobustness>> feature
    is not enabled, pname:images must: be
    ename:VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT
  * [[VUID-VkPipelineRobustnessCreateInfoEXT-robustImageAccess-06930]]
    If the <<features-robustImageAccess, pname:robustImageAccess>> feature
    is not supported, pname:images must: not be
    ename:VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT
  * [[VUID-VkPipelineRobustnessCreateInfoEXT-robustBufferAccess2-06931]]
    If the <<features-robustBufferAccess2, pname:robustBufferAccess2>>
    feature is not supported, pname:storageBuffers must: not be
    ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT
  * [[VUID-VkPipelineRobustnessCreateInfoEXT-robustBufferAccess2-06932]]
    If the <<features-robustBufferAccess2, pname:robustBufferAccess2>>
    feature is not supported, pname:uniformBuffers must: not be
    ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT
  * [[VUID-VkPipelineRobustnessCreateInfoEXT-robustBufferAccess2-06933]]
    If the <<features-robustBufferAccess2, pname:robustBufferAccess2>>
    feature is not supported, pname:vertexInputs must: not be
    ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT
  * [[VUID-VkPipelineRobustnessCreateInfoEXT-robustImageAccess2-06934]]
    If the <<features-robustImageAccess2, pname:robustImageAccess2>> feature
    is not supported, pname:images must: not be
    ename:VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT
****

include::{generated}/validity/structs/VkPipelineRobustnessCreateInfoEXT.adoc[]
--

[open,refpage='VkPipelineRobustnessBufferBehaviorEXT',desc='Enum controlling the robustness of buffer accesses in a pipeline stage',type='enums']
--
Possible values of the pname:storageBuffers, pname:uniformBuffers, and
pname:vertexInputs members of slink:VkPipelineRobustnessCreateInfoEXT are:

include::{generated}/api/enums/VkPipelineRobustnessBufferBehaviorEXT.adoc[]

  * ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT
    specifies that this pipeline stage follows the behavior of robustness
    features that are enabled on the device that created this pipeline
  * ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT specifies that
    buffer accesses by this pipeline stage to the relevant resource types
    must: not be out of bounds
  * ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT
    specifies that out of bounds accesses by this pipeline stage to the
    relevant resource types behave as if the <<features-robustBufferAccess,
    pname:robustBufferAccess>> feature is enabled
  * ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT
    specifies that out of bounds accesses by this pipeline stage to the
    relevant resource types behave as if the <<features-robustBufferAccess2,
    pname:robustBufferAccess2>> feature is enabled
--

[open,refpage='VkPipelineRobustnessImageBehaviorEXT',desc='Enum controlling the robustness of image accesses in a pipeline stage',type='enums']
--
Possible values of the pname:images member of
slink:VkPipelineRobustnessCreateInfoEXT are:

include::{generated}/api/enums/VkPipelineRobustnessImageBehaviorEXT.adoc[]

  * ename:VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT specifies
    that this pipeline stage follows the behavior of robustness features
    that are enabled on the device that created this pipeline
  * ename:VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT specifies that
    image accesses by this pipeline stage to the relevant resource types
    must: not be out of bounds
  * ename:VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT
    specifies that out of bounds accesses by this pipeline stage to images
    behave as if the <<features-robustImageAccess, pname:robustImageAccess>>
    feature is enabled
  * ename:VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT
    specifies that out of bounds accesses by this pipeline stage to images
    behave as if the <<features-robustImageAccess2,
    pname:robustImageAccess2>> feature is enabled
--
endif::VK_EXT_pipeline_robustness[]

ifdef::VK_EXT_shader_module_identifier[]
[open,refpage='VkPipelineShaderStageModuleIdentifierCreateInfoEXT',desc='Structure specifying an identifier for a shader module',type='structs']
--
An identifier can: be provided instead of shader code in an attempt to
compile pipelines without providing complete SPIR-V to the implementation.

The sname:VkPipelineShaderStageModuleIdentifierCreateInfoEXT structure is
defined as:

include::{generated}/api/structs/VkPipelineShaderStageModuleIdentifierCreateInfoEXT.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:identifierSize is the size, in bytes, of the buffer pointed to by
    pname:pIdentifier.
  * pname:pIdentifier is a pointer to a buffer of opaque data specifying an
    identifier.

Any identifier can: be used.
If the pipeline being created with identifier requires compilation to
complete the pipeline creation call, pipeline compilation must: fail as
defined by ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT.

pname:pIdentifier and pname:identifierSize can: be obtained from an
slink:VkShaderModuleIdentifierEXT queried earlier.

.Valid Usage
****
  * [[VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-pNext-06850]]
    If this structure is included in a pname:pNext chain and
    pname:identifierSize is not equal to 0, the
    <<features-shaderModuleIdentifier, pname:shaderModuleIdentifier>>
    feature must: be enabled
  * [[VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-pNext-06851]]
    If this struct is included in a pname:pNext chain of
    slink:VkPipelineShaderStageCreateInfo and pname:identifierSize is not
    equal to 0, the pipeline must: be created with the
    ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT flag set
  * [[VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-identifierSize-06852]]
    pname:identifierSize must: be less-or-equal to
    ename:VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT
****

include::{generated}/validity/structs/VkPipelineShaderStageModuleIdentifierCreateInfoEXT.adoc[]
--
endif::VK_EXT_shader_module_identifier[]

ifdef::VK_NV_device_generated_commands_compute[]
If a compute pipeline is going to be used in <<device-generated-commands,
Device-Generated Commands>> by specifying its pipeline token with
slink:VkBindPipelineIndirectCommandNV, then that pipeline's associated
metadata must: be saved at a specified buffer device address for later use
in indirect command generation.
The buffer device address must: be specified at the time of compute pipeline
creation with slink:VkComputePipelineIndirectBufferInfoNV structure in the
pname:pNext chain of slink:VkComputePipelineCreateInfo.

[open,refpage='VkComputePipelineIndirectBufferInfoNV',desc='Structure describing the device address where pipeline\'s metadata will be saved',type='structs']
--
The sname:VkComputePipelineIndirectBufferInfoNV structure is defined as:

include::{generated}/api/structs/VkComputePipelineIndirectBufferInfoNV.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:deviceAddress is the address where the pipeline's metadata will be
    stored.
  * pname:size is the size of pipeline's metadata that was queried using
    flink:vkGetPipelineIndirectMemoryRequirementsNV.
  * pname:pipelineDeviceAddressCaptureReplay is the device address where
    pipeline's metadata was originally saved and can now be used to
    re-populate pname:deviceAddress for replay.

If pname:pipelineDeviceAddressCaptureReplay is zero, no specific address is
requested.
If pname:pipelineDeviceAddressCaptureReplay is not zero, then it must: be an
address retrieved from an identically created pipeline on the same
implementation.
The pipeline metadata must: also be placed on an identically created buffer
and at the same offset using the flink:vkCmdUpdatePipelineIndirectBufferNV
command.

.Valid Usage
****
  * [[VUID-VkComputePipelineIndirectBufferInfoNV-deviceGeneratedComputePipelines-09009]]
    The <<features-deviceGeneratedComputePipelines,
    sname:VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV::pname:deviceGeneratedComputePipelines>>
    feature must: be enabled
  * [[VUID-VkComputePipelineIndirectBufferInfoNV-flags-09010]]
    The pipeline creation flags in
    slink:VkComputePipelineCreateInfo::pname:flags must: include
    ename:VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV
  * [[VUID-VkComputePipelineIndirectBufferInfoNV-deviceAddress-09011]]
    pname:deviceAddress must: be aligned to the
    slink:VkMemoryRequirements2::pname:alignment, as returned by
    flink:vkGetPipelineIndirectMemoryRequirementsNV
  * [[VUID-VkComputePipelineIndirectBufferInfoNV-deviceAddress-09012]]
    pname:deviceAddress must: have been allocated from a buffer that was
    created with usage ename:VK_BUFFER_USAGE_TRANSFER_DST_BIT and
    ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT
  * [[VUID-VkComputePipelineIndirectBufferInfoNV-size-09013]]
    pname:size must: be greater than or equal to the
    slink:VkMemoryRequirements2::pname:size, as returned by
    flink:vkGetPipelineIndirectMemoryRequirementsNV
  * [[VUID-VkComputePipelineIndirectBufferInfoNV-pipelineDeviceAddressCaptureReplay-09014]]
    If pname:pipelineDeviceAddressCaptureReplay is non-zero then the
    <<features-deviceGeneratedComputePipelines,
    sname:VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV::pname:deviceGeneratedComputeCaptureReplay>>
    feature must: be enabled
  * [[VUID-VkComputePipelineIndirectBufferInfoNV-pipelineDeviceAddressCaptureReplay-09015]]
    If pname:pipelineDeviceAddressCaptureReplay is non-zero then that
    address must: have been allocated with flag
    ename:VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT set
  * [[VUID-VkComputePipelineIndirectBufferInfoNV-pipelineDeviceAddressCaptureReplay-09016]]
    If pname:pipelineDeviceAddressCaptureReplay is non-zero, the
    pname:pipeline must: have been recreated for replay
  * [[VUID-VkComputePipelineIndirectBufferInfoNV-pipelineDeviceAddressCaptureReplay-09017]]
    pname:pipelineDeviceAddressCaptureReplay must: satisfy the
    pname:alignment and pname:size requirements similar to
    pname:deviceAddress
****

include::{generated}/validity/structs/VkComputePipelineIndirectBufferInfoNV.adoc[]
--

[open,refpage='vkCmdUpdatePipelineIndirectBufferNV',desc='Update the indirect compute pipeline\'s metadata',type='protos']
--
To save a compute pipeline's metadata at a device address call:

include::{generated}/api/protos/vkCmdUpdatePipelineIndirectBufferNV.adoc[]

  * pname:commandBuffer is the command buffer into which the command will be
    recorded.
  * pname:pipelineBindPoint is a elink:VkPipelineBindPoint value specifying
    the type of pipeline whose metadata will be saved.
  * pname:pipeline is the pipeline whose metadata will be saved.

fname:vkCmdUpdatePipelineIndirectBufferNV is only allowed outside of a
render pass.
This command is treated as a "`transfer`" operation for the purposes of
synchronization barriers.
The writes to the address must: be synchronized using stages
ename:VK_PIPELINE_STAGE_2_COPY_BIT and
ename:VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV and with access masks
ename:VK_ACCESS_MEMORY_WRITE_BIT and
ename:VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV respectively before using the
results in preprocessing.

.Valid Usage
****
  * [[VUID-vkCmdUpdatePipelineIndirectBufferNV-pipelineBindPoint-09018]]
    pname:pipelineBindPoint must: be ename:VK_PIPELINE_BIND_POINT_COMPUTE
  * [[VUID-vkCmdUpdatePipelineIndirectBufferNV-pipeline-09019]]
    pname:pipeline must: have been created with
    ename:VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV flag set
  * [[VUID-vkCmdUpdatePipelineIndirectBufferNV-pipeline-09020]]
    pname:pipeline must: have been created with
    slink:VkComputePipelineIndirectBufferInfoNV structure specifying a valid
    address where its metadata will be saved
  * [[VUID-vkCmdUpdatePipelineIndirectBufferNV-deviceGeneratedComputePipelines-09021]]
    The <<features-deviceGeneratedComputePipelines,
    sname:VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV::pname:deviceGeneratedComputePipelines>>
    feature must: be enabled
****

include::{generated}/validity/protos/vkCmdUpdatePipelineIndirectBufferNV.adoc[]
--

endif::VK_NV_device_generated_commands_compute[]

[[pipelines-graphics]]
== Graphics Pipelines

Graphics pipelines consist of multiple shader stages, multiple
fixed-function pipeline stages, and a pipeline layout.

[open,refpage='vkCreateGraphicsPipelines',desc='Create graphics pipelines',type='protos']
--
:refpage: vkCreateGraphicsPipelines
:objectnameplural: graphics pipelines
:objectnamecamelcase: graphicsPipeline
:objectcount: pname:createInfoCount

To create graphics pipelines, call:

include::{generated}/api/protos/vkCreateGraphicsPipelines.adoc[]

  * pname:device is the logical device that creates the graphics pipelines.
ifndef::VKSC_VERSION_1_0[]
  * pname:pipelineCache is either dlink:VK_NULL_HANDLE, indicating that
    pipeline caching is disabled; or the handle of a valid
    <<pipelines-cache,pipeline cache>> object, in which case use of that
    cache is enabled for the duration of the command.
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
  * pname:pipelineCache is the handle of a valid <<pipelines-cache,pipeline
    cache>> object.
endif::VKSC_VERSION_1_0[]
  * pname:createInfoCount is the length of the pname:pCreateInfos and
    pname:pPipelines arrays.
  * pname:pCreateInfos is a pointer to an array of
    slink:VkGraphicsPipelineCreateInfo structures.
  * pname:pAllocator controls host memory allocation as described in the
    <<memory-allocation, Memory Allocation>> chapter.
  * pname:pPipelines is a pointer to an array of slink:VkPipeline handles in
    which the resulting graphics pipeline objects are returned.

The slink:VkGraphicsPipelineCreateInfo structure includes an array of
slink:VkPipelineShaderStageCreateInfo structures for each of the desired
active shader stages, as well as creation information for all relevant
fixed-function stages, and a pipeline layout.

ifdef::VKSC_VERSION_1_0[]
If a pipeline creation fails due to:

  * The identified pipeline not being present in pname:pipelineCache
  * The pname:pNext chain not including a slink:VkPipelineOfflineCreateInfo
    structure

the operation will continue as specified in <<pipelines-multiple, Multiple
Pipeline Creation>> and the command will return
ename:VK_ERROR_NO_PIPELINE_MATCH.
ifdef::hidden[]
// tag::scdeviation[]
  * flink:vkCreateGraphicsPipelines returns ename:VK_ERROR_NO_PIPELINE_MATCH
    if the slink:VkGraphicsPipelineCreateInfo::pname:pNext chain does not
    include a valid slink:VkPipelineOfflineCreateInfo structure <<SCID-1>>.
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

include::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]

.Valid Usage
****
ifndef::VKSC_VERSION_1_0[]
  * [[VUID-vkCreateGraphicsPipelines-flags-00720]]
    If the pname:flags member of any element of pname:pCreateInfos contains
    the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the
    pname:basePipelineIndex member of that same element is not `-1`,
    pname:basePipelineIndex must: be less than the index into
    pname:pCreateInfos that corresponds to that element
  * [[VUID-vkCreateGraphicsPipelines-flags-00721]]
    If the pname:flags member of any element of pname:pCreateInfos contains
    the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline
    must: have been created with the
    ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set
endif::VKSC_VERSION_1_0[]
ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
  * [[VUID-vkCreateGraphicsPipelines-pipelineCache-02876]]
    If pname:pipelineCache was created with
    ename:VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, host access
    to pname:pipelineCache must: be
    <<fundamentals-threadingbehavior,externally synchronized>>
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
include::{chapters}/commonvalidity/memory_reservation_request_count_common.adoc[]
****
ifdef::VKSC_VERSION_1_0[]
ifdef::hidden[]
// tag::scdeviation[]
  * flink:vkCreateGraphicsPipelines::pname:pipelineCache must: not be
    dlink:VK_NULL_HANDLE <<SCID-1>>, <<SCID-8>>.
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
[NOTE]
.Note
====
An implicit cache may be provided by the implementation or a layer.
For this reason, it is still valid to set
ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT on
pname:flags for any element of pname:pCreateInfos while passing
dlink:VK_NULL_HANDLE for pname:pipelineCache.
====
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]

include::{generated}/validity/protos/vkCreateGraphicsPipelines.adoc[]
--

[open,refpage='VkGraphicsPipelineCreateInfo',desc='Structure specifying parameters of a newly created graphics pipeline',type='structs']
--
:refpage: VkGraphicsPipelineCreateInfo

The sname:VkGraphicsPipelineCreateInfo structure is defined as:

include::{generated}/api/structs/VkGraphicsPipelineCreateInfo.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:flags is a bitmask of elink:VkPipelineCreateFlagBits specifying
    how the pipeline will be generated.
  * pname:stageCount is the number of entries in the pname:pStages array.
  * pname:pStages is a pointer to an array of pname:stageCount
    slink:VkPipelineShaderStageCreateInfo structures describing the set of
    the shader stages to be included in the graphics pipeline.
  * pname:pVertexInputState is a pointer to a
    slink:VkPipelineVertexInputStateCreateInfo structure.
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
    It is ignored if the pipeline includes a mesh shader stage.
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
ifdef::VK_EXT_vertex_input_dynamic_state[]
    It can: be `NULL` if the pipeline is created with the
    ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state set.
endif::VK_EXT_vertex_input_dynamic_state[]
  * pname:pInputAssemblyState is a pointer to a
    slink:VkPipelineInputAssemblyStateCreateInfo structure which determines
    input assembly behavior for vertex shading, as described in <<drawing,
    Drawing Commands>>.
ifdef::VK_EXT_extended_dynamic_state3[]
    If the `apiext:VK_EXT_extended_dynamic_state3` extension is enabled, it
    can: be `NULL` if the pipeline is created with both
    ename:VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, and
    ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic states set and
    <<limits-dynamicPrimitiveTopologyUnrestricted,
    pname:dynamicPrimitiveTopologyUnrestricted>> is ename:VK_TRUE.
endif::VK_EXT_extended_dynamic_state3[]
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
    It is ignored if the pipeline includes a mesh shader stage.
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  * pname:pTessellationState is a pointer to a
    slink:VkPipelineTessellationStateCreateInfo structure defining
    tessellation state used by tessellation shaders.
ifdef::VK_EXT_extended_dynamic_state2[]
    It can: be `NULL` if the pipeline is created with the
    ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state set.
endif::VK_EXT_extended_dynamic_state2[]
  * pname:pViewportState is a pointer to a
    slink:VkPipelineViewportStateCreateInfo structure defining viewport
    state used when rasterization is enabled.
ifdef::VK_EXT_extended_dynamic_state3[]
    If the `apiext:VK_EXT_extended_dynamic_state3` extension is enabled, it
    can: be `NULL` if the pipeline is created with both
    ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, and
    ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic states set.
endif::VK_EXT_extended_dynamic_state3[]
  * pname:pRasterizationState is a pointer to a
    slink:VkPipelineRasterizationStateCreateInfo structure defining
    rasterization state.
ifdef::VK_EXT_extended_dynamic_state3[]
    If the `apiext:VK_EXT_extended_dynamic_state3` extension is enabled, it
    can: be `NULL` if the pipeline is created with all of
    ename:VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT,
    ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE,
    ename:VK_DYNAMIC_STATE_POLYGON_MODE_EXT,
    ename:VK_DYNAMIC_STATE_CULL_MODE, ename:VK_DYNAMIC_STATE_FRONT_FACE,
    ename:VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE,
    ename:VK_DYNAMIC_STATE_DEPTH_BIAS, and ename:VK_DYNAMIC_STATE_LINE_WIDTH
    dynamic states set.
endif::VK_EXT_extended_dynamic_state3[]
  * pname:pMultisampleState is a pointer to a
    slink:VkPipelineMultisampleStateCreateInfo structure defining
    multisample state used when rasterization is enabled.
ifdef::VK_EXT_extended_dynamic_state3[]
    If the `apiext:VK_EXT_extended_dynamic_state3` extension is enabled, it
    can: be `NULL` if the pipeline is created with all of
    ename:VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT,
    ename:VK_DYNAMIC_STATE_SAMPLE_MASK_EXT, and
    ename:VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic states set,
    and either <<features-alphaToOne,alphaToOne>> is disabled on the device
    or ename:VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT is set, in which case
    slink:VkPipelineMultisampleStateCreateInfo::pname:sampleShadingEnable is
    assumed to be ename:VK_FALSE.
endif::VK_EXT_extended_dynamic_state3[]
  * pname:pDepthStencilState is a pointer to a
    slink:VkPipelineDepthStencilStateCreateInfo structure defining
    depth/stencil state used when rasterization is enabled for depth or
    stencil attachments accessed during rendering.
ifdef::VK_EXT_extended_dynamic_state3[]
    If the `apiext:VK_EXT_extended_dynamic_state3` extension is enabled, it
    can: be `NULL` if the pipeline is created with all of
    ename:VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE,
    ename:VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE,
    ename:VK_DYNAMIC_STATE_DEPTH_COMPARE_OP,
    ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE,
    ename:VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE,
    ename:VK_DYNAMIC_STATE_STENCIL_OP, and
    ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic states set.
endif::VK_EXT_extended_dynamic_state3[]
  * pname:pColorBlendState is a pointer to a
    slink:VkPipelineColorBlendStateCreateInfo structure defining color blend
    state used when rasterization is enabled for any color attachments
    accessed during rendering.
ifdef::VK_EXT_extended_dynamic_state3[]
    If the `apiext:VK_EXT_extended_dynamic_state3` extension is enabled, it
    can: be `NULL` if the pipeline is created with all of
    ename:VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT,
    ename:VK_DYNAMIC_STATE_LOGIC_OP_EXT,
    ename:VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT,
    ename:VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT,
    ename:VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and
    ename:VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic states set.
endif::VK_EXT_extended_dynamic_state3[]
  * pname:pDynamicState is a pointer to a
    slink:VkPipelineDynamicStateCreateInfo structure defining which
    properties of the pipeline state object are dynamic and can: be changed
    independently of the pipeline state.
    This can: be `NULL`, which means no state in the pipeline is considered
    dynamic.
  * pname:layout is the description of binding locations used by both the
    pipeline and descriptor sets used with the pipeline.
  * pname:renderPass is a handle to a render pass object describing the
    environment in which the pipeline will be used.
    The pipeline must: only be used with a render pass instance compatible
    with the one provided.
    See <<renderpass-compatibility,Render Pass Compatibility>> for more
    information.
  * pname:subpass is the index of the subpass in the render pass where this
    pipeline will be used.
  * pname:basePipelineHandle is a pipeline to derive from.
ifdef::VKSC_VERSION_1_0[]
    This is not used in Vulkan SC <<SCID-8>>.
endif::VKSC_VERSION_1_0[]
  * pname:basePipelineIndex is an index into the pname:pCreateInfos
    parameter to use as a pipeline to derive from.
ifdef::VKSC_VERSION_1_0[]
    This is not used in Vulkan SC <<SCID-8>>.
endif::VKSC_VERSION_1_0[]

The parameters pname:basePipelineHandle and pname:basePipelineIndex are
described in more detail in <<pipelines-pipeline-derivatives,Pipeline
Derivatives>>.


ifdef::VK_NV_glsl_shader[]
If any shader stage fails to compile,
ifdef::VK_EXT_debug_report[]
the compile log will be reported back to the application, and
endif::VK_EXT_debug_report[]
ename:VK_ERROR_INVALID_SHADER_NV will be generated.
endif::VK_NV_glsl_shader[]

ifdef::VK_EXT_extended_dynamic_state3[]
[NOTE]
.Note
====
With `apiext:VK_EXT_extended_dynamic_state3`, it is possible that many of
the sname:VkGraphicsPipelineCreateInfo members above can: be `NULL` because
all their state is dynamic and therefore ignored.
This is optional so the application can: still use a valid pointer if it
needs to set the pname:pNext or pname:flags fields to specify state for
other extensions.
====
endif::VK_EXT_extended_dynamic_state3[]

[[pipelines-graphics-subsets]]
The state required for a graphics pipeline is divided into
<<pipelines-graphics-subsets-vertex-input, vertex input state>>,
<<pipelines-graphics-subsets-pre-rasterization,pre-rasterization shader
state>>, <<pipelines-graphics-subsets-fragment-shader,fragment shader
state>>, and <<pipelines-graphics-subsets-fragment-output,fragment output
state>>.

[[pipelines-graphics-subsets-vertex-input]]
.Vertex Input State
Vertex input state is defined by:

  * slink:VkPipelineVertexInputStateCreateInfo
  * slink:VkPipelineInputAssemblyStateCreateInfo

ifndef::VK_EXT_mesh_shader[]
This state must: be specified to create a
<<pipelines-graphics-subsets-complete,complete graphics pipeline>>.
endif::VK_EXT_mesh_shader[]

ifdef::VK_EXT_mesh_shader[]
If
ifdef::VK_EXT_graphics_pipeline_library[]
this pipeline specifies
<<pipelines-graphics-subsets-pre-rasterization,pre-rasterization state>>
either directly or by including it as a pipeline library and its
endif::VK_EXT_graphics_pipeline_library[]
pname:pStages includes a vertex shader, this state must: be specified to
create a <<pipelines-graphics-subsets-complete,complete graphics pipeline>>.
endif::VK_EXT_mesh_shader[]

ifdef::VK_EXT_graphics_pipeline_library[]
If a pipeline includes
ename:VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT in
slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags either explicitly
or as a default, and either the conditions requiring this state for a
<<pipelines-graphics-subsets-complete,complete graphics pipeline>> are met
or this pipeline does not specify
<<pipelines-graphics-subsets-pre-rasterization,pre-rasterization state>> in
any way, that pipeline must: specify this state directly.
endif::VK_EXT_graphics_pipeline_library[]


[[pipelines-graphics-subsets-pre-rasterization]]
.Pre-Rasterization Shader State
Pre-rasterization shader state is defined by:

  * slink:VkPipelineShaderStageCreateInfo entries for:
  ** Vertex shaders
  ** Tessellation control shaders
  ** Tessellation evaluation shaders
  ** Geometry shaders
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  ** Task shaders
  ** Mesh shaders
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
ifdef::VK_EXT_graphics_pipeline_library[]
  * Within the slink:VkPipelineLayout, all descriptor sets with
    pre-rasterization shader bindings if
    ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT was specified.
  ** If ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT was not
     specified, the full pipeline layout must be specified.
endif::VK_EXT_graphics_pipeline_library[]
ifndef::VK_EXT_graphics_pipeline_library[]
  * Within the slink:VkPipelineLayout, the full pipeline layout must be
    specified.
endif::VK_EXT_graphics_pipeline_library[]
  * slink:VkPipelineViewportStateCreateInfo
  * slink:VkPipelineRasterizationStateCreateInfo
  * slink:VkPipelineTessellationStateCreateInfo
  * slink:VkRenderPass and pname:subpass parameter
ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
  * The pname:viewMask parameter of slink:VkPipelineRenderingCreateInfo
    (formats are ignored)
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
ifdef::VK_EXT_discard_rectangles[]
  * slink:VkPipelineDiscardRectangleStateCreateInfoEXT
endif::VK_EXT_discard_rectangles[]
ifdef::VK_KHR_fragment_shading_rate[]
  * slink:VkPipelineFragmentShadingRateStateCreateInfoKHR
endif::VK_KHR_fragment_shading_rate[]

This state must: be specified to create a
<<pipelines-graphics-subsets-complete,complete graphics pipeline>>.

ifdef::VK_EXT_graphics_pipeline_library[]
If either the pname:pNext chain includes a
slink:VkGraphicsPipelineLibraryCreateInfoEXT structure with
ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT
included in pname:flags, or it is not specified and would default to include
that value, this state must: be specified in the pipeline.
endif::VK_EXT_graphics_pipeline_library[]


[[pipelines-graphics-subsets-fragment-shader]]
.Fragment Shader State
Fragment shader state is defined by:

  * A slink:VkPipelineShaderStageCreateInfo entry for the fragment shader
ifdef::VK_EXT_graphics_pipeline_library[]
  * Within the slink:VkPipelineLayout, all descriptor sets with fragment
    shader bindings if
    ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT was specified.
  ** If ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT was not
     specified, the full pipeline layout must be specified.
endif::VK_EXT_graphics_pipeline_library[]
ifndef::VK_EXT_graphics_pipeline_library[]
  * Within the slink:VkPipelineLayout, the full pipeline layout must be
    specified.
endif::VK_EXT_graphics_pipeline_library[]
  * slink:VkPipelineMultisampleStateCreateInfo
ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
    if <<primsrast-sampleshading, sample shading>> is enabled or
    pname:renderpass is not dlink:VK_NULL_HANDLE
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
  * slink:VkPipelineDepthStencilStateCreateInfo
  * slink:VkRenderPass and pname:subpass parameter
ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
  * The pname:viewMask parameter of slink:VkPipelineRenderingCreateInfo
    (formats are ignored)
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
ifdef::VK_KHR_fragment_shading_rate[]
  * slink:VkPipelineFragmentShadingRateStateCreateInfoKHR
ifdef::VK_NV_fragment_shading_rate_enums[]
  * slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV
endif::VK_NV_fragment_shading_rate_enums[]
endif::VK_KHR_fragment_shading_rate[]
ifdef::VK_NV_representative_fragment_test[]
  * slink:VkPipelineRepresentativeFragmentTestStateCreateInfoNV
endif::VK_NV_representative_fragment_test[]
ifdef::VK_KHR_fragment_shading_rate[]
  * Inclusion/omission of the
    ename:VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
    flag
endif::VK_KHR_fragment_shading_rate[]
ifdef::VK_EXT_fragment_density_map[]
  * Inclusion/omission of the
    ename:VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT
    flag
endif::VK_EXT_fragment_density_map[]

If
ifdef::VK_EXT_graphics_pipeline_library[]
a pipeline specifies
<<pipelines-graphics-subsets-pre-rasterization,pre-rasterization state>>
either directly or by including it as a pipeline library and
endif::VK_EXT_graphics_pipeline_library[]
pname:rasterizerDiscardEnable is set to ename:VK_FALSE
ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[]
or ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE is used,
endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[]
ifdef::VK_EXT_graphics_pipeline_library[]
endif::VK_EXT_graphics_pipeline_library[]
this state must: be specified to create a
<<pipelines-graphics-subsets-complete,complete graphics pipeline>>.

ifdef::VK_EXT_graphics_pipeline_library[]
If a pipeline includes
ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT in
slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags either explicitly
or as a default, and either the conditions requiring this state for a
<<pipelines-graphics-subsets-complete,complete graphics pipeline>> are met
or this pipeline does not specify
<<pipelines-graphics-subsets-pre-rasterization,pre-rasterization state>> in
any way, that pipeline must: specify this state directly.
endif::VK_EXT_graphics_pipeline_library[]


[[pipelines-graphics-subsets-fragment-output]]
.Fragment Output State
Fragment output state is defined by:

  * slink:VkPipelineColorBlendStateCreateInfo
  * slink:VkRenderPass and pname:subpass parameter
  * slink:VkPipelineMultisampleStateCreateInfo
ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
  * slink:VkPipelineRenderingCreateInfo
ifdef::VK_AMD_mixed_attachment_samples[]
  * slink:VkAttachmentSampleCountInfoAMD
endif::VK_AMD_mixed_attachment_samples[]
ifdef::VK_NV_framebuffer_mixed_samples[]
  * slink:VkAttachmentSampleCountInfoNV
endif::VK_NV_framebuffer_mixed_samples[]
ifdef::VK_ANDROID_external_format_resolve[]
  * slink:VkExternalFormatANDROID
endif::VK_ANDROID_external_format_resolve[]
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
ifdef::VK_EXT_attachment_feedback_loop_layout[]
  * Inclusion/omission of the
    ename:VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT and
    ename:VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT
    flags
endif::VK_EXT_attachment_feedback_loop_layout[]

If
ifdef::VK_EXT_graphics_pipeline_library[]
a pipeline specifies
<<pipelines-graphics-subsets-pre-rasterization,pre-rasterization state>>
either directly or by including it as a pipeline library and
endif::VK_EXT_graphics_pipeline_library[]
pname:rasterizerDiscardEnable is set to ename:VK_FALSE
ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[]
or ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE is used,
endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[]
ifdef::VK_EXT_graphics_pipeline_library[]
endif::VK_EXT_graphics_pipeline_library[]
this state must: be specified to create a
<<pipelines-graphics-subsets-complete,complete graphics pipeline>>.

ifdef::VK_EXT_graphics_pipeline_library[]
If a pipeline includes
ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT in
slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags either explicitly
or as a default, and either the conditions requiring this state for a
<<pipelines-graphics-subsets-complete,complete graphics pipeline>> are met
or this pipeline does not specify
<<pipelines-graphics-subsets-pre-rasterization,pre-rasterization state>> in
any way, that pipeline must: specify this state directly.
endif::VK_EXT_graphics_pipeline_library[]


[[pipelines-graphics-subsets-dynamic-state]]
.Dynamic State
Dynamic state values set via pname:pDynamicState must: be ignored if the
state they correspond to is not otherwise statically set by one of the state
subsets used to create the pipeline.
ifdef::VK_EXT_graphics_pipeline_library[]
Additionally, setting dynamic state values must: not modify whether state in
a linked library is static or dynamic; this is set and unchangeable when the
library is created.
endif::VK_EXT_graphics_pipeline_library[]
For example, if a pipeline only included
<<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
state>>, then any dynamic state value corresponding to depth or stencil
testing has no effect.
ifdef::VK_EXT_graphics_pipeline_library[]
Any linked library that has dynamic state enabled that same dynamic state
must: also be enabled in all the other linked libraries to which that
dynamic state applies.
endif::VK_EXT_graphics_pipeline_library[]

[[pipelines-graphics-subsets-complete]]
.Complete Graphics Pipelines

A complete graphics pipeline always includes
<<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
state>>, with other subsets included depending on that state as specified in
the above sections.

ifdef::VK_EXT_graphics_pipeline_library[]
.Graphics Pipeline Library Layouts

If different subsets are linked together with pipeline layouts created with
ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, the final
effective pipeline layout is effectively the union of the linked pipeline
layouts.
When binding descriptor sets for this pipeline, the pipeline layout used
must: be compatible with this union.
This pipeline layout can: be overridden when linking with
ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT by providing a
slink:VkPipelineLayout that is <<descriptorsets-compatibility,compatible>>
with this union other than
ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, or when linking
without ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT by providing
a slink:VkPipelineLayout that is fully
<<descriptorsets-compatibility,compatible>> with this union.
endif::VK_EXT_graphics_pipeline_library[]

ifdef::VK_KHR_maintenance5[]
If a slink:VkPipelineCreateFlags2CreateInfoKHR structure is present in the
pname:pNext chain, slink:VkPipelineCreateFlags2CreateInfoKHR::pname:flags
from that structure is used instead of pname:flags from this structure.
endif::VK_KHR_maintenance5[]

ifdef::VKSC_VERSION_1_0[]
In Vulkan SC, the pipeline compilation process occurs
<<pipelines-offline-compilation,offline>> and the pname:pStages are not
needed at runtime and may: be omitted.
If omitted, pname:stageCount must: be set to `0` and pname:pStages must: be
`NULL`.
If provided, the values must: match the values specified to the offline
compiler.
endif::VKSC_VERSION_1_0[]

.Valid Usage
****
:pipelineType: graphics
include::{chapters}/commonvalidity/pipeline_create_info_common.adoc[]
  * [[VUID-VkGraphicsPipelineCreateInfo-stage-02096]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> the pname:stage member of one element
    of pname:pStages must: be ename:VK_SHADER_STAGE_VERTEX_BIT
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
    or ename:VK_SHADER_STAGE_MESH_BIT_EXT
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-02095]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> the geometric shader stages provided in
    pname:pStages must: be either from the mesh shading pipeline
    (pname:stage is ename:VK_SHADER_STAGE_TASK_BIT_EXT or
    ename:VK_SHADER_STAGE_MESH_BIT_EXT) or from the primitive shading
    pipeline (pname:stage is ename:VK_SHADER_STAGE_VERTEX_BIT,
    ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT,
    ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, or
    ename:VK_SHADER_STAGE_GEOMETRY_BIT)
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
ifdef::VK_NV_mesh_shader+VK_EXT_mesh_shader[]
  * [[VUID-VkGraphicsPipelineCreateInfo-TaskNV-07063]]
    The shader stages for ename:VK_SHADER_STAGE_TASK_BIT_EXT or
    ename:VK_SHADER_STAGE_MESH_BIT_EXT must: use either the code:TaskNV and
    code:MeshNV {ExecutionModel} or the code:TaskEXT and code:MeshEXT
    {ExecutionModel}, but must: not use both
endif::VK_NV_mesh_shader+VK_EXT_mesh_shader[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00729]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and pname:pStages includes a
    tessellation control shader stage, it must: include a tessellation
    evaluation shader stage
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00730]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and pname:pStages includes a
    tessellation evaluation shader stage, it must: include a tessellation
    control shader stage
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-09022]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and pname:pStages includes a
    tessellation control shader stage,
ifdef::VK_EXT_extended_dynamic_state3[]
    and the `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled
    or the ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state is
    not set,
endif::VK_EXT_extended_dynamic_state3[]
    pname:pTessellationState must: be a valid pointer to a valid
    slink:VkPipelineTessellationStateCreateInfo structure
ifdef::VK_EXT_extended_dynamic_state3[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pTessellationState-09023]]
    If pname:pTessellationState is not `NULL` it must: be a pointer to a
    valid slink:VkPipelineTessellationStateCreateInfo structure
endif::VK_EXT_extended_dynamic_state3[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00732]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and pname:pStages includes tessellation
    shader stages, the shader code of at least one stage must: contain an
    code:OpExecutionMode instruction specifying the type of subdivision in
    the pipeline
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00733]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and pname:pStages includes tessellation
    shader stages, and the shader code of both stages contain an
    code:OpExecutionMode instruction specifying the type of subdivision in
    the pipeline, they must: both specify the same subdivision mode
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00734]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and pname:pStages includes tessellation
    shader stages, the shader code of at least one stage must: contain an
    code:OpExecutionMode instruction specifying the output patch size in the
    pipeline
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00735]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and pname:pStages includes tessellation
    shader stages, and the shader code of both contain an
    code:OpExecutionMode instruction specifying the out patch size in the
    pipeline, they must: both specify the same patch size
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-08888]]
    If the pipeline is being created with
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>> and <<pipelines-graphics-subsets-vertex-input, vertex input
    state>> and pname:pStages includes tessellation shader stages,
ifdef::VK_EXT_extended_dynamic_state3[]
    and either ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is
    not enabled or
    <<limits-dynamicPrimitiveTopologyUnrestricted,pname:dynamicPrimitiveTopologyUnrestricted>>
    is ename:VK_FALSE,
endif::VK_EXT_extended_dynamic_state3[]
    the pname:topology member of pname:pInputAssembly must: be
    ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST
  * [[VUID-VkGraphicsPipelineCreateInfo-topology-08889]]
    If the pipeline is being created with
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>> and <<pipelines-graphics-subsets-vertex-input, vertex input
    state>> and the pname:topology member of pname:pInputAssembly is
    ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST,
ifdef::VK_EXT_extended_dynamic_state3[]
    and either ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is
    not enabled or
    <<limits-dynamicPrimitiveTopologyUnrestricted,pname:dynamicPrimitiveTopologyUnrestricted>>
    is ename:VK_FALSE,
endif::VK_EXT_extended_dynamic_state3[]
    then pname:pStages must: include tessellation shader stages
  * [[VUID-VkGraphicsPipelineCreateInfo-TessellationEvaluation-07723]]
    If the pipeline is being created with a code:TessellationEvaluation
    {ExecutionModel}, no code:Geometry {ExecutionModel}, uses the
    code:PointMode {ExecutionMode}, and
    <<features-shaderTessellationAndGeometryPointSize,
    pname:shaderTessellationAndGeometryPointSize>> is enabled, a
    code:PointSize decorated variable must: be written to
ifdef::VK_KHR_maintenance5[]
    if <<features-maintenance5, pname:maintenance5>> is not enabled
endif::VK_KHR_maintenance5[]
  * [[VUID-VkGraphicsPipelineCreateInfo-topology-08773]]
    If the pipeline is being created with a code:Vertex {ExecutionModel} and
    no code:TessellationEvaluation or code:Geometry {ExecutionModel}, and
    the pname:topology member of pname:pInputAssembly is
    ename:VK_PRIMITIVE_TOPOLOGY_POINT_LIST,
ifdef::VK_EXT_extended_dynamic_state3[]
    and either ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is
    not enabled or
    <<limits-dynamicPrimitiveTopologyUnrestricted,pname:dynamicPrimitiveTopologyUnrestricted>>
    is ename:VK_FALSE,
endif::VK_EXT_extended_dynamic_state3[]
    a code:PointSize decorated variable must: be written to
ifdef::VK_KHR_maintenance5[]
    if <<features-maintenance5, pname:maintenance5>> is not enabled
endif::VK_KHR_maintenance5[]
ifdef::VK_KHR_maintenance5[]
  * [[VUID-VkGraphicsPipelineCreateInfo-maintenance5-08775]]
    If <<features-maintenance5, pname:maintenance5>> is enabled and a
    code:PointSize decorated variable is written to, all execution paths
    must: write to a code:PointSize decorated variable
endif::VK_KHR_maintenance5[]
  * [[VUID-VkGraphicsPipelineCreateInfo-TessellationEvaluation-07724]]
    If the pipeline is being created with a code:TessellationEvaluation
    {ExecutionModel}, no code:Geometry {ExecutionModel}, uses the
    code:PointMode {ExecutionMode}, and
    <<features-shaderTessellationAndGeometryPointSize,
    pname:shaderTessellationAndGeometryPointSize>> is not enabled, a
    code:PointSize decorated variable must: not be written to
  * [[VUID-VkGraphicsPipelineCreateInfo-shaderTessellationAndGeometryPointSize-08776]]
    If the pipeline is being created with a code:Geometry {ExecutionModel},
    uses the code:OutputPoints {ExecutionMode}, and
    <<features-shaderTessellationAndGeometryPointSize,
    pname:shaderTessellationAndGeometryPointSize>> is enabled, a
    code:PointSize decorated variable must: be written to for every vertex
    emitted
ifdef::VK_KHR_maintenance5[]
    if <<features-maintenance5, pname:maintenance5>> is not enabled
endif::VK_KHR_maintenance5[]
  * [[VUID-VkGraphicsPipelineCreateInfo-Geometry-07726]]
    If the pipeline is being created with a code:Geometry {ExecutionModel},
    uses the code:OutputPoints {ExecutionMode}, and
    <<features-shaderTessellationAndGeometryPointSize,
    pname:shaderTessellationAndGeometryPointSize>> is not enabled, a
    code:PointSize decorated variable must: not be written to
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00738]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and pname:pStages includes a geometry
    shader stage, and does not include any tessellation shader stages, its
    shader code must: contain an code:OpExecutionMode instruction specifying
    an input primitive type that is <<shaders-geometry-execution,
    compatible>> with the primitive topology specified in
    pname:pInputAssembly
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00739]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and pname:pStages includes a geometry
    shader stage, and also includes tessellation shader stages, its shader
    code must: contain an code:OpExecutionMode instruction specifying an
    input primitive type that is <<shaders-geometry-execution, compatible>>
    with the primitive topology that is output by the tessellation stages
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00740]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>,
    it includes both a fragment shader and a geometry shader, and the
    fragment shader code reads from an input variable that is decorated with
    code:PrimitiveId, then the geometry shader code must: write to a
    matching output variable, decorated with code:PrimitiveId, in all
    execution paths
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  * [[VUID-VkGraphicsPipelineCreateInfo-PrimitiveId-06264]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, it includes a mesh shader and the
    fragment shader code reads from an input variable that is decorated with
    code:PrimitiveId, then the mesh shader code must: write to a matching
    output variable, decorated with code:PrimitiveId, in all execution paths
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06038]]
    If pname:renderPass is not dlink:VK_NULL_HANDLE and the pipeline is
    being created with <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> the fragment shader must: not read from any
    input attachment that is defined as ename:VK_ATTACHMENT_UNUSED in
    pname:subpass
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00742]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and multiple pre-rasterization shader
    stages are included in pname:pStages, the shader code for the entry
    points identified by those pname:pStages and the rest of the state
    identified by this structure must: adhere to the pipeline linking rules
    described in the <<interfaces,Shader Interfaces>> chapter
  * [[VUID-VkGraphicsPipelineCreateInfo-None-04889]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>,
    the fragment shader and last
    <<pipelines-graphics-subsets-pre-rasterization,pre-rasterization shader
    stage>> and any relevant state must: adhere to the pipeline linking
    rules described in the <<interfaces,Shader Interfaces>> chapter
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06041]]
    If pname:renderPass is not dlink:VK_NULL_HANDLE, and the pipeline is
    being created with <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, then for each color attachment in the
    subpass, if the <<potential-format-features,potential format features>>
    of the format of the corresponding attachment description do not contain
    ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the
    pname:blendEnable member of the corresponding element of the
    pname:pAttachments member of pname:pColorBlendState must: be
    ename:VK_FALSE
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-07609]]
    If pname:renderPass is not dlink:VK_NULL_HANDLE, and the pipeline is
    being created with <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, and the pname:pColorBlendState
    pointer is not `NULL`, and the subpass uses color attachments, the
    pname:attachmentCount member of pname:pColorBlendState must: be equal to
    the pname:colorAttachmentCount used to create pname:subpass
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04130]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and pname:pViewportState->pViewports
    is not dynamic, then pname:pViewportState->pViewports must: be a valid
    pointer to an array of pname:pViewportState->viewportCount valid
    sname:VkViewport structures
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04131]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and pname:pViewportState->pScissors is
    not dynamic, then pname:pViewportState->pScissors must: be a valid
    pointer to an array of pname:pViewportState->scissorCount sname:VkRect2D
    structures
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and the <<features-wideLines,
    pname:wideLines>> feature is not enabled, and no element of the
    pname:pDynamicStates member of pname:pDynamicState is
    ename:VK_DYNAMIC_STATE_LINE_WIDTH, the pname:lineWidth member of
    pname:pRasterizationState must: be `1.0`
  * [[VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-09024]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and
ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[]
    the ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state is
    enabled or
endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[]
    the pname:rasterizerDiscardEnable member of pname:pRasterizationState is
    ename:VK_FALSE,
ifdef::VK_EXT_extended_dynamic_state3[]
    and either the `apiext:VK_EXT_extended_dynamic_state3` extension is not
    enabled, or either the ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT or
    ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic states are not set,
endif::VK_EXT_extended_dynamic_state3[]
    pname:pViewportState must: be a valid pointer to a valid
    slink:VkPipelineViewportStateCreateInfo structure
ifdef::VK_EXT_extended_dynamic_state3[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pViewportState-09025]]
    If pname:pViewportState is not `NULL` it must: be a valid pointer to a
    valid slink:VkPipelineViewportStateCreateInfo structure
endif::VK_EXT_extended_dynamic_state3[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-09026]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>,
ifdef::VK_EXT_extended_dynamic_state3[]
    and the `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled
    or any of the ename:VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT,
    ename:VK_DYNAMIC_STATE_SAMPLE_MASK_EXT, or
    ename:VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic states is
    not set, or <<features-alphaToOne,alphaToOne>> is enabled on the device
    and ename:VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT is not set,
endif::VK_EXT_extended_dynamic_state3[]
    pname:pMultisampleState must: be a valid pointer to a valid
    slink:VkPipelineMultisampleStateCreateInfo structure
  * [[VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-09027]]
    If pname:pMultisampleState is not `NULL` is must: be a valid pointer to
    a valid slink:VkPipelineMultisampleStateCreateInfo structure
  * [[VUID-VkGraphicsPipelineCreateInfo-alphaToCoverageEnable-08891]]
    If the pipeline is being created with
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>,
    the
    slink:VkPipelineMultisampleStateCreateInfo::pname:alphaToCoverageEnable
    is not ignored and is ename:VK_TRUE, then the
    <<interfaces-fragmentoutput, Fragment Output Interface>> must: contain a
    variable for the alpha code:Component word in code:Location 0 at
    code:Index 0
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-09028]]
    If pname:renderPass is not dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-fragment-shader, fragment
    shader state>>, and pname:subpass uses a depth/stencil attachment, and
ifdef::VK_EXT_extended_dynamic_state3[]
    the `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled or,
    any of the ename:VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE,
    ename:VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE,
    ename:VK_DYNAMIC_STATE_DEPTH_COMPARE_OP,
    ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE,
    ename:VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE,
    ename:VK_DYNAMIC_STATE_STENCIL_OP, or
    ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic states are not set,
endif::VK_EXT_extended_dynamic_state3[]
    pname:pDepthStencilState must: be a valid pointer to a valid
    slink:VkPipelineDepthStencilStateCreateInfo structure
  * [[VUID-VkGraphicsPipelineCreateInfo-pDepthStencilState-09029]]
    If pname:pDepthStencilState is not `NULL` it must: be a valid pointer to
    a valid slink:VkPipelineDepthStencilStateCreateInfo structure
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-09030]]
    If pname:renderPass is not dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-fragment-output, fragment
    output interface state>>, and pname:subpass uses color attachments,
ifdef::VK_EXT_extended_dynamic_state3[]
    and `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled, or
    any of the ename:VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT,
    ename:VK_DYNAMIC_STATE_LOGIC_OP_EXT,
    ename:VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT,
    ename:VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT,
    ename:VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, or
    ename:VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic states are not set,
endif::VK_EXT_extended_dynamic_state3[]
    pname:pColorBlendState must: be a valid pointer to a valid
    slink:VkPipelineColorBlendStateCreateInfo structure
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, the <<features-depthBiasClamp,
    pname:depthBiasClamp>> feature is not enabled, no element of the
    pname:pDynamicStates member of pname:pDynamicState is
    ename:VK_DYNAMIC_STATE_DEPTH_BIAS, and the pname:depthBiasEnable member
    of pname:pRasterizationState is ename:VK_TRUE, the pname:depthBiasClamp
    member of pname:pRasterizationState must: be `0.0`
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-02510]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>>,
ifdef::VK_EXT_depth_range_unrestricted[]
    the `apiext:VK_EXT_depth_range_unrestricted` extension is not enabled
endif::VK_EXT_depth_range_unrestricted[]
    and no element of the pname:pDynamicStates member of pname:pDynamicState
    is ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS, and the
    pname:depthBoundsTestEnable member of pname:pDepthStencilState is
    ename:VK_TRUE, the pname:minDepthBounds and pname:maxDepthBounds members
    of pname:pDepthStencilState must: be between `0.0` and `1.0`, inclusive
ifdef::VK_EXT_sample_locations[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07610]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> or <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, and pname:rasterizationSamples and
    pname:sampleLocationsInfo are not dynamic, and
    slink:VkPipelineSampleLocationsStateCreateInfoEXT::pname:sampleLocationsEnable
    included in the pname:pNext chain of pname:pMultisampleState is
    ename:VK_TRUE, pname:sampleLocationsInfo.sampleLocationGridSize.width
    must: evenly divide
    slink:VkMultisamplePropertiesEXT::pname:sampleLocationGridSize.width as
    returned by flink:vkGetPhysicalDeviceMultisamplePropertiesEXT with a
    pname:samples parameter equaling pname:rasterizationSamples
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07611]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> or <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, and pname:rasterizationSamples and
    pname:sampleLocationsInfo are not dynamic, and
    slink:VkPipelineSampleLocationsStateCreateInfoEXT::pname:sampleLocationsEnable
    the included in the pname:pNext chain of pname:pMultisampleState is
    ename:VK_TRUE or ename:VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT is
    used, pname:sampleLocationsInfo.sampleLocationGridSize.height must:
    evenly divide
    slink:VkMultisamplePropertiesEXT::pname:sampleLocationGridSize.height as
    returned by flink:vkGetPhysicalDeviceMultisamplePropertiesEXT with a
    pname:samples parameter equaling pname:rasterizationSamples
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07612]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> or <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, and pname:rasterizationSamples and
    pname:sampleLocationsInfo are not dynamic, and
    slink:VkPipelineSampleLocationsStateCreateInfoEXT::pname:sampleLocationsEnable
    included in the pname:pNext chain of pname:pMultisampleState is
    ename:VK_TRUE or ename:VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT is
    used, pname:sampleLocationsInfo.sampleLocationsPerPixel must: equal
    pname:rasterizationSamples
  * [[VUID-VkGraphicsPipelineCreateInfo-sampleLocationsEnable-01524]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>>, and the pname:sampleLocationsEnable member of a
    slink:VkPipelineSampleLocationsStateCreateInfoEXT structure included in
    the pname:pNext chain of pname:pMultisampleState is ename:VK_TRUE, the
    fragment shader code must: not statically use the extended instruction
    code:InterpolateAtSample
endif::VK_EXT_sample_locations[]
ifdef::VK_EXT_multisampled_render_to_single_sampled[]
  * [[VUID-VkGraphicsPipelineCreateInfo-multisampledRenderToSingleSampled-06853]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, and none of the
    `apiext:VK_AMD_mixed_attachment_samples` extension, the
    `apiext:VK_NV_framebuffer_mixed_samples` extension, or the
    <<features-multisampledRenderToSingleSampled,
    pname:multisampledRenderToSingleSampled>> feature are enabled,
    pname:rasterizationSamples is not dynamic, and if pname:subpass uses
    color and/or depth/stencil attachments, then the
    pname:rasterizationSamples member of pname:pMultisampleState must: be
    the same as the sample count for those subpass attachments
endif::VK_EXT_multisampled_render_to_single_sampled[]
ifdef::VK_AMD_mixed_attachment_samples[]
  * [[VUID-VkGraphicsPipelineCreateInfo-subpass-01505]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, and the
    `apiext:VK_AMD_mixed_attachment_samples` extension is enabled,
    pname:rasterizationSamples is not dynamic, and if pname:subpass uses
    color and/or depth/stencil attachments, then the
    pname:rasterizationSamples member of pname:pMultisampleState must: equal
    the maximum of the sample counts of those subpass attachments
endif::VK_AMD_mixed_attachment_samples[]
ifdef::VK_EXT_multisampled_render_to_single_sampled[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06854]]
    If pname:renderPass is not dlink:VK_NULL_HANDLE, the
    `apiext:VK_EXT_multisampled_render_to_single_sampled` extension is
    enabled, pname:rasterizationSamples is not dynamic, and pname:subpass
    has a slink:VkMultisampledRenderToSingleSampledInfoEXT structure
    included in the slink:VkSubpassDescription2::pname:pNext chain with
    pname:multisampledRenderToSingleSampledEnable equal to ename:VK_TRUE,
    then the pname:rasterizationSamples member of pname:pMultisampleState
    must: be equal to
    slink:VkMultisampledRenderToSingleSampledInfoEXT::pname:rasterizationSamples
endif::VK_EXT_multisampled_render_to_single_sampled[]
ifdef::VK_NV_framebuffer_mixed_samples[]
  * [[VUID-VkGraphicsPipelineCreateInfo-subpass-01411]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, the
    `apiext:VK_NV_framebuffer_mixed_samples` extension is enabled,
    pname:rasterizationSamples is not dynamic, and if pname:subpass has a
    depth/stencil attachment and depth test, stencil test, or depth bounds
    test are enabled, then the pname:rasterizationSamples member of
    pname:pMultisampleState must: be the same as the sample count of the
    depth/stencil attachment
  * [[VUID-VkGraphicsPipelineCreateInfo-subpass-01412]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, the
    `apiext:VK_NV_framebuffer_mixed_samples` extension is enabled,
    pname:rasterizationSamples is not dynamic, and if pname:subpass has any
    color attachments, then the pname:rasterizationSamples member of
    pname:pMultisampleState must: be greater than or equal to the sample
    count for those subpass attachments
endif::VK_NV_framebuffer_mixed_samples[]
ifdef::VK_NV_coverage_reduction_mode[]
  * [[VUID-VkGraphicsPipelineCreateInfo-coverageReductionMode-02722]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, the
    `apiext:VK_NV_coverage_reduction_mode` extension is enabled, and
    pname:rasterizationSamples is not dynamic, the coverage reduction mode
    specified by
    slink:VkPipelineCoverageReductionStateCreateInfoNV::pname:coverageReductionMode,
    the pname:rasterizationSamples member of pname:pMultisampleState and the
    sample counts for the color and depth/stencil attachments (if the
    subpass has them) must: be a valid combination returned by
    fname:vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV
endif::VK_NV_coverage_reduction_mode[]
  * [[VUID-VkGraphicsPipelineCreateInfo-subpass-00758]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, pname:rasterizationSamples is not
    dynamic, and pname:subpass does not use any color and/or depth/stencil
    attachments, then the pname:rasterizationSamples member of
    pname:pMultisampleState must: follow the rules for a
    <<renderpass-noattachments, zero-attachment subpass>>
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06046]]
    If pname:renderPass is not dlink:VK_NULL_HANDLE, pname:subpass must: be
    a valid subpass within pname:renderPass
ifdef::VK_VERSION_1_1,VK_KHR_multiview[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06047]]
    If pname:renderPass is not dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, pname:subpass viewMask is not `0`, and
    pname:multiviewTessellationShader is not enabled, then pname:pStages
    must: not include tessellation shaders
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06048]]
    If pname:renderPass is not dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, pname:subpass viewMask is not `0`, and
    pname:multiviewGeometryShader is not enabled, then pname:pStages must:
    not include a geometry shader
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06049]]
    If pname:renderPass is not dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and pname:subpass viewMask is not `0`,
    all of the shaders in the pipeline must: not write to the code:Layer
    built-in output
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06050]]
    If pname:renderPass is not dlink:VK_NULL_HANDLE and the pipeline is
    being created with <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and pname:subpass viewMask is not `0`,
    then all of the shaders in the pipeline must: not include variables
    decorated with the code:Layer built-in decoration in their interfaces
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-07717]]
    If pname:renderPass is not dlink:VK_NULL_HANDLE and the pipeline is
    being created with <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and pname:subpass viewMask is not `0`,
    then all of the shaders in the pipeline must: not include variables
    decorated with the code:ViewMask built-in decoration in their interfaces
ifdef::VK_EXT_mesh_shader[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-07064]]
    If pname:renderPass is not dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, pname:subpass viewMask is not `0`, and
    pname:multiviewMeshShader is not enabled, then pname:pStages must: not
    include a mesh shader
endif::VK_EXT_mesh_shader[]
endif::VK_VERSION_1_1,VK_KHR_multiview[]
ifdef::VK_VERSION_1_1,VK_KHR_device_group[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-00764]]
    pname:flags must: not contain the ename:VK_PIPELINE_CREATE_DISPATCH_BASE
    flag
endif::VK_VERSION_1_1,VK_KHR_device_group[]
ifdef::VK_VERSION_1_1,VK_KHR_maintenance2,VK_KHR_create_renderpass2[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-01565]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> and an input attachment was referenced by an
    pname:aspectMask at pname:renderPass creation time, the fragment shader
    must: only read from the aspects that were specified for that input
    attachment
endif::VK_VERSION_1_1,VK_KHR_maintenance2,VK_KHR_create_renderpass2[]
  * [[VUID-VkGraphicsPipelineCreateInfo-layout-01688]]
    The number of resources in pname:layout accessible to each shader stage
    that is used by the pipeline must: be less than or equal to
    sname:VkPhysicalDeviceLimits::pname:maxPerStageResources
ifdef::VK_NV_clip_space_w_scaling[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01715]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and no element of the
    pname:pDynamicStates member of pname:pDynamicState is
    ename:VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, and the
    pname:viewportWScalingEnable member of a
    slink:VkPipelineViewportWScalingStateCreateInfoNV structure, included in
    the pname:pNext chain of pname:pViewportState, is ename:VK_TRUE, the
    pname:pViewportWScalings member of the
    slink:VkPipelineViewportWScalingStateCreateInfoNV must: be a pointer to
    an array of
    slink:VkPipelineViewportWScalingStateCreateInfoNV::pname:viewportCount
    valid slink:VkViewportWScalingNV structures
endif::VK_NV_clip_space_w_scaling[]
ifdef::VK_NV_scissor_exclusive[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04056]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and no element of the
    pname:pDynamicStates member of pname:pDynamicState is
    ename:VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV, and if
    pname:pViewportState->pNext chain includes a
    slink:VkPipelineViewportExclusiveScissorStateCreateInfoNV structure, and
    if its pname:exclusiveScissorCount member is not `0`, then its
    pname:pExclusiveScissors member must: be a valid pointer to an array of
    pname:exclusiveScissorCount slink:VkRect2D structures
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07854]]
    If ename:VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV is included in the
    pname:pDynamicStates array then the implementation must: support at
    least pname:specVersion `2` of the `apiext:VK_NV_scissor_exclusive`
    extension
endif::VK_NV_scissor_exclusive[]
ifdef::VK_NV_shading_rate_image[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04057]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and no element of the
    pname:pDynamicStates member of pname:pDynamicState is
    ename:VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV, and if
    pname:pViewportState->pNext chain includes a
    slink:VkPipelineViewportShadingRateImageStateCreateInfoNV structure,
    then its pname:pShadingRatePalettes member must: be a valid pointer to
    an array of pname:viewportCount valid slink:VkShadingRatePaletteNV
    structures
endif::VK_NV_shading_rate_image[]
ifdef::VK_EXT_discard_rectangles[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04058]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and no element of the
    pname:pDynamicStates member of pname:pDynamicState is
    ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT, and if pname:pNext chain
    includes a slink:VkPipelineDiscardRectangleStateCreateInfoEXT structure,
    and if its pname:discardRectangleCount member is not `0`, then its
    pname:pDiscardRectangles member must: be a valid pointer to an array of
    pname:discardRectangleCount slink:VkRect2D structures
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07855]]
    If ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT is included in
    the pname:pDynamicStates array then the implementation must: support at
    least pname:specVersion `2` of the `apiext:VK_EXT_discard_rectangles`
    extension
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07856]]
    If ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT is included in the
    pname:pDynamicStates array then the implementation must: support at
    least pname:specVersion `2` of the `apiext:VK_EXT_discard_rectangles`
    extension
endif::VK_EXT_discard_rectangles[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-02097]]
    If the pipeline requires <<pipelines-graphics-subsets-vertex-input,
    vertex input state>>, and pname:pVertexInputState is not dynamic, then
    pname:pVertexInputState must: be a valid pointer to a valid
    slink:VkPipelineVertexInputStateCreateInfo structure
  * [[VUID-VkGraphicsPipelineCreateInfo-Input-07904]]
    If the pipeline is being created with
    <<pipelines-graphics-subsets-vertex-input, vertex input state>> and
    pname:pVertexInputState is not dynamic, then all variables with the
    code:Input storage class decorated with code:Location in the code:Vertex
    {ExecutionModel} code:OpEntryPoint must: contain a location in
    slink:VkVertexInputAttributeDescription::pname:location
  * [[VUID-VkGraphicsPipelineCreateInfo-Input-08733]]
    If the pipeline requires <<pipelines-graphics-subsets-vertex-input,
    vertex input state>> and pname:pVertexInputState is not dynamic, then
    the numeric type associated with all code:Input variables of the
    corresponding code:Location in the code:Vertex {ExecutionModel}
    code:OpEntryPoint must: be the same as
    slink:VkVertexInputAttributeDescription::pname:format
  * [[VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-08929]]
    If the pipeline is being created with
    <<pipelines-graphics-subsets-vertex-input, vertex input state>> and
    pname:pVertexInputState is not dynamic, and
    slink:VkVertexInputAttributeDescription::pname:format has a 64-bit
    component, then the scalar width associated with all code:Input
    variables of the corresponding code:Location in the code:Vertex
    {ExecutionModel} code:OpEntryPoint must: be 64-bit
  * [[VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-08930]]
    If the pipeline is being created with
    <<pipelines-graphics-subsets-vertex-input, vertex input state>> and
    pname:pVertexInputState is not dynamic, and the scalar width associated
    with a code:Location decorated code:Input variable in the code:Vertex
    {ExecutionModel} code:OpEntryPoint is 64-bit, then the corresponding
    slink:VkVertexInputAttributeDescription::pname:format must: have a
    64-bit component
  * [[VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-09198]]
    If the pipeline is being created with
    <<pipelines-graphics-subsets-vertex-input, vertex input state>> and
    pname:pVertexInputState is not dynamic, and
    slink:VkVertexInputAttributeDescription::pname:format has a 64-bit
    component, then all code:Input variables at the corresponding
    code:Location in the code:Vertex {ExecutionModel} code:OpEntryPoint
    must: not use components that are not present in the format
  * [[VUID-VkGraphicsPipelineCreateInfo-dynamicPrimitiveTopologyUnrestricted-09031]]
    If the pipeline requires <<pipelines-graphics-subsets-vertex-input,
    vertex input state>>,
ifdef::VK_EXT_extended_dynamic_state3[]
    and the `apiext:VK_EXT_extended_dynamic_state3` extension is not
    enabled, or either ename:VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, or
    ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic states are not set, or
    <<limits-dynamicPrimitiveTopologyUnrestricted,
    pname:dynamicPrimitiveTopologyUnrestricted>> is ename:VK_FALSE,
endif::VK_EXT_extended_dynamic_state3[]
    pname:pInputAssemblyState must: be a valid pointer to a valid
    slink:VkPipelineInputAssemblyStateCreateInfo structure
  * [[VUID-VkGraphicsPipelineCreateInfo-pInputAssemblyState-09032]]
    If pname:pInputAssemblyState is not `NULL` it must: be a valid pointer
    to a valid slink:VkPipelineInputAssemblyStateCreateInfo structure
ifdef::VK_EXT_transform_feedback[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-02317]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, the code:Xfb execution mode can: be
    specified by no more than one shader stage in pname:pStages
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-02318]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and any shader stage in pname:pStages
    specifies code:Xfb execution mode it must: be the last
    <<pipelines-graphics-subsets-pre-rasterization,pre-rasterization shader
    stage>>
  * [[VUID-VkGraphicsPipelineCreateInfo-rasterizationStream-02319]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and a
    slink:VkPipelineRasterizationStateStreamCreateInfoEXT::pname:rasterizationStream
    value other than zero is specified, all variables in the output
    interface of the entry point being compiled decorated with
    code:Position, code:PointSize, code:ClipDistance, or code:CullDistance
    must: be decorated with identical code:Stream values that match the
    pname:rasterizationStream
  * [[VUID-VkGraphicsPipelineCreateInfo-rasterizationStream-02320]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and
    slink:VkPipelineRasterizationStateStreamCreateInfoEXT::pname:rasterizationStream
    is zero, or not specified, all variables in the output interface of the
    entry point being compiled decorated with code:Position, code:PointSize,
    code:ClipDistance, or code:CullDistance must: be decorated with a
    code:Stream value of zero, or must: not specify the code:Stream
    decoration
  * [[VUID-VkGraphicsPipelineCreateInfo-geometryStreams-02321]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and the last
    <<pipelines-graphics-subsets-pre-rasterization,pre-rasterization shader
    stage>> is a geometry shader, and that geometry shader uses the
    code:GeometryStreams capability, then
    sname:VkPhysicalDeviceTransformFeedbackFeaturesEXT::pname:geometryStreams
    feature must: be enabled
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  * [[VUID-VkGraphicsPipelineCreateInfo-None-02322]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and there are any mesh shader stages
    in the pipeline there must: not be any shader stage in the pipeline with
    a code:Xfb execution mode
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
endif::VK_EXT_transform_feedback[]
ifdef::VK_EXT_line_rasterization[]
  * [[VUID-VkGraphicsPipelineCreateInfo-lineRasterizationMode-02766]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and at least one of
    <<pipelines-graphics-subsets-fragment-output, fragment output interface
    state>> or <<pipelines-graphics-subsets-fragment-shader, fragment shader
    state>>, and pname:pMultisampleState is not `NULL`, the
    pname:lineRasterizationMode member of a
    slink:VkPipelineRasterizationLineStateCreateInfoEXT structure included
    in the pname:pNext chain of pname:pRasterizationState is
    ename:VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT or
    ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT, then the
    pname:alphaToCoverageEnable, pname:alphaToOneEnable, and
    pname:sampleShadingEnable members of pname:pMultisampleState must: all
    be ename:VK_FALSE
  * [[VUID-VkGraphicsPipelineCreateInfo-stippledLineEnable-02767]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, the pname:stippledLineEnable member of
    slink:VkPipelineRasterizationLineStateCreateInfoEXT is ename:VK_TRUE,
    and no element of the pname:pDynamicStates member of pname:pDynamicState
    is ename:VK_DYNAMIC_STATE_LINE_STIPPLE_EXT, then the
    pname:lineStippleFactor member of
    slink:VkPipelineRasterizationLineStateCreateInfoEXT must: be in the
    range [eq]#[1,256]#
endif::VK_EXT_line_rasterization[]
ifdef::VK_KHR_ray_tracing_pipeline[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-03372]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-03373]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-03374]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-03375]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-03376]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-03377]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-03577]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
endif::VK_KHR_ray_tracing_pipeline[]
ifdef::VK_NV_ray_tracing_motion_blur[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-04947]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV
endif::VK_NV_ray_tracing_motion_blur[]
ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03378]]
    If
ifdef::VK_EXT_extended_dynamic_state[]
    the <<features-extendedDynamicState, pname:extendedDynamicState>>
    feature is not enabled,
endif::VK_EXT_extended_dynamic_state[]
ifdef::VK_VERSION_1_3+VK_EXT_extended_dynamic_state[and]
ifdef::VK_VERSION_1_3[]
    the value of slink:VkApplicationInfo::pname:apiVersion used to create
    the slink:VkInstance is less than Version 1.3
endif::VK_VERSION_1_3[]
    there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to ename:VK_DYNAMIC_STATE_CULL_MODE,
    ename:VK_DYNAMIC_STATE_FRONT_FACE,
    ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY,
    ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT,
    ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT,
    ename:VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE,
    ename:VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE,
    ename:VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE,
    ename:VK_DYNAMIC_STATE_DEPTH_COMPARE_OP,
    ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE,
    ename:VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, or
    ename:VK_DYNAMIC_STATE_STENCIL_OP
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03379]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and
    ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT is included in the
    pname:pDynamicStates array then pname:viewportCount must: be zero
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03380]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and
    ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT is included in the
    pname:pDynamicStates array then pname:scissorCount must: be zero
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04132]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and
    ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT is included in the
    pname:pDynamicStates array then ename:VK_DYNAMIC_STATE_VIEWPORT must:
    not be present
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04133]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and
    ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT is included in the
    pname:pDynamicStates array then ename:VK_DYNAMIC_STATE_SCISSOR must: not
    be present
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07065]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and includes a mesh shader, there
    must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY, or
    ename:VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[]
ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04868]]
    If
ifdef::VK_EXT_extended_dynamic_state[]
    the <<features-extendedDynamicState2, pname:extendedDynamicState2>>
    feature is not enabled,
endif::VK_EXT_extended_dynamic_state[]
ifdef::VK_VERSION_1_3+VK_EXT_extended_dynamic_state[and]
ifdef::VK_VERSION_1_3[]
    the value of slink:VkApplicationInfo::pname:apiVersion used to create
    the slink:VkInstance is less than Version 1.3
endif::VK_VERSION_1_3[]
    there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to ename:VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE,
    ename:VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, or
    ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04869]]
    If the <<features-extendedDynamicState2LogicOp,
    pname:extendedDynamicState2LogicOp>> feature is not enabled, there must:
    be no element of the pname:pDynamicStates member of pname:pDynamicState
    set to ename:VK_DYNAMIC_STATE_LOGIC_OP_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04870]]
    If the <<features-extendedDynamicState2PatchControlPoints,
    pname:extendedDynamicState2PatchControlPoints>> feature is not enabled,
    there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07066]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and includes a mesh shader, there
    must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, or
    ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[]
ifdef::VK_NV_device_generated_commands[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-02877]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV, then the
    <<features-deviceGeneratedCommands, pname:deviceGeneratedCommands>>
    feature must: be enabled
ifdef::VK_EXT_transform_feedback[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-02966]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and pname:flags includes
    ename:VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV, then all stages must:
    not specify code:Xfb execution mode
endif::VK_EXT_transform_feedback[]
  * [[VUID-VkGraphicsPipelineCreateInfo-libraryCount-06648]]
    If the pipeline is not created with a
    <<pipelines-graphics-subsets-complete, complete set of state>>,
ifdef::VK_EXT_graphics_pipeline_library[]
    or slink:VkPipelineLibraryCreateInfoKHR::pname:libraryCount is not `0`,
endif::VK_EXT_graphics_pipeline_library[]
    slink:VkGraphicsPipelineShaderGroupsCreateInfoNV::pname:groupCount and
    slink:VkGraphicsPipelineShaderGroupsCreateInfoNV::pname:pipelineCount
    must: be `0`
  * [[VUID-VkGraphicsPipelineCreateInfo-libraryCount-06649]]
    If the pipeline is created with a <<pipelines-graphics-subsets-complete,
    complete set of state>>,
ifdef::VK_EXT_graphics_pipeline_library[]
    and slink:VkPipelineLibraryCreateInfoKHR::pname:libraryCount is `0`,
endif::VK_EXT_graphics_pipeline_library[]
    and the pname:pNext chain includes an instance of
    slink:VkGraphicsPipelineShaderGroupsCreateInfoNV,
    slink:VkGraphicsPipelineShaderGroupsCreateInfoNV::pname:groupCount must:
    be greater than `0`
endif::VK_NV_device_generated_commands[]
ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pipelineCreationCacheControl-02878]]
    If the <<features-pipelineCreationCacheControl,
    pname:pipelineCreationCacheControl>> feature is not enabled, pname:flags
    must: not include
    ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT or
    ename:VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
ifdef::VK_EXT_pipeline_protected_access[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pipelineProtectedAccess-07368]]
    If the <<features-pipelineProtectedAccess,
    pname:pipelineProtectedAccess>> feature is not enabled, pname:flags
    must: not include ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT
    or ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-07369]]
    pname:flags must: not include both
    ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT and
    ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT
endif::VK_EXT_pipeline_protected_access[]
ifdef::VK_KHR_fragment_shading_rate[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04494]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
    and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.width
    must: be greater than or equal to `1`
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04495]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
    and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.height
    must: be greater than or equal to `1`
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04496]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
    and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.width
    must: be a power-of-two value
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04497]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
    and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.height
    must: be a power-of-two value
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04498]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
    and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.width
    must: be less than or equal to `4`
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04499]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
    and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.height
    must: be less than or equal to `4`
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04500]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
    and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates, and the
    <<features-pipelineFragmentShadingRate,
    pname:pipelineFragmentShadingRate>> feature is not enabled,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.width
    and
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.height
    must: both be equal to `1`
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06567]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
    and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:combinerOps[0]
    must: be a valid elink:VkFragmentShadingRateCombinerOpKHR value
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06568]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
    and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:combinerOps[1]
    must: be a valid elink:VkFragmentShadingRateCombinerOpKHR value
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04501]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
    and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates, and the
    <<features-primitiveFragmentShadingRate,
    pname:primitiveFragmentShadingRate>> feature is not enabled,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:combinerOps[0]
    must: be ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04502]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
    and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates, and the
    <<features-attachmentFragmentShadingRate,
    pname:attachmentFragmentShadingRate>> feature is not enabled,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:combinerOps[1]
    must: be ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR
ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[]
  * [[VUID-VkGraphicsPipelineCreateInfo-primitiveFragmentShadingRateWithMultipleViewports-04503]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and the
    <<limits-primitiveFragmentShadingRateWithMultipleViewports,
    pname:primitiveFragmentShadingRateWithMultipleViewports>> limit is not
    supported, ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT is not included in
    pname:pDynamicState->pDynamicStates, and
    slink:VkPipelineViewportStateCreateInfo::pname:viewportCount is greater
    than `1`, entry points specified in pname:pStages must: not write to the
    code:PrimitiveShadingRateKHR built-in
endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[]
  * [[VUID-VkGraphicsPipelineCreateInfo-primitiveFragmentShadingRateWithMultipleViewports-04504]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and the
    <<limits-primitiveFragmentShadingRateWithMultipleViewports,
    pname:primitiveFragmentShadingRateWithMultipleViewports>> limit is not
    supported, and entry points specified in pname:pStages write to the
    code:ViewportIndex built-in, they must: not also write to the
    code:PrimitiveShadingRateKHR built-in
ifdef::VK_NV_viewport_array2[]
  * [[VUID-VkGraphicsPipelineCreateInfo-primitiveFragmentShadingRateWithMultipleViewports-04505]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and the
    <<limits-primitiveFragmentShadingRateWithMultipleViewports,
    pname:primitiveFragmentShadingRateWithMultipleViewports>> limit is not
    supported, and entry points specified in pname:pStages write to the
    code:ViewportMaskNV built-in, they must: not also write to the
    code:PrimitiveShadingRateKHR built-in
endif::VK_NV_viewport_array2[]
  * [[VUID-VkGraphicsPipelineCreateInfo-fragmentShadingRateNonTrivialCombinerOps-04506]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>,
    the <<limits-fragmentShadingRateNonTrivialCombinerOps,
    pname:fragmentShadingRateNonTrivialCombinerOps>> limit is not supported,
    and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates, elements of
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:combinerOps
    must: be ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR or
    ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR
endif::VK_KHR_fragment_shading_rate[]
ifdef::VK_NV_fragment_shading_rate_enums[]
  * [[VUID-VkGraphicsPipelineCreateInfo-None-06569]]
     If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
     fragment shader state>>
    and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates,
    slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:shadingRateType
    must: be a valid elink:VkFragmentShadingRateTypeNV value
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06570]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> and
    ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates,
    slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:shadingRate
    must: be a valid elink:VkFragmentShadingRateNV value
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06571]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> and
    ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates,
    slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:combinerOps[0]
    must: be a valid elink:VkFragmentShadingRateCombinerOpKHR value
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06572]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> and
    ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates,
    slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:combinerOps[1]
    must: be a valid elink:VkFragmentShadingRateCombinerOpKHR value
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04569]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> and
    ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates, and the
    <<features-fragmentShadingRateEnums, pname:fragmentShadingRateEnums>>
    feature is not enabled,
    slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:shadingRateType
    must: be equal to ename:VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04570]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> and
    ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates, and the
    <<features-pipelineFragmentShadingRate,
    pname:pipelineFragmentShadingRate>> feature is not enabled,
    slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:shadingRate
    must: be equal to
    ename:VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04571]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> and
    ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates, and the
    <<features-primitiveFragmentShadingRate,
    pname:primitiveFragmentShadingRate>> feature is not enabled,
    slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:combinerOps[0]
    must: be ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04572]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> and
    ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates, and the
    <<features-attachmentFragmentShadingRate,
    pname:attachmentFragmentShadingRate>> feature is not enabled,
    slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:combinerOps[1]
    must: be ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR
  * [[VUID-VkGraphicsPipelineCreateInfo-fragmentShadingRateNonTrivialCombinerOps-04573]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>>, and the
    <<limits-fragmentShadingRateNonTrivialCombinerOps,
    pname:fragmentShadingRateNonTrivialCombinerOps>> limit is not supported
    and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in
    pname:pDynamicState->pDynamicStates, elements of
    slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:combinerOps
    must: be ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR or
    ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR
  * [[VUID-VkGraphicsPipelineCreateInfo-None-04574]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>>, and the
    <<features-supersampleFragmentShadingRates,
    pname:supersampleFragmentShadingRates>> feature is not enabled,
    slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:shadingRate
    must: not be equal to
    ename:VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV,
    ename:VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV,
    ename:VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV, or
    ename:VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV
  * [[VUID-VkGraphicsPipelineCreateInfo-None-04575]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>>, and the
    <<features-noInvocationFragmentShadingRates,
    pname:noInvocationFragmentShadingRates>> feature is not enabled,
    slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:shadingRate
    must: not be equal to ename:VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV
endif::VK_NV_fragment_shading_rate_enums[]
ifdef::VK_KHR_ray_tracing_pipeline[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03578]]
    All elements of the pname:pDynamicStates member of pname:pDynamicState
    must: not be ename:VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR
endif::VK_KHR_ray_tracing_pipeline[]
ifdef::VK_EXT_vertex_input_dynamic_state[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04807]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> and the
    <<features-vertexInputDynamicState, pname:vertexInputDynamicState>>
    feature is not enabled, there must: be no element of the
    pname:pDynamicStates member of pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07067]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and includes a mesh shader, there
    must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
endif::VK_EXT_vertex_input_dynamic_state[]
ifdef::VK_EXT_color_write_enable[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04800]]
    If the <<features-colorWriteEnable, pname:colorWriteEnable>> feature is
    not enabled, there must: be no element of the pname:pDynamicStates
    member of pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT
endif::VK_EXT_color_write_enable[]
ifdef::VK_QCOM_render_pass_shader_resolve[]
  * [[VUID-VkGraphicsPipelineCreateInfo-rasterizationSamples-04899]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>>, and the
    `apiext:VK_QCOM_render_pass_shader_resolve` extension is enabled,
    pname:rasterizationSamples is not dynamic, and if subpass has any input
    attachments, and if the subpass description contains
    ename:VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM, then the sample
    count of the input attachments must: equal pname:rasterizationSamples
  * [[VUID-VkGraphicsPipelineCreateInfo-sampleShadingEnable-04900]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>>, and the
    `apiext:VK_QCOM_render_pass_shader_resolve` extension is enabled, and if
    the subpass description contains
    ename:VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM, then
    pname:sampleShadingEnable must: be false
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-04901]]
    If pname:flags includes
    ename:VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, then the subpass
    must: be the last subpass in a subpass dependency chain
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-04902]]
    If pname:flags includes
    ename:VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, and if
    pname:pResolveAttachments is not `NULL`, then each resolve attachment
    must: be ename:VK_ATTACHMENT_UNUSED
endif::VK_QCOM_render_pass_shader_resolve[]
ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
  * [[VUID-VkGraphicsPipelineCreateInfo-dynamicRendering-06576]]
    If the <<features-dynamicRendering, pname:dynamicRendering>> feature is
    not enabled and the pipeline requires
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>>, <<pipelines-graphics-subsets-fragment-shader, fragment shader
    state>>, or <<pipelines-graphics-subsets-fragment-output, fragment
    output interface state>>, pname:renderPass must: not be
    dlink:VK_NULL_HANDLE
  * [[VUID-VkGraphicsPipelineCreateInfo-multiview-06577]]
    If the <<features-multiview, pname:multiview>> feature is not enabled,
    the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>,
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>,
    or <<pipelines-graphics-subsets-fragment-output, fragment output
    interface state>>, and pname:renderPass is dlink:VK_NULL_HANDLE,
    slink:VkPipelineRenderingCreateInfo::pname:viewMask must: be `0`
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06578]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>,
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>,
    or <<pipelines-graphics-subsets-fragment-output, fragment output
    interface state>>, and pname:renderPass is dlink:VK_NULL_HANDLE, the
    index of the most significant bit in
    slink:VkPipelineRenderingCreateInfo::pname:viewMask must: be less than
    <<limits-maxMultiviewViewCount, pname:maxMultiviewViewCount>>
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06579]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, and pname:renderPass is
    dlink:VK_NULL_HANDLE, and
    slink:VkPipelineRenderingCreateInfo::pname:colorAttachmentCount is not
    0, slink:VkPipelineRenderingCreateInfo::pname:pColorAttachmentFormats
    must: be a valid pointer to an array of pname:colorAttachmentCount valid
    elink:VkFormat values
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06580]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, and pname:renderPass is
    dlink:VK_NULL_HANDLE, each element of
    slink:VkPipelineRenderingCreateInfo::pname:pColorAttachmentFormats must:
    be a valid elink:VkFormat value
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06582]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, pname:renderPass is
    dlink:VK_NULL_HANDLE, and any element of
    slink:VkPipelineRenderingCreateInfo::pname:pColorAttachmentFormats is
    not ename:VK_FORMAT_UNDEFINED, that format must: be a format with
    <<potential-format-features, potential format features>> that include
    ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
ifdef::VK_NV_linear_color_attachment[]
    or ename:VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV
endif::VK_NV_linear_color_attachment[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06583]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, and pname:renderPass is
    dlink:VK_NULL_HANDLE,
    slink:VkPipelineRenderingCreateInfo::pname:depthAttachmentFormat must:
    be a valid elink:VkFormat value
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06584]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, and pname:renderPass is
    dlink:VK_NULL_HANDLE,
    slink:VkPipelineRenderingCreateInfo::pname:stencilAttachmentFormat must:
    be a valid elink:VkFormat value
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06585]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, pname:renderPass is
    dlink:VK_NULL_HANDLE, and
    slink:VkPipelineRenderingCreateInfo::pname:depthAttachmentFormat is not
    ename:VK_FORMAT_UNDEFINED, it must: be a format with
    <<potential-format-features, potential format features>> that include
    ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06586]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, pname:renderPass is
    dlink:VK_NULL_HANDLE, and
    slink:VkPipelineRenderingCreateInfo::pname:stencilAttachmentFormat is
    not ename:VK_FORMAT_UNDEFINED, it must: be a format with
    <<potential-format-features, potential format features>> that include
    ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06587]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, pname:renderPass is
    dlink:VK_NULL_HANDLE, and
    slink:VkPipelineRenderingCreateInfo::pname:depthAttachmentFormat is not
    ename:VK_FORMAT_UNDEFINED, it must: be a format that includes a depth
    component
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06588]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, pname:renderPass is
    dlink:VK_NULL_HANDLE, and
    slink:VkPipelineRenderingCreateInfo::pname:stencilAttachmentFormat is
    not ename:VK_FORMAT_UNDEFINED, it must: be a format that includes a
    stencil component
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06589]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, pname:renderPass is
    dlink:VK_NULL_HANDLE,
    slink:VkPipelineRenderingCreateInfo::pname:depthAttachmentFormat is not
    ename:VK_FORMAT_UNDEFINED, and
    slink:VkPipelineRenderingCreateInfo::pname:stencilAttachmentFormat is
    not ename:VK_FORMAT_UNDEFINED, pname:depthAttachmentFormat must: equal
    pname:stencilAttachmentFormat
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-09033]]
    If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-fragment-shader, fragment
    shader state>> and <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>, and either of
    slink:VkPipelineRenderingCreateInfo::pname:depthAttachmentFormat or
    slink:VkPipelineRenderingCreateInfo::pname:stencilAttachmentFormat are
    not ename:VK_FORMAT_UNDEFINED,
ifdef::VK_EXT_extended_dynamic_state3[]
    and the `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled
    or any of the ename:VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE,
    ename:VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE,
    ename:VK_DYNAMIC_STATE_DEPTH_COMPARE_OP,
    ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE,
    ename:VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE,
    ename:VK_DYNAMIC_STATE_STENCIL_OP, or
    ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic states are not set,
endif::VK_EXT_extended_dynamic_state3[]
    pname:pDepthStencilState must: be a valid pointer to a valid
    slink:VkPipelineDepthStencilStateCreateInfo structure
  * [[VUID-VkGraphicsPipelineCreateInfo-pDepthStencilState-09034]]
    If pname:pDepthStencilState is not `NULL` it must: be a valid pointer to
    a valid slink:VkPipelineDepthStencilStateCreateInfo structure
ifdef::VK_EXT_graphics_pipeline_library[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-09035]]
    If pname:renderPass is dlink:VK_NULL_HANDLE and the pipeline is being
    created with <<pipelines-graphics-subsets-fragment-shader, fragment
    shader state>> but not <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>>,
ifdef::VK_EXT_extended_dynamic_state3[]
    and the `apiext:VK_EXT_extended_dynamic_state3` extension is not
    enabled, or any of the ename:VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE,
    ename:VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE,
    ename:VK_DYNAMIC_STATE_DEPTH_COMPARE_OP,
    ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE,
    ename:VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE,
    ename:VK_DYNAMIC_STATE_STENCIL_OP, or
    ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic states are not set,
endif::VK_EXT_extended_dynamic_state3[]
    pname:pDepthStencilState must: be a valid pointer to a valid
    slink:VkPipelineDepthStencilStateCreateInfo structure
  * [[VUID-VkGraphicsPipelineCreateInfo-pDepthStencilState-09036]]
    If pname:pDepthStencilState is not `NULL` it must: be a valid pointer to
    a valid slink:VkPipelineDepthStencilStateCreateInfo structure
endif::VK_EXT_graphics_pipeline_library[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-09037]]
    If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-fragment-output, fragment
    output interface state>>, and
    slink:VkPipelineRenderingCreateInfo::pname:colorAttachmentCount is not
    equal to `0`,
ifdef::VK_EXT_extended_dynamic_state3[]
    and the `apiext:VK_EXT_extended_dynamic_state3` extension is not
    enabled, or any of the ename:VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT,
    ename:VK_DYNAMIC_STATE_LOGIC_OP_EXT,
    ename:VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT,
    ename:VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT,
    ename:VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, or
    ename:VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic states are not set,
endif::VK_EXT_extended_dynamic_state3[]
    pname:pColorBlendState must: be a valid pointer to a valid
    slink:VkPipelineColorBlendStateCreateInfo structure
  * [[VUID-VkGraphicsPipelineCreateInfo-pColorBlendState-09038]]
    If pname:pColorBlendState is not `NULL` it must: be a valid pointer to a
    valid slink:VkPipelineColorBlendStateCreateInfo structure
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06055]]
    If pname:renderPass is dlink:VK_NULL_HANDLE, pname:pColorBlendState is
    not dynamic, and the pipeline is being created with
    <<pipelines-graphics-subsets-fragment-output, fragment output interface
    state>>, pname:pColorBlendState->attachmentCount must: be equal to
    slink:VkPipelineRenderingCreateInfo::pname:colorAttachmentCount
ifdef::VK_KHR_multiview,VK_VERSION_1_1[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06057]]
    If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>,
    slink:VkPipelineRenderingCreateInfo::pname:viewMask is not `0`, and the
    <<features-multiview-tess, pname:multiviewTessellationShader>> feature
    is not enabled, then pname:pStages must: not include tessellation
    shaders
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06058]]
    If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>,
    slink:VkPipelineRenderingCreateInfo::pname:viewMask is not `0`, and the
    <<features-multiview-gs, pname:multiviewGeometryShader>> feature is not
    enabled, then pname:pStages must: not include a geometry shader
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-07718]]
    If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and
    slink:VkPipelineRenderingCreateInfo::pname:viewMask is not `0`, all of
    the shaders in the pipeline must: not write to the code:Layer built-in
    output
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06059]]
    If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and
    slink:VkPipelineRenderingCreateInfo::pname:viewMask is not `0`, all of
    the shaders in the pipeline must: not include variables decorated with
    the code:Layer built-in decoration in their interfaces
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-07719]]
    If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and
    slink:VkPipelineRenderingCreateInfo::pname:viewMask is not `0`, all of
    the shaders in the pipeline must: not include variables decorated with
    the code:ViewIndex built-in decoration in their interfaces
ifdef::VK_EXT_mesh_shader[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-07720]]
    If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and
    slink:VkPipelineRenderingCreateInfo::pname:viewMask is not `0`, and
    pname:multiviewMeshShader is not enabled, then pname:pStages must: not
    include a mesh shader
endif::VK_EXT_mesh_shader[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06061]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> and pname:renderPass is dlink:VK_NULL_HANDLE,
    fragment shaders in pname:pStages must: not include the
    code:InputAttachment capability
ifdef::VK_EXT_shader_tile_image[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-08710]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> and pname:renderPass is not
    dlink:VK_NULL_HANDLE, fragment shaders in pname:pStages must: not
    include any of the code:TileImageColorReadAccessEXT,
    code:TileImageDepthReadAccessEXT, or code:TileImageStencilReadAccessEXT
    capabilities
endif::VK_EXT_shader_tile_image[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06062]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>> and pname:renderPass is
    dlink:VK_NULL_HANDLE, for each color attachment format defined by the
    pname:pColorAttachmentFormats member of
    slink:VkPipelineRenderingCreateInfo, if its
    <<potential-format-features,potential format features>> do not contain
    ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the
    pname:blendEnable member of the corresponding element of the
    pname:pAttachments member of pname:pColorBlendState must: be
    ename:VK_FALSE
endif::VK_KHR_multiview,VK_VERSION_1_1[]
ifdef::VK_AMD_mixed_attachment_samples,VK_NV_framebuffer_mixed_samples[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06063]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>> and pname:renderPass is
    dlink:VK_NULL_HANDLE, if the pname:pNext chain includes
    slink:VkAttachmentSampleCountInfoAMD or
    sname:VkAttachmentSampleCountInfoNV, the pname:colorAttachmentCount
    member of that structure must: be equal to the value of
    slink:VkPipelineRenderingCreateInfo::pname:colorAttachmentCount
endif::VK_AMD_mixed_attachment_samples,VK_NV_framebuffer_mixed_samples[]
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
ifdef::VK_EXT_rasterization_order_attachment_access,VK_ARM_rasterization_order_attachment_access[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06591]]
    If pname:pStages includes a fragment shader stage, and the fragment
    shader declares the code:EarlyFragmentTests execution mode, the
    pname:flags member of slink:VkPipelineDepthStencilStateCreateInfo must:
    not include
    ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT
    or
    ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT
ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06482]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>> and the pname:flags member of
    slink:VkPipelineColorBlendStateCreateInfo includes
    ename:VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT,
    pname:renderpass must: not be dlink:VK_NULL_HANDLE
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06483]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>> and the pname:flags member of
    slink:VkPipelineDepthStencilStateCreateInfo includes
    ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT
    or
    ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT,
    pname:renderpass must: not be dlink:VK_NULL_HANDLE
ifdef::VK_AMD_mixed_attachment_samples,VK_NV_framebuffer_mixed_samples[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pColorAttachmentSamples-06592]]
    If the <<pipelines-graphics-subsets-fragment-output, fragment output
    interface state>>, elements of the pname:pColorAttachmentSamples member
    of slink:VkAttachmentSampleCountInfoAMD or
    slink:VkAttachmentSampleCountInfoNV must: be valid
    elink:VkSampleCountFlagBits values
  * [[VUID-VkGraphicsPipelineCreateInfo-depthStencilAttachmentSamples-06593]]
    If the <<pipelines-graphics-subsets-fragment-output, fragment output
    interface state>> and the pname:depthStencilAttachmentSamples member of
    slink:VkAttachmentSampleCountInfoAMD or
    slink:VkAttachmentSampleCountInfoNV is not 0, it must: be a valid
    elink:VkSampleCountFlagBits value
endif::VK_AMD_mixed_attachment_samples,VK_NV_framebuffer_mixed_samples[]
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06484]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-output,
    fragment output interface state>> and the pname:flags member of
    slink:VkPipelineColorBlendStateCreateInfo includes
    ename:VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT
    pname:subpass must: have been created with
    ename:VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06485]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> and the pname:flags member of
    slink:VkPipelineDepthStencilStateCreateInfo includes
    ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT,
    pname:subpass must: have been created with
    ename:VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06486]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> and the pname:flags member of
    slink:VkPipelineDepthStencilStateCreateInfo includes
    ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT,
    pname:subpass must: have been created with
    ename:VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT
endif::VK_EXT_rasterization_order_attachment_access,VK_ARM_rasterization_order_attachment_access[]
ifdef::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pipelineStageCreationFeedbackCount-06594]]
    If
    slink:VkPipelineCreationFeedbackCreateInfo::pname:pipelineStageCreationFeedbackCount
    is not `0`, it must: be equal to pname:stageCount
endif::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[]
ifdef::VK_NVX_multiview_per_view_attributes[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06595]]
    If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being
    created with <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>,
    and
    slink:VkMultiviewPerViewAttributesInfoNVX::pname:perViewAttributesPositionXOnly
    is ename:VK_TRUE then
    slink:VkMultiviewPerViewAttributesInfoNVX::pname:perViewAttributes must:
    also be ename:VK_TRUE
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06596]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    only one of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an
    element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes the other flag, the value of
    slink:VkMultiviewPerViewAttributesInfoNVX::pname:perViewAttributes
    specified in both this pipeline and the library must: be equal
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06597]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and
    another element includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, the value of
    slink:VkMultiviewPerViewAttributesInfoNVX::pname:perViewAttributes
    specified in both libraries must: be equal
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06598]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    only one of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an
    element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes the other flag, the value of
    slink:VkMultiviewPerViewAttributesInfoNVX::pname:perViewAttributesPositionXOnly
    specified in both this pipeline and the library must: be equal
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06599]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and
    another element includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, the value of
    slink:VkMultiviewPerViewAttributesInfoNVX::pname:perViewAttributesPositionXOnly
    specified in both libraries must: be equal
endif::VK_NVX_multiview_per_view_attributes[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-06600]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>,
    pname:pStages must: be a valid pointer to an array of pname:stageCount
    valid slink:VkPipelineShaderStageCreateInfo structures
ifndef::VK_EXT_extended_dynamic_state3[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-06601]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, pname:pRasterizationState must: be a
    valid pointer to a valid slink:VkPipelineRasterizationStateCreateInfo
    structure
endif::VK_EXT_extended_dynamic_state3[]
ifdef::VK_EXT_extended_dynamic_state3[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-09039]]
    If
ifdef::VK_EXT_graphics_pipeline_library[]
    slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT,
    and
endif::VK_EXT_graphics_pipeline_library[]
    the `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled, or
    any of the ename:VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT,
    ename:VK_DYNAMIC_STATE_SAMPLE_MASK_EXT, or
    ename:VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic states are
    not set, or <<features-alphaToOne,alphaToOne>> is enabled on the device
    and ename:VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT is not set, then
    pname:pMultisampleState must: be a valid pointer to a valid
    slink:VkPipelineMultisampleStateCreateInfo structure
  * [[VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-09040]]
    If pname:pRasterizationState is not `NULL` it must: be a valid pointer
    to a valid slink:VkPipelineRasterizationStateCreateInfo structure
endif::VK_EXT_extended_dynamic_state3[]
  * [[VUID-VkGraphicsPipelineCreateInfo-layout-06602]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> or
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>>, pname:layout must: be a valid slink:VkPipelineLayout handle
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06603]]
    If <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization
    shader state>>, <<pipelines-graphics-subsets-fragment-shader, fragment
    shader state>>, or <<pipelines-graphics-subsets-fragment-output,
    fragment output state>>,
ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
    and pname:renderPass is not dlink:VK_NULL_HANDLE,
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
    pname:renderPass must: be a valid slink:VkRenderPass handle
  * [[VUID-VkGraphicsPipelineCreateInfo-stageCount-06604]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>,
    pname:stageCount must: be greater than `0`
  * [[VUID-VkGraphicsPipelineCreateInfo-graphicsPipelineLibrary-06606]]
ifdef::VK_EXT_graphics_pipeline_library[]
    If the <<features-graphicsPipelineLibrary,
    pname:graphicsPipelineLibrary>> feature is not enabled,
endif::VK_EXT_graphics_pipeline_library[]
    pname:flags must: not include ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR
ifdef::VK_EXT_graphics_pipeline_library[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06608]]
    If the pipeline defines, or includes as libraries, all the state subsets
    required for a <<pipelines-graphics-subsets-complete, complete graphics
    pipeline>>, pname:flags must: not include
    ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06609]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT, pipeline
    libraries included via slink:VkPipelineLibraryCreateInfoKHR must: have
    been created with
    ename:VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-09245]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT,
    pname:flags must: also include ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06610]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT,
    pipeline libraries included via slink:VkPipelineLibraryCreateInfoKHR
    must: have been created with
    ename:VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06611]]
    Any pipeline libraries included via
    slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries must: not include
    any <<pipelines-graphics-subsets, state subset>> already defined by this
    structure or defined by any other pipeline library in
    slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06612]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    only one of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an
    element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes the other flag, and pname:layout was not created with
    ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then the
    pname:layout used by this pipeline and the library must: be _identically
    defined_
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06613]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and
    another element includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and the
    pname:layout specified by either library was not created with
    ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then the
    pname:layout used by each library must: be _identically defined_
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06614]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    only one of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element
    of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes the
    other subset, and pname:layout was created with
    ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then the
    pname:layout used by the library must: also have been created with
    ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06615]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and
    another element includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and the
    pname:layout specified by either library was created with
    ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then the
    pname:layout used by both libraries must: have been created with
    ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06616]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    only one of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element
    of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes the
    other subset, and pname:layout was created with
    ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, elements of
    the pname:pSetLayouts array which pname:layout was created with that are
    not dlink:VK_NULL_HANDLE must: be _identically defined_ to the element
    at the same index of pname:pSetLayouts used to create the library's
    pname:layout
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06617]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and
    another element includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and the
    pname:layout specified by either library was created with
    ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, elements of
    the pname:pSetLayouts array which either pname:layout was created with
    that are not dlink:VK_NULL_HANDLE must: be _identically defined_ to the
    element at the same index of pname:pSetLayouts used to create the other
    library's pname:layout
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06618]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    only one of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an
    element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes the other flag, any descriptor set layout _N_ specified by
    pname:layout in both this pipeline and the library which include
    bindings accessed by shader stages in each must: be _identically
    defined_
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06619]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and
    another element includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, any
    descriptor set layout _N_ specified by pname:layout in both libraries
    which include bindings accessed by shader stages in each must: be
    _identically defined_
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06620]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    only one of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an
    element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes the other flag, push constants specified in pname:layout in
    both this pipeline and the library which are available to shader stages
    in each must: be _identically defined_
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06621]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and
    another element includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, push
    constants specified in pname:layout in both this pipeline and the
    library which are available to shader stages in each must: be
    _identically defined_
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06679]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    only one of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element
    of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes the
    other subset, and any element of the pname:pSetLayouts array which
    pname:layout was created with was dlink:VK_NULL_HANDLE, then the
    corresponding element of the pname:pSetLayouts array used to create the
    library's pname:layout must: not be dlink:VK_NULL_HANDLE
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06680]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    only one of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element
    of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes the
    other subset, and any element of the pname:pSetLayouts array used to
    create the library's pname:layout was dlink:VK_NULL_HANDLE, then the
    corresponding element of the pname:pSetLayouts array used to create this
    pipeline's pname:layout must: not be dlink:VK_NULL_HANDLE
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06681]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and
    another element includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and any
    element of the pname:pSetLayouts array used to create each library's
    pname:layout was dlink:VK_NULL_HANDLE, then the corresponding element of
    the pname:pSetLayouts array used to create the other library's
    pname:layout must: not be dlink:VK_NULL_HANDLE
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06756]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    only one of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element
    of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes the
    other subset, and any element of the pname:pSetLayouts array which
    pname:layout was created with was dlink:VK_NULL_HANDLE, then the
    corresponding element of the pname:pSetLayouts array used to create the
    library's pname:layout must: not have shader bindings for shaders in the
    other subset
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06757]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    only one of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element
    of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes the
    other subset, and any element of the pname:pSetLayouts array used to
    create the library's pname:layout was dlink:VK_NULL_HANDLE, then the
    corresponding element of the pname:pSetLayouts array used to create this
    pipeline's pname:layout must: not have shader bindings for shaders in
    the other subset
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06758]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and
    another element includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and any
    element of the pname:pSetLayouts array used to create each library's
    pname:layout was dlink:VK_NULL_HANDLE, then the corresponding element of
    the pname:pSetLayouts array used to create the other library's
    pname:layout must: not have shader bindings for shaders in the other
    subset
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06682]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    both
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, pname:layout
    must: have been created with no elements of the pname:pSetLayouts array
    set to dlink:VK_NULL_HANDLE
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06683]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and
    pname:pRasterizationState->rasterizerDiscardEnable is ename:VK_TRUE,
    pname:layout must: have been created with no elements of the
    pname:pSetLayouts array set to dlink:VK_NULL_HANDLE
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06684]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes at
    least one of and no more than two of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT,
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT,
    and an element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes one of the other flags, the value of pname:subpass must: be
    equal to that used to create the library
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06623]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes at least one of and no more than two of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT,
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT,
    and another element of
    slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes one of
    the other flags, the value of pname:subpass used to create each library
    must: be identical
  * [[VUID-VkGraphicsPipelineCreateInfo-renderpass-06624]]
    If pname:renderpass is not dlink:VK_NULL_HANDLE,
    slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes at
    least one of and no more than two of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT,
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT,
    and an element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes one of the other flags, pname:renderPass must: be compatible
    with that used to create the library
ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderpass-06625]]
    If pname:renderpass is dlink:VK_NULL_HANDLE,
    slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes at
    least one of and no more than two of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT,
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT,
    and an element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes one of the other flags, the value of pname:renderPass used to
    create that library must: also be dlink:VK_NULL_HANDLE
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06626]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes at
    least one of and no more than two of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT,
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, an
    element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes one of the other flags, and pname:renderPass is
    dlink:VK_NULL_HANDLE, the value of
    slink:VkPipelineRenderingCreateInfo::pname:viewMask used by this
    pipeline and that specified by the library must: be identical
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06627]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes at least one of and no more than two of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT,
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT,
    another element of
    slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes one of
    the other flags, and pname:renderPass was dlink:VK_NULL_HANDLE for both
    libraries, the value of
    slink:VkPipelineRenderingCreateInfo::pname:viewMask set by each library
    must: be identical
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06628]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes at least one of and no more than two of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT,
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT,
    and another element of
    slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes one of
    the other flags, the pname:renderPass objects used to create each
    library must: be compatible or all equal to dlink:VK_NULL_HANDLE
  * [[VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-06629]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> pname:pMultisampleState must: be `NULL` or a
    valid pointer to a valid slink:VkPipelineMultisampleStateCreateInfo
    structure
  * [[VUID-VkGraphicsPipelineCreateInfo-renderpass-06631]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>>
ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
    and pname:renderpass is not dlink:VK_NULL_HANDLE, then
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
    pname:pMultisampleState must: not be `NULL`
ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
  * [[VUID-VkGraphicsPipelineCreateInfo-Input-06632]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> with a fragment shader that either enables
    <<primsrast-sampleshading, sample shading>> or decorates any variable in
    the code:Input storage class with code:Sample, then
    pname:pMultisampleState must: not be `NULL`
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06633]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT with a
    pname:pMultisampleState that was not `NULL`, and an element of
    slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries was created with
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT,
    pname:pMultisampleState must: be _identically defined_ to that used to
    create the library
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06634]]
    If an element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    was created with
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT with a
    pname:pMultisampleState that was not `NULL`, and if
    slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT,
    pname:pMultisampleState must: be _identically defined_ to that used to
    create the library
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06635]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    was created with
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT with a
    pname:pMultisampleState that was not `NULL`, and if a different element
    of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries was created
    with
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT,
    the pname:pMultisampleState used to create each library must: be
    _identically defined_
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06636]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    was created with
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT and
    a value of pname:pMultisampleState->sampleShading equal ename:VK_TRUE,
    and if a different element of
    slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries was created with
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, the
    pname:pMultisampleState used to create each library must: be
    _identically defined_
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06637]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT,
    pname:pMultisampleState->sampleShading is ename:VK_TRUE, and an element
    of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries was created
    with ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, the
    pname:pMultisampleState used to create that library must: be
    _identically defined_ pname:pMultisampleState
ifdef::VK_KHR_fragment_shading_rate[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06638]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    only one of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an
    element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes the other flag, values specified in
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR for both this
    pipeline and that library must: be identical
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06639]]
    If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries
    includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and
    another element includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, values
    specified in slink:VkPipelineFragmentShadingRateStateCreateInfoKHR for
    both this pipeline and that library must: be identical
endif::VK_KHR_fragment_shading_rate[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06640]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT,
    pname:pStages must: be a valid pointer to an array of pname:stageCount
    valid slink:VkPipelineShaderStageCreateInfo structures
ifndef::VK_EXT_extended_dynamic_state3[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06641]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT,
    pname:pRasterizationState must: be a valid pointer to a valid
    slink:VkPipelineRasterizationStateCreateInfo structure
endif::VK_EXT_extended_dynamic_state3[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06642]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, pname:layout
    must: be a valid slink:VkPipelineLayout handle
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06643]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT,
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT,
    and pname:renderPass is not dlink:VK_NULL_HANDLE, pname:renderPass must:
    be a valid slink:VkRenderPass handle
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06644]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT,
    pname:stageCount must: be greater than `0`
ifdef::VK_KHR_pipeline_executable_properties[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06645]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags is
    non-zero, if pname:flags includes
    ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR, any
    libraries must: have also been created with
    ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06646]]
    If slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes more
    than one library, and any library was created with
    ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR, all
    libraries must: have also been created with
    ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR
  * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06647]]
    If slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes at
    least one library,
    slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags is non-zero,
    and any library was created with
    ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR,
    pname:flags must: include
    ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR
endif::VK_KHR_pipeline_executable_properties[]
  * [[VUID-VkGraphicsPipelineCreateInfo-None-07826]]
    If the pipeline includes a <<pipelines-graphics-subsets-complete,
    complete set of state>>, and there are no libraries included in
    slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries, then
    slink:VkPipelineLayout must: be a valid pipeline layout
  * [[VUID-VkGraphicsPipelineCreateInfo-layout-07827]]
    If the pipeline includes a <<pipelines-graphics-subsets-complete,
    complete set of state>> specified entirely by libraries, and each
    library was created with a slink:VkPipelineLayout created without
    ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then
    pname:layout must: be <<descriptorsets-compatibility,compatible>> with
    the layouts in those libraries
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06729]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT, the pipeline
    includes a <<pipelines-graphics-subsets-complete, complete set of
    state>> specified entirely by libraries, and each library was created
    with a slink:VkPipelineLayout created with
    ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then
    pname:layout must: be <<descriptorsets-compatibility,compatible>> with
    the union of the libraries' pipeline layouts other than the
    inclusion/exclusion of
    ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-06730]]
    If pname:flags does not include
    ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT, the pipeline
    includes a <<pipelines-graphics-subsets-complete, complete set of
    state>> specified entirely by libraries, and each library was created
    with a slink:VkPipelineLayout created with
    ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then
    pname:layout must: be <<descriptorsets-compatibility, compatible>> with
    the union of the libraries' pipeline layouts
endif::VK_EXT_graphics_pipeline_library[]
ifdef::VK_EXT_conservative_rasterization[]
  * [[VUID-VkGraphicsPipelineCreateInfo-conservativePointAndLineRasterization-08892]]
    If <<limits-conservativePointAndLineRasterization,
    pname:conservativePointAndLineRasterization>> is not supported; the
    pipeline is being created with
    <<pipelines-graphics-subsets-vertex-input, vertex input state>> and
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>>; the pipeline does not include a geometry shader; and the value
    of slink:VkPipelineInputAssemblyStateCreateInfo::pname:topology is
    ename:VK_PRIMITIVE_TOPOLOGY_POINT_LIST,
    ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST, or
    ename:VK_PRIMITIVE_TOPOLOGY_LINE_STRIP,
ifdef::VK_EXT_extended_dynamic_state3[]
    and either ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is
    not enabled or
    <<limits-dynamicPrimitiveTopologyUnrestricted,pname:dynamicPrimitiveTopologyUnrestricted>>
    is ename:VK_FALSE,
endif::VK_EXT_extended_dynamic_state3[]
    then
    slink:VkPipelineRasterizationConservativeStateCreateInfoEXT::pname:conservativeRasterizationMode
    must: be ename:VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-conservativePointAndLineRasterization-06760]]
    If <<limits-conservativePointAndLineRasterization,
    pname:conservativePointAndLineRasterization>> is not supported, the
    pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and the pipeline includes a geometry
    shader with either the code:OutputPoints or code:OutputLineStrip
    execution modes,
    slink:VkPipelineRasterizationConservativeStateCreateInfoEXT::pname:conservativeRasterizationMode
    must: be ename:VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT
ifdef::VK_NV_mesh_shader[]
  * [[VUID-VkGraphicsPipelineCreateInfo-conservativePointAndLineRasterization-06761]]
    If <<limits-conservativePointAndLineRasterization,
    pname:conservativePointAndLineRasterization>> is not supported, the
    pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and the pipeline includes a mesh
    shader with either the code:OutputPoints or code:OutputLinesNV execution
    modes,
    slink:VkPipelineRasterizationConservativeStateCreateInfoEXT::pname:conservativeRasterizationMode
    must: be ename:VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT
endif::VK_NV_mesh_shader[]
endif::VK_EXT_conservative_rasterization[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-06894]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>> but not
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>,
    elements of pname:pStages must: not have pname:stage set to
    ename:VK_SHADER_STAGE_FRAGMENT_BIT
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-06895]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> but not
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>>, elements of pname:pStages must: not have pname:stage set to a
    shader stage which participates in pre-rasterization
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-06896]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, all elements of pname:pStages must:
    have a pname:stage set to a shader stage which participates in
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> or
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>>
  * [[VUID-VkGraphicsPipelineCreateInfo-stage-06897]]
    If the pipeline requires <<pipelines-graphics-subsets-fragment-shader,
    fragment shader state>> and/or
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>>, any value of pname:stage must: not be set in more than one
    element of pname:pStages
ifdef::VK_EXT_extended_dynamic_state3[]
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3TessellationDomainOrigin-07370]]
    If the <<features-extendedDynamicState3TessellationDomainOrigin,
    pname:extendedDynamicState3TessellationDomainOrigin>> feature is not
    enabled, there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3DepthClampEnable-07371]]
    If the <<features-extendedDynamicState3DepthClampEnable,
    pname:extendedDynamicState3DepthClampEnable>> feature is not enabled,
    there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to ename:VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3PolygonMode-07372]]
    If the <<features-extendedDynamicState3PolygonMode,
    pname:extendedDynamicState3PolygonMode>> feature is not enabled, there
    must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to ename:VK_DYNAMIC_STATE_POLYGON_MODE_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3RasterizationSamples-07373]]
    If the <<features-extendedDynamicState3RasterizationSamples,
    pname:extendedDynamicState3RasterizationSamples>> feature is not
    enabled, there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3SampleMask-07374]]
    If the <<features-extendedDynamicState3SampleMask,
    pname:extendedDynamicState3SampleMask>> feature is not enabled, there
    must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to ename:VK_DYNAMIC_STATE_SAMPLE_MASK_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3AlphaToCoverageEnable-07375]]
    If the <<features-extendedDynamicState3AlphaToCoverageEnable,
    pname:extendedDynamicState3AlphaToCoverageEnable>> feature is not
    enabled, there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3AlphaToOneEnable-07376]]
    If the <<features-extendedDynamicState3AlphaToOneEnable,
    pname:extendedDynamicState3AlphaToOneEnable>> feature is not enabled,
    there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3LogicOpEnable-07377]]
    If the <<features-extendedDynamicState3LogicOpEnable,
    pname:extendedDynamicState3LogicOpEnable>> feature is not enabled, there
    must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to ename:VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorBlendEnable-07378]]
    If the <<features-extendedDynamicState3ColorBlendEnable,
    pname:extendedDynamicState3ColorBlendEnable>> feature is not enabled,
    there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to ename:VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorBlendEquation-07379]]
    If the <<features-extendedDynamicState3ColorBlendEquation,
    pname:extendedDynamicState3ColorBlendEquation>> feature is not enabled,
    there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorWriteMask-07380]]
    If the <<features-extendedDynamicState3ColorWriteMask,
    pname:extendedDynamicState3ColorWriteMask>> feature is not enabled,
    there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to ename:VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3RasterizationStream-07381]]
    If the <<features-extendedDynamicState3RasterizationStream,
    pname:extendedDynamicState3RasterizationStream>> feature is not enabled,
    there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ConservativeRasterizationMode-07382]]
    If the <<features-extendedDynamicState3ConservativeRasterizationMode,
    pname:extendedDynamicState3ConservativeRasterizationMode>> feature is
    not enabled, there must: be no element of the pname:pDynamicStates
    member of pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ExtraPrimitiveOverestimationSize-07383]]
    If the <<features-extendedDynamicState3ExtraPrimitiveOverestimationSize,
    pname:extendedDynamicState3ExtraPrimitiveOverestimationSize>> feature is
    not enabled, there must: be no element of the pname:pDynamicStates
    member of pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3DepthClipEnable-07384]]
    If the <<features-extendedDynamicState3DepthClipEnable,
    pname:extendedDynamicState3DepthClipEnable>> feature is not enabled,
    there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to ename:VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3SampleLocationsEnable-07385]]
    If the <<features-extendedDynamicState3SampleLocationsEnable,
    pname:extendedDynamicState3SampleLocationsEnable>> feature is not
    enabled, there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorBlendAdvanced-07386]]
    If the <<features-extendedDynamicState3ColorBlendAdvanced,
    pname:extendedDynamicState3ColorBlendAdvanced>> feature is not enabled,
    there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ProvokingVertexMode-07387]]
    If the <<features-extendedDynamicState3ProvokingVertexMode,
    pname:extendedDynamicState3ProvokingVertexMode>> feature is not enabled,
    there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3LineRasterizationMode-07388]]
    If the <<features-extendedDynamicState3LineRasterizationMode,
    pname:extendedDynamicState3LineRasterizationMode>> feature is not
    enabled, there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3LineStippleEnable-07389]]
    If the <<features-extendedDynamicState3LineStippleEnable,
    pname:extendedDynamicState3LineStippleEnable>> feature is not enabled,
    there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3DepthClipNegativeOneToOne-07390]]
    If the <<features-extendedDynamicState3DepthClipNegativeOneToOne,
    pname:extendedDynamicState3DepthClipNegativeOneToOne>> feature is not
    enabled, there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ViewportWScalingEnable-07391]]
    If the <<features-extendedDynamicState3ViewportWScalingEnable,
    pname:extendedDynamicState3ViewportWScalingEnable>> feature is not
    enabled, there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ViewportSwizzle-07392]]
    If the <<features-extendedDynamicState3ViewportSwizzle,
    pname:extendedDynamicState3ViewportSwizzle>> feature is not enabled,
    there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to ename:VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageToColorEnable-07393]]
    If the <<features-extendedDynamicState3CoverageToColorEnable,
    pname:extendedDynamicState3CoverageToColorEnable>> feature is not
    enabled, there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageToColorLocation-07394]]
    If the <<features-extendedDynamicState3CoverageToColorLocation,
    pname:extendedDynamicState3CoverageToColorLocation>> feature is not
    enabled, there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageModulationMode-07395]]
    If the <<features-extendedDynamicState3CoverageModulationMode,
    pname:extendedDynamicState3CoverageModulationMode>> feature is not
    enabled, there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageModulationTableEnable-07396]]
    If the <<features-extendedDynamicState3CoverageModulationTableEnable,
    pname:extendedDynamicState3CoverageModulationTableEnable>> feature is
    not enabled, there must: be no element of the pname:pDynamicStates
    member of pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageModulationTable-07397]]
    If the <<features-extendedDynamicState3CoverageModulationTable,
    pname:extendedDynamicState3CoverageModulationTable>> feature is not
    enabled, there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageReductionMode-07398]]
    If the <<features-extendedDynamicState3CoverageReductionMode,
    pname:extendedDynamicState3CoverageReductionMode>> feature is not
    enabled, there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3RepresentativeFragmentTestEnable-07399]]
    If the <<features-extendedDynamicState3RepresentativeFragmentTestEnable,
    pname:extendedDynamicState3RepresentativeFragmentTestEnable>> feature is
    not enabled, there must: be no element of the pname:pDynamicStates
    member of pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV
  * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ShadingRateImageEnable-07400]]
    If the <<features-extendedDynamicState3ShadingRateImageEnable,
    pname:extendedDynamicState3ShadingRateImageEnable>> feature is not
    enabled, there must: be no element of the pname:pDynamicStates member of
    pname:pDynamicState set to
    ename:VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV
endif::VK_EXT_extended_dynamic_state3[]
ifdef::VK_EXT_opacity_micromap[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-07401]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT
endif::VK_EXT_opacity_micromap[]
ifdef::VK_NV_displacement_micromap[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-07997]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV
endif::VK_NV_displacement_micromap[]
ifdef::VK_QCOM_multiview_per_view_viewports[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07730]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and no element of the
    pname:pDynamicStates member of pname:pDynamicState is
    ename:VK_DYNAMIC_STATE_VIEWPORT or
    ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, and if
    <<features-multiview-per-view-viewports,
    pname:multiviewPerViewViewports>> is enabled, then the index of the most
    significant bit in each element of
    slink:VkRenderPassMultiviewCreateInfo::pname:pViewMasks must: be less
    than pname:pViewportState::pname:viewportCount
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07731]]
    If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>, and no element of the
    pname:pDynamicStates member of pname:pDynamicState is
    ename:VK_DYNAMIC_STATE_SCISSOR or
    ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT, and if
    <<features-multiview-per-view-viewports,
    pname:multiviewPerViewViewports>> is enabled, then the index of the most
    significant bit in each element of
    slink:VkRenderPassMultiviewCreateInfo::pname:pViewMasks must: be less
    than pname:pViewportState::pname:scissorCount
endif::VK_QCOM_multiview_per_view_viewports[]
ifdef::VK_EXT_shader_tile_image[]
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-08711]]
    If pname:pStages includes a fragment shader stage,
    ename:VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE is not set in
    slink:VkPipelineDynamicStateCreateInfo::pname:pDynamicStates, and the
    fragment shader declares the code:EarlyFragmentTests execution mode and
    uses code:OpDepthAttachmentReadEXT, the pname:depthWriteEnable member of
    slink:VkPipelineDepthStencilStateCreateInfo must: be ename:VK_FALSE
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-08712]]
    If pname:pStages includes a fragment shader stage,
    ename:VK_DYNAMIC_STATE_STENCIL_WRITE_MASK is not set in
    slink:VkPipelineDynamicStateCreateInfo::pname:pDynamicStates, and the
    fragment shader declares the code:EarlyFragmentTests execution mode and
    uses code:OpStencilAttachmentReadEXT, the value of
    slink:VkStencilOpState::pname:writeMask for both pname:front and
    pname:back in slink:VkPipelineDepthStencilStateCreateInfo must: be `0`
endif::VK_EXT_shader_tile_image[]
ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
  * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-08744]]
    If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline requires
    <<pipelines-graphics-subsets-fragment-output, fragment output state>> or
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>,
    the pipeline enables <<primsrast-sampleshading, sample shading>>,
    pname:rasterizationSamples is not dynamic, and the pname:pNext chain
    includes a slink:VkPipelineRenderingCreateInfo structure,
    pname:rasterizationSamples must: be a bit value that is set in
    pname:imageCreateSampleCounts (as defined in
    <<resources-image-creation-limits,Image Creation Limits>>) for every
    element of pname:depthAttachmentFormat, pname:stencilAttachmentFormat
    and the pname:pColorAttachmentFormats array which is not
    ename:VK_FORMAT_UNDEFINED
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
ifndef::VK_EXT_graphics_pipeline_library[]
  * [[VUID-VkGraphicsPipelineCreateInfo-None-08893]]
    The pipeline must: be created with
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>>
  * [[VUID-VkGraphicsPipelineCreateInfo-pStages-08894]]
    If pname:pStages includes a vertex shader stage, the pipeline must: be
    created with <<pipelines-graphics-subsets-vertex-input, vertex input
    state>>
  * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-08896]]
    If
ifdef::VK_EXT_extended_dynamic_state2,VK_VERSION_1_3[]
    pname:pDynamicState->pDynamicStates includes
    ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE, or if it does not and
endif::VK_EXT_extended_dynamic_state2,VK_VERSION_1_3[]
    pname:pRasterizationState->rasterizerDiscardEnable is ename:VK_FALSE,
    the pipeline must: be created with
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
    and <<pipelines-graphics-subsets-fragment-output,fragment output
    interface state>>
endif::VK_EXT_graphics_pipeline_library[]
ifdef::VK_EXT_graphics_pipeline_library[]
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-08897]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT,
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>> is specified either in a library or by the inclusion of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT,
    and that state includes a vertex shader stage in pname:pStages, the
    pipeline must: define <<pipelines-graphics-subsets-vertex-input, vertex
    input state>>
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-08898]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT, and
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>> is not specified, the pipeline must: define
    <<pipelines-graphics-subsets-vertex-input, vertex input state>>
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-08899]]
    If pname:flags does not include
    ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR,
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>> is specified either in a library or by the inclusion of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT,
    and that state includes a vertex shader stage in pname:pStages, the
    pipeline must: either define
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>> or include that state in a linked pipeline library
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-08900]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT the
    pipeline must: define <<pipelines-graphics-subsets-pre-rasterization,
    pre-rasterization shader state>>
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-08901]]
    If pname:flags does not include
    ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, the pipeline must: either
    define <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization
    shader state>> or include that state in a linked pipeline library
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-08903]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT,
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>> is specified either in a library or by the inclusion of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT,
    and that state
ifdef::VK_EXT_extended_dynamic_state2,VK_VERSION_1_3[]
    either includes ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE or
endif::VK_EXT_extended_dynamic_state2,VK_VERSION_1_3[]
    has pname:pRasterizationState->rasterizerDiscardEnable set to
    ename:VK_FALSE, the pipeline must: define
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-08904]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>> is not specified, the pipeline must: define
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-08906]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT,
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>> is specified either in a library or by the inclusion of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT,
    and that state
ifdef::VK_EXT_extended_dynamic_state2,VK_VERSION_1_3[]
    either includes ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE or
endif::VK_EXT_extended_dynamic_state2,VK_VERSION_1_3[]
    has pname:pRasterizationState->rasterizerDiscardEnable set to
    ename:VK_FALSE, the pipeline must: define
    <<pipelines-graphics-subsets-fragment-output,fragment output interface
    state>>
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-08907]]
    If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>> is not specified, the pipeline must: define
    <<pipelines-graphics-subsets-fragment-output,fragment output interface
    state>>
  * [[VUID-VkGraphicsPipelineCreateInfo-flags-08909]]
    If pname:flags does not include
    ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR,
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    state>> is specified either in a library or by the inclusion of
    ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT,
    and that state
ifdef::VK_EXT_extended_dynamic_state2,VK_VERSION_1_3[]
    either includes ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE or
endif::VK_EXT_extended_dynamic_state2,VK_VERSION_1_3[]
    has pname:pRasterizationState->rasterizerDiscardEnable set to
    ename:VK_FALSE, the pipeline must: define
    <<pipelines-graphics-subsets-fragment-output,fragment output interface
    state>> and <<pipelines-graphics-subsets-fragment-shader, fragment
    shader state>> or include those states in linked pipeline libraries
endif::VK_EXT_graphics_pipeline_library[]
  * [[VUID-VkGraphicsPipelineCreateInfo-None-09043]]
    If
ifdef::VK_EXT_extended_dynamic_state3[]
    pname:pDynamicState->pDynamicStates does not include
    ename:VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and
endif::VK_EXT_extended_dynamic_state3[]
    the format of any color attachment is
    ename:VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the pname:colorWriteMask member
    of the corresponding element of pname:pColorBlendState->pAttachments
    must: either include all of ename:VK_COLOR_COMPONENT_R_BIT,
    ename:VK_COLOR_COMPONENT_G_BIT, and ename:VK_COLOR_COMPONENT_B_BIT, or
    none of them
ifdef::VK_ANDROID_external_format_resolve[]
ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
  * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09301]]
    If the <<features-externalFormatResolve, pname:externalFormatResolve>>
    feature is enabled, the pipeline requires
    <<pipelines-graphics-subsets-fragment-output, fragment output interface
    state>>, pname:renderPass is dlink:VK_NULL_HANDLE, and
    slink:VkExternalFormatANDROID::pname:externalFormat is not `0`,
    slink:VkPipelineRenderingCreateInfo::pname:viewMask must: be `0`
  * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09304]]
    If the <<features-externalFormatResolve, pname:externalFormatResolve>>
    feature is enabled, the pipeline requires
    <<pipelines-graphics-subsets-fragment-output, fragment output interface
    state>>, pname:renderPass is dlink:VK_NULL_HANDLE,
    slink:VkExternalFormatANDROID::pname:externalFormat is not `0`, and
    pname:rasterizationSamples is not dynamic,
    slink:VkPipelineMultisampleStateCreateInfo::pname:rasterizationSamples
    must: be `1`
  * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09305]]
    If the <<features-externalFormatResolve, pname:externalFormatResolve>>
    feature is enabled, the pipeline requires
    <<pipelines-graphics-subsets-fragment-output, fragment output interface
    state>>, pname:renderPass is dlink:VK_NULL_HANDLE, and
    slink:VkExternalFormatANDROID::pname:externalFormat is not `0`, and
    pname:blendEnable is not dynamic, the pname:blendEnable member of each
    element of pname:pColorBlendState->pAttachments must: be ename:VK_FALSE
ifdef::VK_KHR_fragment_shading_rate[]
  * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09306]]
    If the <<features-externalFormatResolve, pname:externalFormatResolve>>
    feature is enabled, the pipeline requires
    <<pipelines-graphics-subsets-fragment-output, fragment output interface
    state>>, pname:renderPass is dlink:VK_NULL_HANDLE, and
    slink:VkExternalFormatANDROID::pname:externalFormat is not `0`, and
    pname:pDynamicState->pDynamicStates does not include
    ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:width must:
    be `1`
  * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09307]]
    If the <<features-externalFormatResolve, pname:externalFormatResolve>>
    feature is enabled, the pipeline requires
    <<pipelines-graphics-subsets-fragment-output, fragment output interface
    state>>, pname:renderPass is dlink:VK_NULL_HANDLE, and
    slink:VkExternalFormatANDROID::pname:externalFormat is not `0`, and
    pname:pDynamicState->pDynamicStates does not include
    ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:height
    must: be `1`
  * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09308]]
    If the <<features-externalFormatResolve, pname:externalFormatResolve>>
    feature is enabled, the pipeline requires
    <<pipelines-graphics-subsets-fragment-output, pre-rasterization shader
    state>> and <<pipelines-graphics-subsets-fragment-output, fragment
    output interface state>>, pname:renderPass is dlink:VK_NULL_HANDLE, and
    slink:VkExternalFormatANDROID::pname:externalFormat is not `0`, the last
    <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader
    stage>> must: not statically use a variable with the
    code:PrimitiveShadingRateKHR built-in
endif::VK_KHR_fragment_shading_rate[]
  * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09309]]
    If the <<features-externalFormatResolve, pname:externalFormatResolve>>
    feature is enabled, the pipeline requires
    <<pipelines-graphics-subsets-fragment-output, fragment output interface
    state>>, pname:renderPass is dlink:VK_NULL_HANDLE, and
    slink:VkExternalFormatANDROID::pname:externalFormat is not `0`,
    slink:VkPipelineRenderingCreateInfo::pname:colorAttachmentCount must: be
    `1`
  * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09310]]
    If the <<features-externalFormatResolve, pname:externalFormatResolve>>
    feature is enabled, the pipeline requires
    <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>
    and <<pipelines-graphics-subsets-fragment-output, fragment output
    interface state>>, pname:renderPass is dlink:VK_NULL_HANDLE, and
    slink:VkExternalFormatANDROID::pname:externalFormat is not `0`, the
    fragment shader must: not declare the code:DepthReplacing or
    code:StencilRefReplacingEXT execution modes
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
  * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09313]]
    If the <<features-externalFormatResolve, pname:externalFormatResolve>>
    feature is enabled, the pipeline requires
    <<pipelines-graphics-subsets-fragment-output, fragment output interface
    state>>, pname:renderPass is not dlink:VK_NULL_HANDLE, pname:subpass
    includes an external format resolve attachment, and
    pname:rasterizationSamples is not dynamic,
    slink:VkPipelineMultisampleStateCreateInfo::pname:rasterizationSamples
    must: be ename:VK_SAMPLE_COUNT_1_BIT
  * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09314]]
    If the <<features-externalFormatResolve, pname:externalFormatResolve>>
    feature is enabled, the pipeline requires
    <<pipelines-graphics-subsets-fragment-output, fragment output interface
    state>>, pname:renderPass is not dlink:VK_NULL_HANDLE, pname:subpass
    includes an external format resolve attachment, and pname:blendEnable is
    not dynamic, the pname:blendEnable member of each element of
    pname:pColorBlendState->pAttachments must: be ename:VK_FALSE
ifdef::VK_KHR_fragment_shading_rate[]
  * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09315]]
    If the <<features-externalFormatResolve, pname:externalFormatResolve>>
    feature is enabled, the pipeline requires
    <<pipelines-graphics-subsets-fragment-output, fragment output interface
    state>>, pname:renderPass is not dlink:VK_NULL_HANDLE, pname:subpass
    includes an external format resolve attachment, and
    pname:pDynamicState->pDynamicStates does not include
    ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:width must:
    be `1`
  * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09316]]
    If the <<features-externalFormatResolve, pname:externalFormatResolve>>
    feature is enabled, the pipeline requires
    <<pipelines-graphics-subsets-fragment-output, fragment output interface
    state>>, pname:renderPass is not dlink:VK_NULL_HANDLE, pname:subpass
    includes an external format resolve attachment, and
    pname:pDynamicState->pDynamicStates does not include
    ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR,
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:height
    must: be `1`
  * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09317]]
    If the <<features-externalFormatResolve, pname:externalFormatResolve>>
    feature is enabled, the pipeline requires
    <<pipelines-graphics-subsets-fragment-output, pre-rasterization shader
    state>> and <<pipelines-graphics-subsets-fragment-output, fragment
    output interface state>>, pname:renderPass is not dlink:VK_NULL_HANDLE,
    and pname:subpass includes an external format resolve attachment, the
    last <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization
    shader stage>> must: not statically use a variable with the
    code:PrimitiveShadingRateKHR built-in
endif::VK_KHR_fragment_shading_rate[]
endif::VK_ANDROID_external_format_resolve[]
****
ifdef::VKSC_VERSION_1_0[]
ifdef::hidden[]
// tag::scdeviation[]
  * slink:VkGraphicsPipelineCreateInfo::pname:basePipelineHandle must: be
    dlink:VK_NULL_HANDLE <<SCID-8>>.
  * slink:VkGraphicsPipelineCreateInfo::pname:basePipelineIndex must: be
    zero <<SCID-8>>.
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

include::{generated}/validity/structs/VkGraphicsPipelineCreateInfo.adoc[]
--

ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
[open,refpage='VkPipelineRenderingCreateInfo',desc='Structure specifying attachment formats',type='structs',alias='VkPipelineRenderingCreateInfoKHR']
--
The sname:VkPipelineRenderingCreateInfo structure is defined as:

include::{generated}/api/structs/VkPipelineRenderingCreateInfo.adoc[]

ifdef::VK_KHR_dynamic_rendering[]
or the equivalent

include::{generated}/api/structs/VkPipelineRenderingCreateInfoKHR.adoc[]
endif::VK_KHR_dynamic_rendering[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:viewMask is the viewMask used for rendering.
  * pname:colorAttachmentCount is the number of entries in
    pname:pColorAttachmentFormats
  * pname:pColorAttachmentFormats is a pointer to an array of elink:VkFormat
    values defining the format of color attachments used in this pipeline.
  * pname:depthAttachmentFormat is a elink:VkFormat value defining the
    format of the depth attachment used in this pipeline.
  * pname:stencilAttachmentFormat is a elink:VkFormat value defining the
    format of the stencil attachment used in this pipeline.

When a pipeline is created without a slink:VkRenderPass, if the pname:pNext
chain of slink:VkGraphicsPipelineCreateInfo includes this structure, it
specifies the view mask and format of attachments used for rendering.
If this structure is not specified, and the pipeline does not include a
slink:VkRenderPass, pname:viewMask and pname:colorAttachmentCount are `0`,
and pname:depthAttachmentFormat and pname:stencilAttachmentFormat are
ename:VK_FORMAT_UNDEFINED.
If a graphics pipeline is created with a valid slink:VkRenderPass,
parameters of this structure are ignored.

If pname:depthAttachmentFormat, pname:stencilAttachmentFormat, or any
element of pname:pColorAttachmentFormats is ename:VK_FORMAT_UNDEFINED, it
indicates that the corresponding attachment is unused within the render
pass.
Valid formats indicate that an attachment can: be used - but it is still
valid to set the attachment to `NULL` when beginning rendering.

ifdef::VK_ANDROID_external_format_resolve[]
If the render pass is going to be used with an external format resolve
attachment, a slink:VkExternalFormatANDROID structure must: also be included
in the pname:pNext chain of slink:VkGraphicsPipelineCreateInfo, defining the
external format of the resolve attachment that will be used.
endif::VK_ANDROID_external_format_resolve[]

include::{generated}/validity/structs/VkPipelineRenderingCreateInfo.adoc[]
--
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]

ifdef::VK_KHR_maintenance5[]
[open,refpage='VkPipelineCreateFlags2CreateInfoKHR',desc='Extended pipeline create flags',type='structs']
--
The sname:VkPipelineCreateFlags2CreateInfoKHR structure is defined as:

include::{generated}/api/structs/VkPipelineCreateFlags2CreateInfoKHR.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:flags is a bitmask of elink:VkPipelineCreateFlagBits2KHR
    specifying how a pipeline will be generated.

If this structure is included in the pname:pNext chain of a pipeline
creation structure, pname:flags is used instead of the corresponding
pname:flags value passed in that creation structure, allowing additional
creation flags to be specified.

include::{generated}/validity/structs/VkPipelineCreateFlags2CreateInfoKHR.adoc[]
--

[open,refpage='VkPipelineCreateFlagBits2KHR',desc='Bitmask controlling how a pipeline is created',type='enums']
--
Bits which can: be set in
slink:VkPipelineCreateFlags2CreateInfoKHR::pname:flags, specifying how a
pipeline is created, are:

include::{generated}/api/enums/VkPipelineCreateFlagBits2KHR.adoc[]

// Note - when editing this section, make sure that any relevant changes
// are mirrored in VkPipelineCreateFlagBits2KHR/VkPipelineCreateFlagBits

  * ename:VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT_KHR specifies that
    the created pipeline will not be optimized.
    Using this flag may: reduce the time taken to create the pipeline.
  * ename:VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT_KHR specifies that the
    pipeline to be created is allowed to be the parent of a pipeline that
    will be created in a subsequent pipeline creation call.
  * ename:VK_PIPELINE_CREATE_2_DERIVATIVE_BIT_KHR specifies that the
    pipeline to be created will be a child of a previously created parent
    pipeline.
ifdef::VK_VERSION_1_1,VK_KHR_device_group[]
ifdef::VK_VERSION_1_1,VK_KHR_multiview[]
  * ename:VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR
    specifies that any shader input variables decorated as code:ViewIndex
    will be assigned values as if they were decorated as code:DeviceIndex.
endif::VK_VERSION_1_1,VK_KHR_multiview[]
  * ename:VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT_KHR specifies that a
    compute pipeline can: be used with flink:vkCmdDispatchBase with a
    non-zero base workgroup.
endif::VK_VERSION_1_1,VK_KHR_device_group[]
ifdef::VK_NV_ray_tracing[]
  * ename:VK_PIPELINE_CREATE_2_DEFER_COMPILE_BIT_NV specifies that a
    pipeline is created with all shaders in the deferred state.
    Before using the pipeline the application must: call
    flink:vkCompileDeferredNV exactly once on each shader in the pipeline
    before using the pipeline.
endif::VK_NV_ray_tracing[]
ifdef::VK_KHR_pipeline_executable_properties[]
  * ename:VK_PIPELINE_CREATE_2_CAPTURE_STATISTICS_BIT_KHR specifies that the
    shader compiler should capture statistics for the pipeline executables
    produced by the compile process which can: later be retrieved by calling
    flink:vkGetPipelineExecutableStatisticsKHR.
    Enabling this flag must: not affect the final compiled pipeline but may:
    disable pipeline caching or otherwise affect pipeline creation time.
  * ename:VK_PIPELINE_CREATE_2_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR
    specifies that the shader compiler should capture the internal
    representations of pipeline executables produced by the compile process
    which can: later be retrieved by calling
    flink:vkGetPipelineExecutableInternalRepresentationsKHR.
    Enabling this flag must: not affect the final compiled pipeline but may:
    disable pipeline caching or otherwise affect pipeline creation time.
ifdef::VK_KHR_pipeline_library[]
    When capturing IR from pipelines created with pipeline libraries, there
    is no guarantee that IR from libraries can: be retrieved from the linked
    pipeline.
    Applications should: retrieve IR from each library, and any linked
    pipelines, separately.
endif::VK_KHR_pipeline_library[]
endif::VK_KHR_pipeline_executable_properties[]
ifdef::VK_KHR_pipeline_library[]
  * ename:VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR specifies that the pipeline
    cannot: be used directly, and instead defines a _pipeline library_ that
    can: be combined with other pipelines using the
    slink:VkPipelineLibraryCreateInfoKHR structure.
ifdef::VK_KHR_ray_tracing_pipeline,VK_EXT_graphics_pipeline_library[]
    This is available in
ifdef::VK_KHR_ray_tracing_pipeline[ray tracing]
ifdef::VK_KHR_ray_tracing_pipeline+VK_EXT_graphics_pipeline_library[and]
ifdef::VK_EXT_graphics_pipeline_library[graphics]
    pipelines.
endif::VK_KHR_ray_tracing_pipeline,VK_EXT_graphics_pipeline_library[]
endif::VK_KHR_pipeline_library[]
ifdef::VK_KHR_ray_tracing_pipeline[]
  * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR
    specifies that an any-hit shader will always be present when an any-hit
    shader would be executed.
    A NULL any-hit shader is an any-hit shader which is effectively
    ename:VK_SHADER_UNUSED_KHR, such as from a shader group consisting
    entirely of zeros.
  * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR
    specifies that a closest hit shader will always be present when a
    closest hit shader would be executed.
    A NULL closest hit shader is a closest hit shader which is effectively
    ename:VK_SHADER_UNUSED_KHR, such as from a shader group consisting
    entirely of zeros.
  * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR
    specifies that a miss shader will always be present when a miss shader
    would be executed.
    A NULL miss shader is a miss shader which is effectively
    ename:VK_SHADER_UNUSED_KHR, such as from a shader group consisting
    entirely of zeros.
  * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR
    specifies that an intersection shader will always be present when an
    intersection shader would be executed.
    A NULL intersection shader is an intersection shader which is
    effectively ename:VK_SHADER_UNUSED_KHR, such as from a shader group
    consisting entirely of zeros.
  * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR specifies
    that triangle primitives will be skipped during traversal using
    code:OpTraceRayKHR.
  * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_AABBS_BIT_KHR specifies that
    AABB primitives will be skipped during traversal using
    code:OpTraceRayKHR.
  * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
    specifies that the shader group handles can: be saved and reused on a
    subsequent run (e.g. for trace capture and replay).
endif::VK_KHR_ray_tracing_pipeline[]
ifdef::VK_NV_device_generated_commands[]
  * ename:VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_NV specifies that the
    pipeline can be used in combination with <<device-generated-commands>>.
endif::VK_NV_device_generated_commands[]
ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
  * ename:VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_KHR
    specifies that pipeline creation will fail if a compile is required for
    creation of a valid slink:VkPipeline object;
    ename:VK_PIPELINE_COMPILE_REQUIRED will be returned by pipeline
    creation, and the slink:VkPipeline will be set to dlink:VK_NULL_HANDLE.
  * When creating multiple pipelines,
    ename:VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT_KHR specifies
    that control will be returned to the application if any individual
    pipeline returns a result which is not ename:VK_SUCCESS rather than
    continuing to create additional pipelines.
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
ifdef::VK_NV_ray_tracing_motion_blur[]
  * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_MOTION_BIT_NV specifies
    that the pipeline is allowed to use code:OpTraceRayMotionNV.
endif::VK_NV_ray_tracing_motion_blur[]
ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
ifdef::VK_KHR_fragment_shading_rate[]
  * ename:VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
    specifies that the pipeline will be used with a fragment shading rate
    attachment.
endif::VK_KHR_fragment_shading_rate[]
ifdef::VK_EXT_fragment_density_map[]
  * ename:VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT
    specifies that the pipeline will be used with a fragment density map
    attachment.
endif::VK_EXT_fragment_density_map[]
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
ifdef::VK_EXT_graphics_pipeline_library[]
  * ename:VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT specifies that
    pipeline libraries being linked into this library should: have link time
    optimizations applied.
    If this bit is omitted, implementations should: instead perform linking
    as rapidly as possible.
  * ename:VK_PIPELINE_CREATE_2_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT
    specifies that pipeline libraries should retain any information
    necessary to later perform an optimal link with
    ename:VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT.
endif::VK_EXT_graphics_pipeline_library[]
ifdef::VK_EXT_descriptor_buffer[]
  * ename:VK_PIPELINE_CREATE_2_DESCRIPTOR_BUFFER_BIT_EXT specifies that a
    pipeline will be used with <<descriptorbuffers,descriptor buffers>>,
    rather than <<descriptorsets,descriptor sets>>.
endif::VK_EXT_descriptor_buffer[]
ifdef::VK_EXT_attachment_feedback_loop_layout[]
  * ename:VK_PIPELINE_CREATE_2_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT
    specifies that the pipeline may: be used with an attachment feedback
    loop including color attachments.
  * ename:VK_PIPELINE_CREATE_2_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT
    specifies that the pipeline may: be used with an attachment feedback
    loop including depth-stencil attachments.
endif::VK_EXT_attachment_feedback_loop_layout[]
ifdef::VK_EXT_opacity_micromap[]
  * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT
    specifies that the pipeline can: be used with acceleration structures
    which reference an opacity micromap array.
endif::VK_EXT_opacity_micromap[]
ifdef::VK_NV_displacement_micromap[]
  * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV
    specifies that the pipeline can: be used with aceleration structures
    which reference a displacement micromap array.
endif::VK_NV_displacement_micromap[]
ifdef::VK_EXT_pipeline_protected_access[]
  * ename:VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT_EXT specifies that
    the pipeline must: not be bound to a protected command buffer.
  * ename:VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT specifies that
    the pipeline must: not be bound to an unprotected command buffer.
endif::VK_EXT_pipeline_protected_access[]

It is valid to set both ename:VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT_KHR
and ename:VK_PIPELINE_CREATE_2_DERIVATIVE_BIT_KHR.
This allows a pipeline to be both a parent and possibly a child in a
pipeline hierarchy.
See <<pipelines-pipeline-derivatives,Pipeline Derivatives>> for more
information.

ifdef::VK_EXT_graphics_pipeline_library[]
When an implementation is looking up a pipeline in a
<<pipelines-cache,pipeline cache>>, if that pipeline is being created using
linked libraries, implementations should: always return an equivalent
pipeline created with
ename:VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT if available,
whether or not that bit was specified.

[NOTE]
.Note
====
Using ename:VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT (or not)
when linking pipeline libraries is intended as a performance tradeoff
between host and device.
If the bit is omitted, linking should be faster and produce a pipeline more
rapidly, but performance of the pipeline on the target device may be
reduced.
If the bit is included, linking may be slower but should produce a pipeline
with device performance comparable to a monolithically created pipeline.
Using both options can allow latency-sensitive applications to generate a
suboptimal but usable pipeline quickly, and then perform an optimal link in
the background, substituting the result for the suboptimally linked pipeline
as soon as it is available.
====
endif::VK_EXT_graphics_pipeline_library[]
--

[open,refpage='VkPipelineCreateFlags2KHR',desc='Bitmask of VkPipelineCreateFlagBits2KHR',type='flags']
--
include::{generated}/api/flags/VkPipelineCreateFlags2KHR.adoc[]

tname:VkPipelineCreateFlags2KHR is a bitmask type for setting a mask of zero
or more elink:VkPipelineCreateFlagBits2KHR.
--
endif::VK_KHR_maintenance5[]

[open,refpage='VkPipelineCreateFlagBits',desc='Bitmask controlling how a pipeline is created',type='enums']
--
Bits which can: be set in

  * slink:VkGraphicsPipelineCreateInfo::pname:flags
  * slink:VkComputePipelineCreateInfo::pname:flags
ifdef::VK_KHR_ray_tracing_pipeline[]
  * slink:VkRayTracingPipelineCreateInfoKHR::pname:flags
endif::VK_KHR_ray_tracing_pipeline[]
ifdef::VK_NV_ray_tracing[]
  * slink:VkRayTracingPipelineCreateInfoNV::pname:flags
endif::VK_NV_ray_tracing[]

specify how a pipeline is created, and are:

include::{generated}/api/enums/VkPipelineCreateFlagBits.adoc[]

// Note - when editing this section, make sure that any relevant changes
// are mirrored in VkPipelineCreateFlagBits2KHR/VkPipelineCreateFlagBits

  * ename:VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT specifies that the
    created pipeline will not be optimized.
    Using this flag may: reduce the time taken to create the pipeline.
ifndef::VKSC_VERSION_1_0[]
  * ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT specifies that the
    pipeline to be created is allowed to be the parent of a pipeline that
    will be created in a subsequent pipeline creation call.
  * ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT specifies that the pipeline to
    be created will be a child of a previously created parent pipeline.
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
ifdef::hidden[]
// tag::scremoved[]
  * elink:VkPipelineCreateFlagBits
  ** ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT <<SCID-8>>
  ** ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT <<SCID-8>>
// end::scremoved[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]
ifdef::VK_VERSION_1_1,VK_KHR_device_group[]
ifdef::VK_VERSION_1_1,VK_KHR_multiview[]
  * ename:VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT specifies that
    any shader input variables decorated as code:ViewIndex will be assigned
    values as if they were decorated as code:DeviceIndex.
endif::VK_VERSION_1_1,VK_KHR_multiview[]
  * ename:VK_PIPELINE_CREATE_DISPATCH_BASE specifies that a compute pipeline
    can: be used with flink:vkCmdDispatchBase with a non-zero base
    workgroup.
endif::VK_VERSION_1_1,VK_KHR_device_group[]
ifdef::VK_NV_ray_tracing[]
  * ename:VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV specifies that a pipeline
    is created with all shaders in the deferred state.
    Before using the pipeline the application must: call
    flink:vkCompileDeferredNV exactly once on each shader in the pipeline
    before using the pipeline.
endif::VK_NV_ray_tracing[]
ifdef::VK_KHR_pipeline_executable_properties[]
  * ename:VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR specifies that the
    shader compiler should capture statistics for the pipeline executables
    produced by the compile process which can: later be retrieved by calling
    flink:vkGetPipelineExecutableStatisticsKHR.
    Enabling this flag must: not affect the final compiled pipeline but may:
    disable pipeline caching or otherwise affect pipeline creation time.
  * ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR
    specifies that the shader compiler should capture the internal
    representations of pipeline executables produced by the compile process
    which can: later be retrieved by calling
    flink:vkGetPipelineExecutableInternalRepresentationsKHR.
    Enabling this flag must: not affect the final compiled pipeline but may:
    disable pipeline caching or otherwise affect pipeline creation time.
ifdef::VK_KHR_pipeline_library[]
    When capturing IR from pipelines created with pipeline libraries, there
    is no guarantee that IR from libraries can: be retrieved from the linked
    pipeline.
    Applications should: retrieve IR from each library, and any linked
    pipelines, separately.
endif::VK_KHR_pipeline_library[]
endif::VK_KHR_pipeline_executable_properties[]
ifdef::VK_KHR_pipeline_library[]
  * ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR specifies that the pipeline
    cannot: be used directly, and instead defines a _pipeline library_ that
    can: be combined with other pipelines using the
    slink:VkPipelineLibraryCreateInfoKHR structure.
ifdef::VK_KHR_ray_tracing_pipeline,VK_EXT_graphics_pipeline_library[]
    This is available in
ifdef::VK_KHR_ray_tracing_pipeline[ray tracing]
ifdef::VK_KHR_ray_tracing_pipeline+VK_EXT_graphics_pipeline_library[and]
ifdef::VK_EXT_graphics_pipeline_library[graphics]
    pipelines.
endif::VK_KHR_ray_tracing_pipeline,VK_EXT_graphics_pipeline_library[]
endif::VK_KHR_pipeline_library[]
ifdef::VK_KHR_ray_tracing_pipeline[]
  * ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR
    specifies that an any-hit shader will always be present when an any-hit
    shader would be executed.
    A NULL any-hit shader is an any-hit shader which is effectively
    ename:VK_SHADER_UNUSED_KHR, such as from a shader group consisting
    entirely of zeros.
  * ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR
    specifies that a closest hit shader will always be present when a
    closest hit shader would be executed.
    A NULL closest hit shader is a closest hit shader which is effectively
    ename:VK_SHADER_UNUSED_KHR, such as from a shader group consisting
    entirely of zeros.
  * ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR
    specifies that a miss shader will always be present when a miss shader
    would be executed.
    A NULL miss shader is a miss shader which is effectively
    ename:VK_SHADER_UNUSED_KHR, such as from a shader group consisting
    entirely of zeros.
  * ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR
    specifies that an intersection shader will always be present when an
    intersection shader would be executed.
    A NULL intersection shader is an intersection shader which is
    effectively ename:VK_SHADER_UNUSED_KHR, such as from a shader group
    consisting entirely of zeros.
  * ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR specifies
    that triangle primitives will be skipped during traversal using
    code:OpTraceRayKHR.
  * ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR specifies that
    AABB primitives will be skipped during traversal using
    code:OpTraceRayKHR.
  * ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
    specifies that the shader group handles can: be saved and reused on a
    subsequent run (e.g. for trace capture and replay).
endif::VK_KHR_ray_tracing_pipeline[]
ifdef::VK_NV_device_generated_commands[]
  * ename:VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV specifies that the
    pipeline can be used in combination with <<device-generated-commands>>.
endif::VK_NV_device_generated_commands[]
ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
  * ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT specifies
    that pipeline creation will fail if a compile is required for creation
    of a valid slink:VkPipeline object; ename:VK_PIPELINE_COMPILE_REQUIRED
    will be returned by pipeline creation, and the slink:VkPipeline will be
    set to dlink:VK_NULL_HANDLE.
  * When creating multiple pipelines,
    ename:VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT specifies that
    control will be returned to the application if any individual pipeline
    returns a result which is not ename:VK_SUCCESS rather than continuing to
    create additional pipelines.
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
ifdef::VK_NV_ray_tracing_motion_blur[]
  * ename:VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV specifies that
    the pipeline is allowed to use code:OpTraceRayMotionNV.
endif::VK_NV_ray_tracing_motion_blur[]
ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
ifdef::VK_KHR_fragment_shading_rate[]
  * ename:VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
    specifies that the pipeline will be used with a fragment shading rate
    attachment and dynamic rendering.
endif::VK_KHR_fragment_shading_rate[]
ifdef::VK_EXT_fragment_density_map[]
  * ename:VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT
    specifies that the pipeline will be used with a fragment density map
    attachment and dynamic rendering.
endif::VK_EXT_fragment_density_map[]
endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[]
ifdef::VK_EXT_graphics_pipeline_library[]
  * ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT specifies that
    pipeline libraries being linked into this library should: have link time
    optimizations applied.
    If this bit is omitted, implementations should: instead perform linking
    as rapidly as possible.
  * ename:VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT
    specifies that pipeline libraries should retain any information
    necessary to later perform an optimal link with
    ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT.
endif::VK_EXT_graphics_pipeline_library[]
ifdef::VK_EXT_descriptor_buffer[]
  * ename:VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT specifies that a
    pipeline will be used with <<descriptorbuffers,descriptor buffers>>,
    rather than <<descriptorsets,descriptor sets>>.
endif::VK_EXT_descriptor_buffer[]
ifdef::VK_EXT_attachment_feedback_loop_layout[]
  * ename:VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT
    specifies that the pipeline may: be used with an attachment feedback
    loop including color attachments.
ifdef::VK_EXT_attachment_feedback_loop_dynamic_state[]
    It is ignored if
    ename:VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT is set in
    pname:pDynamicStates.
endif::VK_EXT_attachment_feedback_loop_dynamic_state[]
  * ename:VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT
    specifies that the pipeline may: be used with an attachment feedback
    loop including depth-stencil attachments.
ifdef::VK_EXT_attachment_feedback_loop_dynamic_state[]
    It is ignored if
    ename:VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT is set in
    pname:pDynamicStates.
endif::VK_EXT_attachment_feedback_loop_dynamic_state[]
endif::VK_EXT_attachment_feedback_loop_layout[]
ifdef::VK_EXT_opacity_micromap[]
  * ename:VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT specifies
    that the pipeline can: be used with acceleration structures which
    reference an opacity micromap array.
endif::VK_EXT_opacity_micromap[]
ifdef::VK_NV_displacement_micromap[]
  * ename:VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV
    specifies that the pipeline can: be used with aceleration structures
    which reference a displacement micromap array.
endif::VK_NV_displacement_micromap[]
ifdef::VK_EXT_pipeline_protected_access[]
  * ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT specifies that the
    pipeline must: not be bound to a protected command buffer.
  * ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT specifies that
    the pipeline must: not be bound to an unprotected command buffer.
endif::VK_EXT_pipeline_protected_access[]

ifndef::VKSC_VERSION_1_0[]
It is valid to set both ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT and
ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT.
This allows a pipeline to be both a parent and possibly a child in a
pipeline hierarchy.
See <<pipelines-pipeline-derivatives,Pipeline Derivatives>> for more
information.
endif::VKSC_VERSION_1_0[]

ifdef::VK_EXT_graphics_pipeline_library[]
When an implementation is looking up a pipeline in a
<<pipelines-cache,pipeline cache>>, if that pipeline is being created using
linked libraries, implementations should: always return an equivalent
pipeline created with
ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT if available,
whether or not that bit was specified.

[NOTE]
.Note
====
Using ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT (or not) when
linking pipeline libraries is intended as a performance tradeoff between
host and device.
If the bit is omitted, linking should be faster and produce a pipeline more
rapidly, but performance of the pipeline on the target device may be
reduced.
If the bit is included, linking may be slower but should produce a pipeline
with device performance comparable to a monolithically created pipeline.
Using both options can allow latency-sensitive applications to generate a
suboptimal but usable pipeline quickly, and then perform an optimal link in
the background, substituting the result for the suboptimally linked pipeline
as soon as it is available.
====
endif::VK_EXT_graphics_pipeline_library[]
--

[open,refpage='VkPipelineCreateFlags',desc='Bitmask of VkPipelineCreateFlagBits',type='flags']
--
include::{generated}/api/flags/VkPipelineCreateFlags.adoc[]

tname:VkPipelineCreateFlags is a bitmask type for setting a mask of zero or
more elink:VkPipelineCreateFlagBits.
--

ifdef::VK_EXT_graphics_pipeline_library[]
[open,refpage='VkGraphicsPipelineLibraryCreateInfoEXT',desc='Structure specifying the subsets of the graphics pipeline being compiled',type='structs']
--
The sname:VkGraphicsPipelineLibraryCreateInfoEXT structure is defined as:

include::{generated}/api/structs/VkGraphicsPipelineLibraryCreateInfoEXT.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:flags is a bitmask of elink:VkGraphicsPipelineLibraryFlagBitsEXT
    specifying the subsets of the graphics pipeline that are being compiled.

If a sname:VkGraphicsPipelineLibraryCreateInfoEXT structure is included in
the pname:pNext chain of slink:VkGraphicsPipelineCreateInfo, it specifies
the <<pipelines-graphics-subsets,subsets of the graphics pipeline>> being
created, excluding any subsets from linked pipeline libraries.
If the pipeline is created with pipeline libraries, state from those
libraries is aggregated with said subset.

If this structure is omitted, and either
slink:VkGraphicsPipelineCreateInfo::pname:flags includes
ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR or the
slink:VkGraphicsPipelineCreateInfo::pname:pNext chain includes a
slink:VkPipelineLibraryCreateInfoKHR structure with a pname:libraryCount
greater than `0`, it is as if pname:flags is `0`.
Otherwise if this structure is omitted, it is as if pname:flags includes all
possible subsets of the graphics pipeline (i.e. a
<<pipelines-graphics-subsets-complete,complete graphics pipeline>>).

include::{generated}/validity/structs/VkGraphicsPipelineLibraryCreateInfoEXT.adoc[]
--

[open,refpage='VkGraphicsPipelineLibraryFlagsEXT', desc='Bitmask of VkGraphicsPipelineLibraryFlagBitsEXT', type='flags']
--
include::{generated}/api/flags/VkGraphicsPipelineLibraryFlagsEXT.adoc[]

tname:VkGraphicsPipelineLibraryFlagsEXT is a bitmask type for setting a mask
of zero or more elink:VkGraphicsPipelineLibraryFlagBitsEXT.
--

[open,refpage='VkGraphicsPipelineLibraryFlagBitsEXT',desc='Bitmask specifying the subset of a graphics pipeline to compile',type='enums']
--
Possible values of the pname:flags member of
slink:VkGraphicsPipelineLibraryCreateInfoEXT, specifying the subsets of a
graphics pipeline to compile are:

include::{generated}/api/enums/VkGraphicsPipelineLibraryFlagBitsEXT.adoc[]

  * ename:VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT
    specifies that a pipeline will include
    <<pipelines-graphics-subsets-vertex-input,vertex input interface
    state>>.
  * ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT
    specifies that a pipeline will include
    <<pipelines-graphics-subsets-pre-rasterization,pre-rasterization shader
    state>>.
  * ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT specifies
    that a pipeline will include
    <<pipelines-graphics-subsets-fragment-shader,fragment shader state>>.
  * ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT
    specifies that a pipeline will include
    <<pipelines-graphics-subsets-fragment-output,fragment output interface
    state>>.
--
endif::VK_EXT_graphics_pipeline_library[]

[open,refpage='VkPipelineDynamicStateCreateInfo',desc='Structure specifying parameters of a newly created pipeline dynamic state',type='structs']
--
The sname:VkPipelineDynamicStateCreateInfo structure is defined as:

include::{generated}/api/structs/VkPipelineDynamicStateCreateInfo.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:flags is reserved for future use.
  * pname:dynamicStateCount is the number of elements in the
    pname:pDynamicStates array.
  * pname:pDynamicStates is a pointer to an array of elink:VkDynamicState
    values specifying which pieces of pipeline state will use the values
    from dynamic state commands rather than from pipeline state creation
    information.

.Valid Usage
****
  * [[VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-01442]]
    Each element of pname:pDynamicStates must: be unique
****

include::{generated}/validity/structs/VkPipelineDynamicStateCreateInfo.adoc[]
--

[open,refpage='VkPipelineDynamicStateCreateFlags',desc='Reserved for future use',type='flags']
--
include::{generated}/api/flags/VkPipelineDynamicStateCreateFlags.adoc[]

tname:VkPipelineDynamicStateCreateFlags is a bitmask type for setting a
mask, but is currently reserved for future use.
--

[open,refpage='VkDynamicState',desc='Indicate which dynamic state is taken from dynamic state commands',type='enums']
--
The source of different pieces of dynamic state is specified by the
slink:VkPipelineDynamicStateCreateInfo::pname:pDynamicStates property of the
currently active pipeline, each of whose elements must: be one of the
values:

include::{generated}/api/enums/VkDynamicState.adoc[]

  * ename:VK_DYNAMIC_STATE_VIEWPORT specifies that the pname:pViewports
    state in slink:VkPipelineViewportStateCreateInfo will be ignored and
    must: be set dynamically with flink:vkCmdSetViewport before any drawing
    commands.
    The number of viewports used by a pipeline is still specified by the
    pname:viewportCount member of slink:VkPipelineViewportStateCreateInfo.
  * ename:VK_DYNAMIC_STATE_SCISSOR specifies that the pname:pScissors state
    in slink:VkPipelineViewportStateCreateInfo will be ignored and must: be
    set dynamically with flink:vkCmdSetScissor before any drawing commands.
    The number of scissor rectangles used by a pipeline is still specified
    by the pname:scissorCount member of
    slink:VkPipelineViewportStateCreateInfo.
  * ename:VK_DYNAMIC_STATE_LINE_WIDTH specifies that the pname:lineWidth
    state in slink:VkPipelineRasterizationStateCreateInfo will be ignored
    and must: be set dynamically with flink:vkCmdSetLineWidth before any
    drawing commands that generate line primitives for the rasterizer.
  * ename:VK_DYNAMIC_STATE_DEPTH_BIAS specifies that
ifdef::VK_EXT_depth_bias_control[]
    any instance of slink:VkDepthBiasRepresentationInfoEXT included in the
    pname:pNext chain of slink:VkPipelineRasterizationStateCreateInfo as
    well as
endif::VK_EXT_depth_bias_control[]
    the pname:depthBiasConstantFactor, pname:depthBiasClamp and
    pname:depthBiasSlopeFactor states in
    slink:VkPipelineRasterizationStateCreateInfo will be ignored and must:
    be set dynamically with either flink:vkCmdSetDepthBias
ifdef::VK_EXT_depth_bias_control[or flink:vkCmdSetDepthBias2EXT]
    before any draws are performed with <<primsrast-depthbias-enable, depth
    bias enabled>>.
  * ename:VK_DYNAMIC_STATE_BLEND_CONSTANTS specifies that the
    pname:blendConstants state in slink:VkPipelineColorBlendStateCreateInfo
    will be ignored and must: be set dynamically with
    flink:vkCmdSetBlendConstants before any draws are performed with a
    pipeline state with sname:VkPipelineColorBlendAttachmentState member
    pname:blendEnable set to ename:VK_TRUE and any of the blend functions
    using a constant blend color.
  * ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS specifies that the
    pname:minDepthBounds and pname:maxDepthBounds states of
    slink:VkPipelineDepthStencilStateCreateInfo will be ignored and must: be
    set dynamically with flink:vkCmdSetDepthBounds before any draws are
    performed with a pipeline state with
    slink:VkPipelineDepthStencilStateCreateInfo member
    pname:depthBoundsTestEnable set to ename:VK_TRUE.
  * ename:VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK specifies that the
    pname:compareMask state in slink:VkPipelineDepthStencilStateCreateInfo
    for both pname:front and pname:back will be ignored and must: be set
    dynamically with flink:vkCmdSetStencilCompareMask before any draws are
    performed with a pipeline state with
    slink:VkPipelineDepthStencilStateCreateInfo member
    pname:stencilTestEnable set to ename:VK_TRUE
  * ename:VK_DYNAMIC_STATE_STENCIL_WRITE_MASK specifies that the
    pname:writeMask state in slink:VkPipelineDepthStencilStateCreateInfo for
    both pname:front and pname:back will be ignored and must: be set
    dynamically with flink:vkCmdSetStencilWriteMask before any draws are
    performed with a pipeline state with
    slink:VkPipelineDepthStencilStateCreateInfo member
    pname:stencilTestEnable set to ename:VK_TRUE
  * ename:VK_DYNAMIC_STATE_STENCIL_REFERENCE specifies that the
    pname:reference state in slink:VkPipelineDepthStencilStateCreateInfo for
    both pname:front and pname:back will be ignored and must: be set
    dynamically with flink:vkCmdSetStencilReference before any draws are
    performed with a pipeline state with
    slink:VkPipelineDepthStencilStateCreateInfo member
    pname:stencilTestEnable set to ename:VK_TRUE
ifdef::VK_NV_clip_space_w_scaling[]
  * ename:VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV specifies that the
    pname:pViewportWScalings state in
    slink:VkPipelineViewportWScalingStateCreateInfoNV will be ignored and
    must: be set dynamically with flink:vkCmdSetViewportWScalingNV before
    any draws are performed with a pipeline state with
    slink:VkPipelineViewportWScalingStateCreateInfoNV member
    pname:viewportScalingEnable set to ename:VK_TRUE
endif::VK_NV_clip_space_w_scaling[]
ifdef::VK_EXT_discard_rectangles[]
  * ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT specifies that the
    pname:pDiscardRectangles state in
    slink:VkPipelineDiscardRectangleStateCreateInfoEXT will be ignored and
    must: be set dynamically with flink:vkCmdSetDiscardRectangleEXT before
    any draw or clear commands.
  * ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT specifies that the
    presence of the slink:VkPipelineDiscardRectangleStateCreateInfoEXT
    structure in the slink:VkGraphicsPipelineCreateInfo chain with a
    pname:discardRectangleCount greater than zero does not implicitly enable
    discard rectangles and they must: be enabled dynamically with
    flink:vkCmdSetDiscardRectangleEnableEXT before any draw commands.
    This is available on implementations that support at least
    pname:specVersion `2` of the `apiext:VK_EXT_discard_rectangles`
    extension.
  * ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT specifies that the
    pname:discardRectangleMode state in
    slink:VkPipelineDiscardRectangleStateCreateInfoEXT will be ignored and
    must: be set dynamically with flink:vkCmdSetDiscardRectangleModeEXT
    before any draw commands.
    This is available on implementations that support at least
    pname:specVersion `2` of the `apiext:VK_EXT_discard_rectangles`
    extension.
endif::VK_EXT_discard_rectangles[]
ifdef::VK_EXT_sample_locations[]
  * ename:VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT specifies that the
    pname:sampleLocationsInfo state in
    slink:VkPipelineSampleLocationsStateCreateInfoEXT will be ignored and
    must: be set dynamically with flink:vkCmdSetSampleLocationsEXT before
    any draw or clear commands.
    Enabling custom sample locations is still indicated by the
    pname:sampleLocationsEnable member of
    slink:VkPipelineSampleLocationsStateCreateInfoEXT.
endif::VK_EXT_sample_locations[]
ifdef::VK_NV_scissor_exclusive[]
  * ename:VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV specifies that the
    pname:pExclusiveScissors state in
    slink:VkPipelineViewportExclusiveScissorStateCreateInfoNV will be
    ignored and must: be set dynamically with
    flink:vkCmdSetExclusiveScissorNV before any drawing commands.
  * ename:VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV specifies that the
    the exclusive scissors must: be explicitly enabled with
    flink:vkCmdSetExclusiveScissorEnableNV and the
    pname:exclusiveScissorCount value in
    slink:VkPipelineViewportExclusiveScissorStateCreateInfoNV will not
    implicitly enable them.
    This is available on implementations that support at least
    pname:specVersion `2` of the `apiext:VK_NV_scissor_exclusive` extension.
endif::VK_NV_scissor_exclusive[]
ifdef::VK_NV_shading_rate_image[]
  * ename:VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV specifies that
    the pname:pShadingRatePalettes state in
    slink:VkPipelineViewportShadingRateImageStateCreateInfoNV will be
    ignored and must: be set dynamically with
    flink:vkCmdSetViewportShadingRatePaletteNV before any drawing commands.
  * ename:VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV specifies that
    the coarse sample order state in
    slink:VkPipelineViewportCoarseSampleOrderStateCreateInfoNV will be
    ignored and must: be set dynamically with
    flink:vkCmdSetCoarseSampleOrderNV before any drawing commands.
endif::VK_NV_shading_rate_image[]
ifdef::VK_EXT_line_rasterization[]
  * ename:VK_DYNAMIC_STATE_LINE_STIPPLE_EXT specifies that the
    pname:lineStippleFactor and pname:lineStipplePattern state in
    slink:VkPipelineRasterizationLineStateCreateInfoEXT will be ignored and
    must: be set dynamically with flink:vkCmdSetLineStippleEXT before any
    draws are performed with a pipeline state with
    slink:VkPipelineRasterizationLineStateCreateInfoEXT member
    pname:stippledLineEnable set to ename:VK_TRUE.
endif::VK_EXT_line_rasterization[]
ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[]
  * ename:VK_DYNAMIC_STATE_CULL_MODE specifies that the pname:cullMode state
    in slink:VkPipelineRasterizationStateCreateInfo will be ignored and
    must: be set dynamically with flink:vkCmdSetCullMode before any drawing
    commands.
  * ename:VK_DYNAMIC_STATE_FRONT_FACE specifies that the pname:frontFace
    state in slink:VkPipelineRasterizationStateCreateInfo will be ignored
    and must: be set dynamically with flink:vkCmdSetFrontFace before any
    drawing commands.
  * ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY specifies that the
    pname:topology state in slink:VkPipelineInputAssemblyStateCreateInfo
    only specifies the <<drawing-primitive-topology-class, topology class>>,
    and the specific topology order and adjacency must: be set dynamically
    with flink:vkCmdSetPrimitiveTopology before any drawing commands.
  * ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT specifies that the
    pname:viewportCount and pname:pViewports state in
    slink:VkPipelineViewportStateCreateInfo will be ignored and must: be set
    dynamically with flink:vkCmdSetViewportWithCount before any draw call.
  * ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT specifies that the
    pname:scissorCount and pname:pScissors state in
    slink:VkPipelineViewportStateCreateInfo will be ignored and must: be set
    dynamically with flink:vkCmdSetScissorWithCount before any draw call.
  * ename:VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE specifies that the
    pname:stride state in slink:VkVertexInputBindingDescription will be
    ignored and must: be set dynamically with flink:vkCmdBindVertexBuffers2
    before any draw call.
  * ename:VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE specifies that the
    pname:depthTestEnable state in
    slink:VkPipelineDepthStencilStateCreateInfo will be ignored and must: be
    set dynamically with flink:vkCmdSetDepthTestEnable before any draw call.
  * ename:VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE specifies that the
    pname:depthWriteEnable state in
    slink:VkPipelineDepthStencilStateCreateInfo will be ignored and must: be
    set dynamically with flink:vkCmdSetDepthWriteEnable before any draw
    call.
  * ename:VK_DYNAMIC_STATE_DEPTH_COMPARE_OP specifies that the
    pname:depthCompareOp state in
    slink:VkPipelineDepthStencilStateCreateInfo will be ignored and must: be
    set dynamically with flink:vkCmdSetDepthCompareOp before any draw call.
  * ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE specifies that the
    pname:depthBoundsTestEnable state in
    slink:VkPipelineDepthStencilStateCreateInfo will be ignored and must: be
    set dynamically with flink:vkCmdSetDepthBoundsTestEnable before any draw
    call.
  * ename:VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE specifies that the
    pname:stencilTestEnable state in
    slink:VkPipelineDepthStencilStateCreateInfo will be ignored and must: be
    set dynamically with flink:vkCmdSetStencilTestEnable before any draw
    call.
  * ename:VK_DYNAMIC_STATE_STENCIL_OP specifies that the pname:failOp,
    pname:passOp, pname:depthFailOp, and pname:compareOp states in
    sname:VkPipelineDepthStencilStateCreateInfo for both pname:front and
    pname:back will be ignored and must: be set dynamically with
    flink:vkCmdSetStencilOp before any draws are performed with a pipeline
    state with sname:VkPipelineDepthStencilStateCreateInfo member
    pname:stencilTestEnable set to ename:VK_TRUE
endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[]
ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[]
ifdef::VK_EXT_extended_dynamic_state2[]
  * ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT specifies that the
    pname:patchControlPoints state in
    slink:VkPipelineTessellationStateCreateInfo will be ignored and must: be
    set dynamically with flink:vkCmdSetPatchControlPointsEXT before any
    drawing commands.
endif::VK_EXT_extended_dynamic_state2[]
  * ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE specifies that the
    pname:rasterizerDiscardEnable state in
    slink:VkPipelineRasterizationStateCreateInfo will be ignored and must:
    be set dynamically with flink:vkCmdSetRasterizerDiscardEnable before any
    drawing commands.
  * ename:VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE specifies that the
    pname:depthBiasEnable state in
    slink:VkPipelineRasterizationStateCreateInfo will be ignored and must:
    be set dynamically with flink:vkCmdSetDepthBiasEnable before any drawing
    commands.
ifdef::VK_EXT_extended_dynamic_state2[]
  * ename:VK_DYNAMIC_STATE_LOGIC_OP_EXT specifies that the pname:logicOp
    state in slink:VkPipelineColorBlendStateCreateInfo will be ignored and
    must: be set dynamically with flink:vkCmdSetLogicOpEXT before any
    drawing commands.
endif::VK_EXT_extended_dynamic_state2[]
  * ename:VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE specifies that the
    pname:primitiveRestartEnable state in
    slink:VkPipelineInputAssemblyStateCreateInfo will be ignored and must:
    be set dynamically with flink:vkCmdSetPrimitiveRestartEnable before any
    drawing commands.
endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[]
ifdef::VK_KHR_fragment_shading_rate[]
  * ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR specifies that state in
    slink:VkPipelineFragmentShadingRateStateCreateInfoKHR
ifdef::VK_NV_fragment_shading_rate_enums[]
    and slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV
endif::VK_NV_fragment_shading_rate_enums[]
    will be ignored and must: be set dynamically with
    flink:vkCmdSetFragmentShadingRateKHR
ifdef::VK_NV_fragment_shading_rate_enums[]
    or flink:vkCmdSetFragmentShadingRateEnumNV
endif::VK_NV_fragment_shading_rate_enums[]
    before any drawing commands.
endif::VK_KHR_fragment_shading_rate[]
ifdef::VK_KHR_ray_tracing_pipeline[]
  * ename:VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR specifies
    that the default stack size computation for the pipeline will be ignored
    and must: be set dynamically with
    flink:vkCmdSetRayTracingPipelineStackSizeKHR before any ray tracing
    calls are performed.
endif::VK_KHR_ray_tracing_pipeline[]
ifdef::VK_EXT_vertex_input_dynamic_state[]
  * ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT specifies that the
    pname:pVertexInputState state will be ignored and must: be set
    dynamically with flink:vkCmdSetVertexInputEXT before any drawing
    commands
endif::VK_EXT_vertex_input_dynamic_state[]
ifdef::VK_EXT_color_write_enable[]
  * ename:VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT specifies that the
    pname:pColorWriteEnables state in
    slink:VkPipelineColorWriteCreateInfoEXT will be ignored and must: be set
    dynamically with flink:vkCmdSetColorWriteEnableEXT before any draw call.
endif::VK_EXT_color_write_enable[]
ifdef::VK_EXT_extended_dynamic_state3[]
  * ename:VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT specifies that the
    pname:domainOrigin state in
    slink:VkPipelineTessellationDomainOriginStateCreateInfo will be ignored
    and must: be set dynamically with
    flink:vkCmdSetTessellationDomainOriginEXT before any draw call.
  * ename:VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT specifies that the
    pname:depthClampEnable state in
    slink:VkPipelineRasterizationStateCreateInfo will be ignored and must:
    be set dynamically with flink:vkCmdSetDepthClampEnableEXT before any
    draw call.
  * ename:VK_DYNAMIC_STATE_POLYGON_MODE_EXT specifies that the
    pname:polygonMode state in slink:VkPipelineRasterizationStateCreateInfo
    will be ignored and must: be set dynamically with
    flink:vkCmdSetPolygonModeEXT before any draw call.
  * ename:VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT specifies that the
    pname:rasterizationSamples state in
    slink:VkPipelineMultisampleStateCreateInfo will be ignored and must: be
    set dynamically with flink:vkCmdSetRasterizationSamplesEXT before any
    draw call.
  * ename:VK_DYNAMIC_STATE_SAMPLE_MASK_EXT specifies that the
    pname:pSampleMask state in slink:VkPipelineMultisampleStateCreateInfo
    will be ignored and must: be set dynamically with
    flink:vkCmdSetSampleMaskEXT before any draw call.
  * ename:VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT specifies that the
    pname:alphaToCoverageEnable state in
    slink:VkPipelineMultisampleStateCreateInfo will be ignored and must: be
    set dynamically with flink:vkCmdSetAlphaToCoverageEnableEXT before any
    draw call.
  * ename:VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT specifies that the
    pname:alphaToOneEnable state in
    slink:VkPipelineMultisampleStateCreateInfo will be ignored and must: be
    set dynamically with flink:vkCmdSetAlphaToOneEnableEXT before any draw
    call.
  * ename:VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT specifies that the
    pname:logicOpEnable state in slink:VkPipelineColorBlendStateCreateInfo
    will be ignored and must: be set dynamically with
    flink:vkCmdSetLogicOpEnableEXT before any draw call.
  * ename:VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT specifies that the
    pname:blendEnable state in slink:VkPipelineColorBlendAttachmentState
    will be ignored and must: be set dynamically with
    flink:vkCmdSetColorBlendEnableEXT before any draw call.
  * ename:VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT specifies that the
    pname:srcColorBlendFactor, pname:dstColorBlendFactor,
    pname:colorBlendOp, pname:srcAlphaBlendFactor,
    pname:dstAlphaBlendFactor, and pname:alphaBlendOp states in
    slink:VkPipelineColorBlendAttachmentState will be ignored and must: be
    set dynamically with flink:vkCmdSetColorBlendEquationEXT before any draw
    call.
  * ename:VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT specifies that the
    pname:colorWriteMask state in slink:VkPipelineColorBlendAttachmentState
    will be ignored and must: be set dynamically with
    flink:vkCmdSetColorWriteMaskEXT before any draw call.
ifdef::VK_EXT_transform_feedback[]
  * ename:VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT specifies that the
    pname:rasterizationStream state in
    slink:VkPipelineRasterizationStateStreamCreateInfoEXT will be ignored
    and must: be set dynamically with flink:vkCmdSetRasterizationStreamEXT
    before any draw call.
endif::VK_EXT_transform_feedback[]
ifdef::VK_EXT_conservative_rasterization[]
  * ename:VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT specifies
    that the pname:conservativeRasterizationMode state in
    slink:VkPipelineRasterizationConservativeStateCreateInfoEXT will be
    ignored and must: be set dynamically with
    flink:vkCmdSetConservativeRasterizationModeEXT before any draw call.
  * ename:VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT specifies
    that the pname:extraPrimitiveOverestimationSize state in
    slink:VkPipelineRasterizationConservativeStateCreateInfoEXT will be
    ignored and must: be set dynamically with
    flink:vkCmdSetExtraPrimitiveOverestimationSizeEXT before any draw call.
endif::VK_EXT_conservative_rasterization[]
ifdef::VK_EXT_depth_clip_enable[]
  * ename:VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT specifies that the
    pname:depthClipEnable state in
    slink:VkPipelineRasterizationDepthClipStateCreateInfoEXT will be ignored
    and must: be set dynamically with flink:vkCmdSetDepthClipEnableEXT
    before any draw call.
endif::VK_EXT_depth_clip_enable[]
ifdef::VK_EXT_sample_locations[]
  * ename:VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT specifies that the
    pname:sampleLocationsEnable state in
    slink:VkPipelineSampleLocationsStateCreateInfoEXT will be ignored and
    must: be set dynamically with flink:vkCmdSetSampleLocationsEnableEXT
    before any draw call.
endif::VK_EXT_sample_locations[]
ifdef::VK_EXT_blend_operation_advanced[]
  * ename:VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT specifies that the
    pname:colorBlendOp state in slink:VkPipelineColorBlendAttachmentState,
    and pname:srcPremultiplied, pname:dstPremultiplied, and
    pname:blendOverlap states in
    slink:VkPipelineColorBlendAdvancedStateCreateInfoEXT will be ignored and
    must: be set dynamically with flink:vkCmdSetColorBlendAdvancedEXT before
    any draw call.
endif::VK_EXT_blend_operation_advanced[]
ifdef::VK_EXT_provoking_vertex[]
  * ename:VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT specifies that the
    pname:provokingVertexMode state in
    slink:VkPipelineRasterizationProvokingVertexStateCreateInfoEXT will be
    ignored and must: be set dynamically with
    flink:vkCmdSetProvokingVertexModeEXT before any draw call.
endif::VK_EXT_provoking_vertex[]
ifdef::VK_EXT_line_rasterization[]
  * ename:VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT specifies that the
    pname:lineRasterizationMode state in
    slink:VkPipelineRasterizationLineStateCreateInfoEXT will be ignored and
    must: be set dynamically with flink:vkCmdSetLineRasterizationModeEXT
    before any draw call.
  * ename:VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT specifies that the
    pname:stippledLineEnable state in
    slink:VkPipelineRasterizationLineStateCreateInfoEXT will be ignored and
    must: be set dynamically with flink:vkCmdSetLineStippleEnableEXT before
    any draw call.
endif::VK_EXT_line_rasterization[]
ifdef::VK_EXT_depth_clip_control[]
  * ename:VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT specifies that
    the pname:negativeOneToOne state in
    slink:VkPipelineViewportDepthClipControlCreateInfoEXT will be ignored
    and must: be set dynamically with
    flink:vkCmdSetDepthClipNegativeOneToOneEXT before any draw call.
endif::VK_EXT_depth_clip_control[]
ifdef::VK_NV_clip_space_w_scaling[]
  * ename:VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV specifies that the
    pname:viewportWScalingEnable state in
    slink:VkPipelineViewportWScalingStateCreateInfoNV will be ignored and
    must: be set dynamically with flink:vkCmdSetViewportWScalingEnableNV
    before any draw call.
endif::VK_NV_clip_space_w_scaling[]
ifdef::VK_NV_viewport_swizzle[]
  * ename:VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV specifies that the
    pname:viewportCount, and pname:pViewportSwizzles states in
    slink:VkPipelineViewportSwizzleStateCreateInfoNV will be ignored and
    must: be set dynamically with flink:vkCmdSetViewportSwizzleNV before any
    draw call.
endif::VK_NV_viewport_swizzle[]
ifdef::VK_NV_fragment_coverage_to_color[]
  * ename:VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV specifies that the
    pname:coverageToColorEnable state in
    slink:VkPipelineCoverageToColorStateCreateInfoNV will be ignored and
    must: be set dynamically with flink:vkCmdSetCoverageToColorEnableNV
    before any draw call.
  * ename:VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV specifies that the
    pname:coverageToColorLocation state in
    slink:VkPipelineCoverageToColorStateCreateInfoNV will be ignored and
    must: be set dynamically with flink:vkCmdSetCoverageToColorLocationNV
    before any draw call.
endif::VK_NV_fragment_coverage_to_color[]
ifdef::VK_NV_framebuffer_mixed_samples[]
  * ename:VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV specifies that the
    pname:coverageModulationMode state in
    slink:VkPipelineCoverageModulationStateCreateInfoNV will be ignored and
    must: be set dynamically with flink:vkCmdSetCoverageModulationModeNV
    before any draw call.
  * ename:VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV specifies
    that the pname:coverageModulationTableEnable state in
    slink:VkPipelineCoverageModulationStateCreateInfoNV will be ignored and
    must: be set dynamically with
    flink:vkCmdSetCoverageModulationTableEnableNV before any draw call.
  * ename:VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV specifies that the
    pname:coverageModulationTableCount, and pname:pCoverageModulationTable
    states in slink:VkPipelineCoverageModulationStateCreateInfoNV will be
    ignored and must: be set dynamically with
    flink:vkCmdSetCoverageModulationTableNV before any draw call.
endif::VK_NV_framebuffer_mixed_samples[]
ifdef::VK_NV_shading_rate_image[]
  * ename:VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV specifies that the
    pname:shadingRateImageEnable state in
    slink:VkPipelineViewportShadingRateImageStateCreateInfoNV will be
    ignored and must: be set dynamically with
    flink:vkCmdSetShadingRateImageEnableNV before any draw call.
endif::VK_NV_shading_rate_image[]
ifdef::VK_NV_representative_fragment_test[]
  * ename:VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV specifies
    that the pname:representativeFragmentTestEnable state in
    slink:VkPipelineRepresentativeFragmentTestStateCreateInfoNV will be
    ignored and must: be set dynamically with
    flink:vkCmdSetRepresentativeFragmentTestEnableNV before any draw call.
endif::VK_NV_representative_fragment_test[]
ifdef::VK_NV_coverage_reduction_mode[]
  * ename:VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV specifies that the
    pname:coverageReductionMode state in
    slink:VkPipelineCoverageReductionStateCreateInfoNV will be ignored and
    must: be set dynamically with flink:vkCmdSetCoverageReductionModeNV
    before any draw call.
endif::VK_NV_coverage_reduction_mode[]
ifdef::VK_EXT_attachment_feedback_loop_dynamic_state[]
  * ename:VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT specifies
    that the ename:VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT
    and
    ename:VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT
    flags will be ignored and must: be set dynamically with
    flink:vkCmdSetAttachmentFeedbackLoopEnableEXT before any draw call.
endif::VK_EXT_attachment_feedback_loop_dynamic_state[]
endif::VK_EXT_extended_dynamic_state3[]
--


=== Valid Combinations of Stages for Graphics Pipelines

ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
Primitive processing can be handled either on a per primitive basis by the
vertex, tessellation, and geometry shader stages, or on a per mesh basis
using task and mesh shader stages.
If the pipeline includes a mesh shader stage, it uses the mesh pipeline,
otherwise it uses the primitive pipeline.

If a task shader is omitted, the task shading stage is skipped.
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]

If tessellation shader stages are omitted, the tessellation shading and
fixed-function stages of the pipeline are skipped.

If a geometry shader is omitted, the geometry shading stage is skipped.

If a fragment shader is omitted, fragment color outputs have undefined:
values, and the fragment depth value is determined by <<fragops, Fragment
Operations>> state.
This can: be useful for depth-only rendering.

Presence of a shader stage in a pipeline is indicated by including a valid
slink:VkPipelineShaderStageCreateInfo with pname:module and pname:pName
selecting an entry point from a shader module, where that entry point is
valid for the stage specified by pname:stage.

Presence of some of the fixed-function stages in the pipeline is implicitly
derived from enabled shaders and provided state.
For example, the fixed-function tessellator is always present when the
pipeline has valid Tessellation Control and Tessellation Evaluation shaders.

.For example:
  * Depth/stencil-only rendering in a subpass with no color attachments
  ** Active Pipeline Shader Stages
  *** Vertex Shader
  ** Required: Fixed-Function Pipeline Stages
  *** slink:VkPipelineVertexInputStateCreateInfo
  *** slink:VkPipelineInputAssemblyStateCreateInfo
  *** slink:VkPipelineViewportStateCreateInfo
  *** slink:VkPipelineRasterizationStateCreateInfo
  *** slink:VkPipelineMultisampleStateCreateInfo
  *** slink:VkPipelineDepthStencilStateCreateInfo
  * Color-only rendering in a subpass with no depth/stencil attachment
  ** Active Pipeline Shader Stages
  *** Vertex Shader
  *** Fragment Shader
  ** Required: Fixed-Function Pipeline Stages
  *** slink:VkPipelineVertexInputStateCreateInfo
  *** slink:VkPipelineInputAssemblyStateCreateInfo
  *** slink:VkPipelineViewportStateCreateInfo
  *** slink:VkPipelineRasterizationStateCreateInfo
  *** slink:VkPipelineMultisampleStateCreateInfo
  *** slink:VkPipelineColorBlendStateCreateInfo
  * Rendering pipeline with tessellation and geometry shaders
  ** Active Pipeline Shader Stages
  *** Vertex Shader
  *** Tessellation Control Shader
  *** Tessellation Evaluation Shader
  *** Geometry Shader
  *** Fragment Shader
  ** Required: Fixed-Function Pipeline Stages
  *** slink:VkPipelineVertexInputStateCreateInfo
  *** slink:VkPipelineInputAssemblyStateCreateInfo
  *** slink:VkPipelineTessellationStateCreateInfo
  *** slink:VkPipelineViewportStateCreateInfo
  *** slink:VkPipelineRasterizationStateCreateInfo
  *** slink:VkPipelineMultisampleStateCreateInfo
  *** slink:VkPipelineDepthStencilStateCreateInfo
  *** slink:VkPipelineColorBlendStateCreateInfo
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  * Rendering pipeline with task and mesh shaders
  ** Active Pipeline Shader Stages
  *** Task Shader
  *** Mesh Shader
  *** Fragment Shader
  ** Required: Fixed-Function Pipeline Stages
  *** slink:VkPipelineViewportStateCreateInfo
  *** slink:VkPipelineRasterizationStateCreateInfo
  *** slink:VkPipelineMultisampleStateCreateInfo
  *** slink:VkPipelineDepthStencilStateCreateInfo
  *** slink:VkPipelineColorBlendStateCreateInfo
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]


ifdef::VK_NV_device_generated_commands[]
[[graphics-shadergroups]]
=== Graphics Pipeline Shader Groups

Graphics pipelines can contain multiple shader groups that can be bound
individually.
Each shader group behaves as if it was a pipeline using the shader group's
state.
When the pipeline is bound by regular means, it behaves as if the state of
group `0` is active, use flink:vkCmdBindPipelineShaderGroupNV to bind an
individual shader group.

The primary purpose of shader groups is allowing the device to bind
different pipeline state using <<device-generated-commands>>.

[open,refpage='VkGraphicsPipelineShaderGroupsCreateInfoNV',desc='Structure specifying parameters of a newly created multi shader group pipeline',type='structs']
--
The sname:VkGraphicsPipelineShaderGroupsCreateInfoNV structure is defined
as:

include::{generated}/api/structs/VkGraphicsPipelineShaderGroupsCreateInfoNV.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:groupCount is the number of elements in the pname:pGroups array.
  * pname:pGroups is a pointer to an array of
    slink:VkGraphicsShaderGroupCreateInfoNV structures specifying which
    state of the original slink:VkGraphicsPipelineCreateInfo each shader
    group overrides.
  * pname:pipelineCount is the number of elements in the pname:pPipelines
    array.
  * pname:pPipelines is a pointer to an array of graphics sname:VkPipeline
    structures which are referenced within the created pipeline, including
    all their shader groups.

When referencing shader groups by index, groups defined in the referenced
pipelines are treated as if they were defined as additional entries in
pname:pGroups.
They are appended in the order they appear in the pname:pPipelines array and
in the pname:pGroups array when those pipelines were defined.

The application must: maintain the lifetime of all such referenced pipelines
based on the pipelines that make use of them.

.Valid Usage
****
  * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-groupCount-02879]]
    pname:groupCount must: be at least `1` and as maximum
    sname:VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::pname:maxGraphicsShaderGroupCount
  * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-groupCount-02880]]
    The sum of pname:groupCount including those groups added from referenced
    pname:pPipelines must: also be as maximum
    sname:VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::pname:maxGraphicsShaderGroupCount
  * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-02881]]
    The state of the first element of pname:pGroups must: match its
    equivalent within the parent's slink:VkGraphicsPipelineCreateInfo
  * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-02882]]
    Each element of pname:pGroups must: in combination with the rest of the
    pipeline state yield a valid state configuration
  * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-02884]]
    All elements of pname:pGroups must: use the same shader stage
    combinations
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
    unless any mesh shader stage is used, then either combination of task
    and mesh or just mesh shader is valid
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-02885]]
    Mesh and regular primitive shading stages cannot be mixed across
    pname:pGroups
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
  * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pPipelines-02886]]
    Each element of pname:pPipelines must: have been created with identical
    state to the pipeline currently created except the state that can be
    overridden by slink:VkGraphicsShaderGroupCreateInfoNV
  * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-deviceGeneratedCommands-02887]]
    The <<features-deviceGeneratedCommands, pname:deviceGeneratedCommands>>
    feature must: be enabled
****

include::{generated}/validity/structs/VkGraphicsPipelineShaderGroupsCreateInfoNV.adoc[]
--

[open,refpage='VkGraphicsShaderGroupCreateInfoNV',desc='Structure specifying override parameters for each shader group',type='structs']
--
The sname:VkGraphicsShaderGroupCreateInfoNV structure provides the state
overrides for each shader group.
Each shader group behaves like a pipeline that was created from its state as
well as the remaining parent's state.
It is defined as:

include::{generated}/api/structs/VkGraphicsShaderGroupCreateInfoNV.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:stageCount is the number of entries in the pname:pStages array.
  * pname:pStages is a pointer to an array
    slink:VkPipelineShaderStageCreateInfo structures specifying the set of
    the shader stages to be included in this shader group.
  * pname:pVertexInputState is a pointer to a
    slink:VkPipelineVertexInputStateCreateInfo structure.
  * pname:pTessellationState is a pointer to a
    slink:VkPipelineTessellationStateCreateInfo structure, and is ignored if
    the shader group does not include a tessellation control shader stage
    and tessellation evaluation shader stage.

.Valid Usage
****
  * [[VUID-VkGraphicsShaderGroupCreateInfoNV-stageCount-02888]]
    For pname:stageCount, the same restrictions as in
    slink:VkGraphicsPipelineCreateInfo::pname:stageCount apply
  * [[VUID-VkGraphicsShaderGroupCreateInfoNV-pStages-02889]]
    For pname:pStages, the same restrictions as in
    slink:VkGraphicsPipelineCreateInfo::pname:pStages apply
  * [[VUID-VkGraphicsShaderGroupCreateInfoNV-pVertexInputState-02890]]
    For pname:pVertexInputState, the same restrictions as in
    slink:VkGraphicsPipelineCreateInfo::pname:pVertexInputState apply
  * [[VUID-VkGraphicsShaderGroupCreateInfoNV-pTessellationState-02891]]
    For pname:pTessellationState, the same restrictions as in
    slink:VkGraphicsPipelineCreateInfo::pname:pTessellationState apply
****

include::{generated}/validity/structs/VkGraphicsShaderGroupCreateInfoNV.adoc[]
--
endif::VK_NV_device_generated_commands[]


ifdef::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[]
[[pipelines-ray-tracing]]
== Ray Tracing Pipelines

Ray tracing pipelines consist of multiple shader stages, fixed-function
traversal stages, and a pipeline layout.

[open,refpage='VK_SHADER_UNUSED_KHR',desc='Sentinel for an unused shader index',type='consts',alias='VK_SHADER_UNUSED_NV']
--
ename:VK_SHADER_UNUSED_KHR is a special shader index used to indicate that a
ray generation, miss, or callable shader member is not used.

include::{generated}/api/enums/VK_SHADER_UNUSED_KHR.adoc[]

ifdef::VK_NV_ray_tracing[]
or the equivalent

include::{generated}/api/enums/VK_SHADER_UNUSED_NV.adoc[]
endif::VK_NV_ray_tracing[]
--

ifdef::VK_NV_ray_tracing[]
[open,refpage='vkCreateRayTracingPipelinesNV',desc='Creates a new ray tracing pipeline object',type='protos']
--
:refpage: vkCreateRayTracingPipelinesNV

To create ray tracing pipelines, call:

include::{generated}/api/protos/vkCreateRayTracingPipelinesNV.adoc[]

  * pname:device is the logical device that creates the ray tracing
    pipelines.
ifndef::VKSC_VERSION_1_0[]
  * pname:pipelineCache is either dlink:VK_NULL_HANDLE, indicating that
    pipeline caching is disabled, or the handle of a valid
    <<pipelines-cache,pipeline cache>> object, in which case use of that
    cache is enabled for the duration of the command.
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
  * pname:pipelineCache is the handle of a valid <<pipelines-cache,pipeline
    cache>> object.
endif::VKSC_VERSION_1_0[]
  * pname:createInfoCount is the length of the pname:pCreateInfos and
    pname:pPipelines arrays.
  * pname:pCreateInfos is a pointer to an array of
    slink:VkRayTracingPipelineCreateInfoNV structures.
  * pname:pAllocator controls host memory allocation as described in the
    <<memory-allocation, Memory Allocation>> chapter.
  * pname:pPipelines is a pointer to an array in which the resulting ray
    tracing pipeline objects are returned.

ifdef::VKSC_VERSION_1_0[]
If a pipeline creation fails due to:

  * The identified pipeline not being present in pname:pipelineCache
  * The pname:pNext chain not including a slink:VkPipelineOfflineCreateInfo
    structure

the operation will continue as specified in <<pipelines-multiple, Multiple
Pipeline Creation>> and the command will return
ename:VK_ERROR_NO_PIPELINE_MATCH.
ifdef::hidden[]
// tag::scdeviation[]
ifdef::VK_NV_ray_tracing[]
  * flink:vkCreateRayTracingPipelinesNV returns
    ename:VK_ERROR_NO_PIPELINE_MATCH if the
    slink:VkRayTracingPipelineCreateInfoNV::pname:pNext chain does not
    include a valid slink:VkPipelineOfflineCreateInfo structure <<SCID-1>>.
endif::VK_NV_ray_tracing[]
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

.Valid Usage
****
include::{chapters}/commonvalidity/create_ray_tracing_pipelines_common.adoc[]
****
ifdef::VKSC_VERSION_1_0[]
ifdef::hidden[]
// tag::scdeviation[]
ifdef::VK_NV_ray_tracing[]
  * flink:vkCreateRayTracingPipelinesNV::pname:pipelineCache must: not be
    dlink:VK_NULL_HANDLE <<SCID-1>>, <<SCID-8>>.
endif::VK_NV_ray_tracing[]
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

include::{generated}/validity/protos/vkCreateRayTracingPipelinesNV.adoc[]
--
endif::VK_NV_ray_tracing[]

ifdef::VK_KHR_ray_tracing_pipeline[]
[open,refpage='vkCreateRayTracingPipelinesKHR',desc='Creates a new ray tracing pipeline object',type='protos']
--
:refpage: vkCreateRayTracingPipelinesKHR

To create ray tracing pipelines, call:

include::{generated}/api/protos/vkCreateRayTracingPipelinesKHR.adoc[]

  * pname:device is the logical device that creates the ray tracing
    pipelines.
  * pname:deferredOperation is dlink:VK_NULL_HANDLE or the handle of a valid
    slink:VkDeferredOperationKHR <<deferred-host-operations-requesting,
    request deferral>> object for this command.
ifndef::VKSC_VERSION_1_0[]
  * pname:pipelineCache is either dlink:VK_NULL_HANDLE, indicating that
    pipeline caching is disabled, or the handle of a valid
    <<pipelines-cache,pipeline cache>> object, in which case use of that
    cache is enabled for the duration of the command.
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
  * pname:pipelineCache is the handle of a valid <<pipelines-cache,pipeline
    cache>> object.
endif::VKSC_VERSION_1_0[]
  * pname:createInfoCount is the length of the pname:pCreateInfos and
    pname:pPipelines arrays.
  * pname:pCreateInfos is a pointer to an array of
    slink:VkRayTracingPipelineCreateInfoKHR structures.
  * pname:pAllocator controls host memory allocation as described in the
    <<memory-allocation, Memory Allocation>> chapter.
  * pname:pPipelines is a pointer to an array in which the resulting ray
    tracing pipeline objects are returned.

The ename:VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS error is returned if the
implementation is unable to reuse the shader group handles provided in
slink:VkRayTracingShaderGroupCreateInfoKHR::pname:pShaderGroupCaptureReplayHandle
when
slink:VkPhysicalDeviceRayTracingPipelineFeaturesKHR::pname:rayTracingPipelineShaderGroupHandleCaptureReplay
is enabled.

ifdef::VKSC_VERSION_1_0[]
If a pipeline creation fails due to:

  * The identified pipeline not being present in pname:pipelineCache
  * The pname:pNext chain not including a slink:VkPipelineOfflineCreateInfo
    structure

the operation will continue as specified in <<pipelines-multiple, Multiple
Pipeline Creation>> and the command will return
ename:VK_ERROR_NO_PIPELINE_MATCH.
ifdef::hidden[]
// tag::scdeviation[]
ifdef::VK_KHR_ray_tracing_pipeline[]
  * flink:vkCreateRayTracingPipelinesKHR returns
    ename:VK_ERROR_NO_PIPELINE_MATCH if the
    slink:VkRayTracingPipelineCreateInfoKHR::pname:pNext chain does not
    include a valid slink:VkPipelineOfflineCreateInfo structure <<SCID-1>>.
endif::VK_KHR_ray_tracing_pipeline[]
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

.Valid Usage
****
include::{chapters}/commonvalidity/create_ray_tracing_pipelines_common.adoc[]
include::{chapters}/commonvalidity/deferred_operations_common.adoc[]
  * [[VUID-vkCreateRayTracingPipelinesKHR-rayTracingPipeline-03586]]
    The <<features-rayTracingPipeline, pname:rayTracingPipeline>> feature
    must: be enabled
ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
ifdef::VK_KHR_deferred_host_operations[]
  * [[VUID-vkCreateRayTracingPipelinesKHR-deferredOperation-03587]]
    If pname:deferredOperation is not dlink:VK_NULL_HANDLE, the pname:flags
    member of elements of pname:pCreateInfos must: not include
    ename:VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT
endif::VK_KHR_deferred_host_operations[]
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
****
ifdef::VKSC_VERSION_1_0[]
ifdef::hidden[]
// tag::scdeviation[]
ifdef::VK_KHR_ray_tracing_pipeline[]
  * flink:vkCreateRayTracingPipelinesKHR::pname:pipelineCache must: not be
    dlink:VK_NULL_HANDLE <<SCID-1>>, <<SCID-8>>.
endif::VK_KHR_ray_tracing_pipeline[]
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

include::{generated}/validity/protos/vkCreateRayTracingPipelinesKHR.adoc[]
--
endif::VK_KHR_ray_tracing_pipeline[]

ifdef::VK_NV_ray_tracing[]
[open,refpage='VkRayTracingPipelineCreateInfoNV',desc='Structure specifying parameters of a newly created ray tracing pipeline',type='structs']
--
:refpage: VkRayTracingPipelineCreateInfoNV

The sname:VkRayTracingPipelineCreateInfoNV structure is defined as:

include::{generated}/api/structs/VkRayTracingPipelineCreateInfoNV.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:flags is a bitmask of elink:VkPipelineCreateFlagBits specifying
    how the pipeline will be generated.
  * pname:stageCount is the number of entries in the pname:pStages array.
  * pname:pStages is a pointer to an array of
    slink:VkPipelineShaderStageCreateInfo structures specifying the set of
    the shader stages to be included in the ray tracing pipeline.
  * pname:groupCount is the number of entries in the pname:pGroups array.
  * pname:pGroups is a pointer to an array of
    slink:VkRayTracingShaderGroupCreateInfoNV structures describing the set
    of the shader stages to be included in each shader group in the ray
    tracing pipeline.
  * pname:maxRecursionDepth is the <<ray-tracing-recursion-depth, maximum
    recursion depth>> of shaders executed by this pipeline.
  * pname:layout is the description of binding locations used by both the
    pipeline and descriptor sets used with the pipeline.
  * pname:basePipelineHandle is a pipeline to derive from.
ifdef::VKSC_VERSION_1_0[]
    This is not used in Vulkan SC <<SCID-8>>.
endif::VKSC_VERSION_1_0[]
  * pname:basePipelineIndex is an index into the pname:pCreateInfos
    parameter to use as a pipeline to derive from.
ifdef::VKSC_VERSION_1_0[]
    This is not used in Vulkan SC <<SCID-8>>.
endif::VKSC_VERSION_1_0[]

The parameters pname:basePipelineHandle and pname:basePipelineIndex are
described in more detail in <<pipelines-pipeline-derivatives,Pipeline
Derivatives>>.

ifdef::VK_KHR_maintenance5[]
If a slink:VkPipelineCreateFlags2CreateInfoKHR structure is present in the
pname:pNext chain, slink:VkPipelineCreateFlags2CreateInfoKHR::pname:flags
from that structure is used instead of pname:flags from this structure.
endif::VK_KHR_maintenance5[]

.Valid Usage
****
:pipelineType: ray tracing
include::{chapters}/commonvalidity/pipeline_create_info_common.adoc[]
include::{chapters}/commonvalidity/ray_tracing_pipeline_create_info_common.adoc[]
  * [[VUID-VkRayTracingPipelineCreateInfoNV-stage-06232]]
    The pname:stage member of at least one element of pname:pStages must: be
    ename:VK_SHADER_STAGE_RAYGEN_BIT_KHR
ifdef::VK_KHR_pipeline_library[]
  * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03456]]
    pname:flags must: not include ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR
endif::VK_KHR_pipeline_library[]
  * [[VUID-VkRayTracingPipelineCreateInfoNV-maxRecursionDepth-03457]]
    pname:maxRecursionDepth must: be less than or equal to
    slink:VkPhysicalDeviceRayTracingPropertiesNV::pname:maxRecursionDepth
ifdef::VK_KHR_ray_tracing_pipeline[]
  * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03458]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR
  * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03459]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR
  * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03460]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR
  * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03461]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR
  * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03462]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR
  * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03463]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR
  * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03588]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
endif::VK_KHR_ray_tracing_pipeline[]
ifdef::VK_NV_ray_tracing_motion_blur[]
  * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-04948]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV
endif::VK_NV_ray_tracing_motion_blur[]
ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
  * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-02957]]
    pname:flags must: not include both
    ename:VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV and
    ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT at the
    same time
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
ifdef::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[]
  * [[VUID-VkRayTracingPipelineCreateInfoNV-pipelineStageCreationFeedbackCount-06651]]
    If
    slink:VkPipelineCreationFeedbackCreateInfo::pname:pipelineStageCreationFeedbackCount
    is not `0`, it must: be equal to pname:stageCount
endif::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[]
  * [[VUID-VkRayTracingPipelineCreateInfoNV-stage-06898]]
    The pname:stage value in all pname:pStages elements must: be one of
    ename:VK_SHADER_STAGE_RAYGEN_BIT_KHR,
    ename:VK_SHADER_STAGE_ANY_HIT_BIT_KHR,
    ename:VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR,
    ename:VK_SHADER_STAGE_MISS_BIT_KHR,
    ename:VK_SHADER_STAGE_INTERSECTION_BIT_KHR, or
    ename:VK_SHADER_STAGE_CALLABLE_BIT_KHR
ifdef::VK_EXT_opacity_micromap[]
  * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-07402]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT
endif::VK_EXT_opacity_micromap[]
ifdef::VK_NV_displacement_micromap[]
  * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-07998]]
    pname:flags must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV
endif::VK_NV_displacement_micromap[]
****
ifdef::VKSC_VERSION_1_0[]
ifdef::hidden[]
// tag::scdeviation[]
ifdef::VK_NV_ray_tracing[]
  * slink:VkRayTracingPipelineCreateInfoNV::pname:basePipelineHandle must:
    be dlink:VK_NULL_HANDLE <<SCID-8>>.
  * slink:VkRayTracingPipelineCreateInfoNV::pname:basePipelineIndex must: be
    zero <<SCID-8>>.
endif::VK_NV_ray_tracing[]
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

include::{generated}/validity/structs/VkRayTracingPipelineCreateInfoNV.adoc[]
--
endif::VK_NV_ray_tracing[]

ifdef::VK_KHR_ray_tracing_pipeline[]
[open,refpage='VkRayTracingPipelineCreateInfoKHR',desc='Structure specifying parameters of a newly created ray tracing pipeline',type='structs']
--
:refpage: VkRayTracingPipelineCreateInfoKHR

The sname:VkRayTracingPipelineCreateInfoKHR structure is defined as:

include::{generated}/api/structs/VkRayTracingPipelineCreateInfoKHR.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:flags is a bitmask of elink:VkPipelineCreateFlagBits specifying
    how the pipeline will be generated.
  * pname:stageCount is the number of entries in the pname:pStages array.
  * pname:pStages is a pointer to an array of pname:stageCount
    slink:VkPipelineShaderStageCreateInfo structures describing the set of
    the shader stages to be included in the ray tracing pipeline.
  * pname:groupCount is the number of entries in the pname:pGroups array.
  * pname:pGroups is a pointer to an array of pname:groupCount
    slink:VkRayTracingShaderGroupCreateInfoKHR structures describing the set
    of the shader stages to be included in each shader group in the ray
    tracing pipeline.
  * pname:maxPipelineRayRecursionDepth is the <<ray-tracing-recursion-depth,
    maximum recursion depth>> of shaders executed by this pipeline.
  * pname:pLibraryInfo is a pointer to a
    slink:VkPipelineLibraryCreateInfoKHR structure defining pipeline
    libraries to include.
  * pname:pLibraryInterface is a pointer to a
    slink:VkRayTracingPipelineInterfaceCreateInfoKHR structure defining
    additional information when using pipeline libraries.
  * pname:pDynamicState is a pointer to a
    slink:VkPipelineDynamicStateCreateInfo structure, and is used to
    indicate which properties of the pipeline state object are dynamic and
    can: be changed independently of the pipeline state.
    This can: be `NULL`, which means no state in the pipeline is considered
    dynamic.
  * pname:layout is the description of binding locations used by both the
    pipeline and descriptor sets used with the pipeline.
  * pname:basePipelineHandle is a pipeline to derive from.
ifdef::VKSC_VERSION_1_0[]
    This is not used in Vulkan SC <<SCID-8>>.
endif::VKSC_VERSION_1_0[]
  * pname:basePipelineIndex is an index into the pname:pCreateInfos
    parameter to use as a pipeline to derive from.
ifdef::VKSC_VERSION_1_0[]
    This is not used in Vulkan SC <<SCID-8>>.
endif::VKSC_VERSION_1_0[]

The parameters pname:basePipelineHandle and pname:basePipelineIndex are
described in more detail in <<pipelines-pipeline-derivatives,Pipeline
Derivatives>>.

ifdef::VK_KHR_pipeline_library[]
When ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR is specified, this pipeline
defines a _pipeline library_ which cannot: be bound as a ray tracing
pipeline directly.
Instead, pipeline libraries define common shaders and shader groups which
can: be included in future pipeline creation.

If pipeline libraries are included in pname:pLibraryInfo, shaders defined in
those libraries are treated as if they were defined as additional entries in
pname:pStages, appended in the order they appear in the pname:pLibraries
array and in the pname:pStages array when those libraries were defined.

When referencing shader groups in order to obtain a shader group handle,
groups defined in those libraries are treated as if they were defined as
additional entries in pname:pGroups, appended in the order they appear in
the pname:pLibraries array and in the pname:pGroups array when those
libraries were defined.
The shaders these groups reference are set when the pipeline library is
created, referencing those specified in the pipeline library, not in the
pipeline that includes it.
endif::VK_KHR_pipeline_library[]

The default stack size for a pipeline if
ename:VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR is not provided
is computed as described in <<ray-tracing-pipeline-stack, Ray Tracing
Pipeline Stack>>.

ifdef::VK_KHR_maintenance5[]
If a slink:VkPipelineCreateFlags2CreateInfoKHR structure is present in the
pname:pNext chain, slink:VkPipelineCreateFlags2CreateInfoKHR::pname:flags
from that structure is used instead of pname:flags from this structure.
endif::VK_KHR_maintenance5[]

.Valid Usage
****
:pipelineType: ray tracing
include::{chapters}/commonvalidity/pipeline_create_info_common.adoc[]
include::{chapters}/commonvalidity/ray_tracing_pipeline_create_info_common.adoc[]
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-stage-03425]]
    If pname:flags does not include
    ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, the pname:stage member of at
    least one element of pname:pStages, including those implicitly added by
    pname:pLibraryInfo, must: be ename:VK_SHADER_STAGE_RAYGEN_BIT_KHR
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-maxPipelineRayRecursionDepth-03589]]
    pname:maxPipelineRayRecursionDepth must: be less than or equal to
    slink:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:maxRayRecursionDepth
ifdef::VK_KHR_pipeline_library[]
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-03465]]
    If pname:flags includes ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR,
    pname:pLibraryInterface must: not be `NULL`
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-03590]]
    If pname:pLibraryInfo is not `NULL` and its pname:libraryCount member is
    greater than `0`, pname:pLibraryInterface must: not be `NULL`
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-pLibraries-03591]]
    Each element of pname:pLibraryInfo->pLibraries must: have been created
    with the value of pname:maxPipelineRayRecursionDepth equal to that in
    this pipeline
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-03592]]
    If pname:pLibraryInfo is not `NULL`, each element of its
    pname:pLibraries member must: have been created with a pname:layout that
    is compatible with the pname:layout in this pipeline
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-03593]]
    If pname:pLibraryInfo is not `NULL`, each element of its
    pname:pLibraries member must: have been created with values of the
    pname:maxPipelineRayPayloadSize and pname:maxPipelineRayHitAttributeSize
    members of pname:pLibraryInterface equal to those in this pipeline
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-03594]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR,
    each element of pname:pLibraryInfo->pLibraries must: have been created
    with the
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
    bit set
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-04718]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR, each element of
    pname:pLibraryInfo->pLibraries must: have been created with the
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR bit set
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-04719]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR, each
    element of pname:pLibraryInfo->pLibraries must: have been created with
    the ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR bit set
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-04720]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR,
    each element of pname:pLibraryInfo->pLibraries must: have been created
    with the
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR bit
    set
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-04721]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR,
    each element of pname:pLibraryInfo->pLibraries must: have been created
    with the
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR
    bit set
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-04722]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR,
    each element of pname:pLibraryInfo->pLibraries must: have been created
    with the
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR
    bit set
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-04723]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, each
    element of pname:pLibraryInfo->pLibraries must: have been created with
    the ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR
    bit set
endif::VK_KHR_pipeline_library[]
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-03595]]
    If the `apiext:VK_KHR_pipeline_library` extension is not enabled,
    pname:pLibraryInfo and pname:pLibraryInterface must: be `NULL`
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-03470]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR,
    for any element of pname:pGroups with a pname:type of
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR or
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, the
    pname:anyHitShader of that element must: not be
    ename:VK_SHADER_UNUSED_KHR
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-03471]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR,
    for any element of pname:pGroups with a pname:type of
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR or
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, the
    pname:closestHitShader of that element must: not be
    ename:VK_SHADER_UNUSED_KHR
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-rayTraversalPrimitiveCulling-03596]]
    If the <<features-rayTraversalPrimitiveCulling,
    pname:rayTraversalPrimitiveCulling>> feature is not enabled, pname:flags
    must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-rayTraversalPrimitiveCulling-03597]]
    If the <<features-rayTraversalPrimitiveCulling,
    pname:rayTraversalPrimitiveCulling>> feature is not enabled, pname:flags
    must: not include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-06546]]
    pname:flags must: not include both
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR and
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-03598]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR,
    <<features-rayTracingPipelineShaderGroupHandleCaptureReplay,
    pname:rayTracingPipelineShaderGroupHandleCaptureReplay>> must: be
    enabled
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-rayTracingPipelineShaderGroupHandleCaptureReplay-03599]]
    If
    slink:VkPhysicalDeviceRayTracingPipelineFeaturesKHR::pname:rayTracingPipelineShaderGroupHandleCaptureReplay
    is ename:VK_TRUE and the pname:pShaderGroupCaptureReplayHandle member of
    any element of pname:pGroups is not `NULL`, pname:flags must: include
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-07999]]
    If pname:pLibraryInfo is `NULL` or its pname:libraryCount is `0`,
    pname:stageCount must: not be `0`
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-08700]]
    If pname:flags does not include ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR
    and either pname:pLibraryInfo is `NULL` or its pname:libraryCount is
    `0`, pname:groupCount must: not be `0`
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-pDynamicStates-03602]]
    Any element of the pname:pDynamicStates member of pname:pDynamicState
    must: be ename:VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR
ifdef::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[]
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-pipelineStageCreationFeedbackCount-06652]]
    If
    slink:VkPipelineCreationFeedbackCreateInfo::pname:pipelineStageCreationFeedbackCount
    is not `0`, it must: be equal to pname:stageCount
endif::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[]
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-stage-06899]]
    The pname:stage value in all pname:pStages elements must: be one of
    ename:VK_SHADER_STAGE_RAYGEN_BIT_KHR,
    ename:VK_SHADER_STAGE_ANY_HIT_BIT_KHR,
    ename:VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR,
    ename:VK_SHADER_STAGE_MISS_BIT_KHR,
    ename:VK_SHADER_STAGE_INTERSECTION_BIT_KHR, or
    ename:VK_SHADER_STAGE_CALLABLE_BIT_KHR
ifdef::VK_EXT_opacity_micromap[]
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-07403]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT, each
    element of pname:pLibraryInfo->pLibraries must: have been created with
    the ename:VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT bit
    set
endif::VK_EXT_opacity_micromap[]
ifdef::VK_NV_displacement_micromap[]
  * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-08701]]
    If pname:flags includes
    ename:VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV, each
    element of pname:pLibraryInfo->pLibraries must: have been created with
    the ename:VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV
    bit set
endif::VK_NV_displacement_micromap[]
****
ifdef::VKSC_VERSION_1_0[]
ifdef::hidden[]
// tag::scdeviation[]
ifdef::VK_KHR_ray_tracing_pipeline[]
  * slink:VkRayTracingPipelineCreateInfoKHR::pname:flags must: not contain
    the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag <<SCID-8>>.
  * slink:VkRayTracingPipelineCreateInfoKHR::pname:basePipelineHandle must:
    be dlink:VK_NULL_HANDLE <<SCID-8>>.
  * slink:VkRayTracingPipelineCreateInfoKHR::pname:basePipelineIndex must:
    be zero <<SCID-8>>.
endif::VK_KHR_ray_tracing_pipeline[]
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

include::{generated}/validity/structs/VkRayTracingPipelineCreateInfoKHR.adoc[]
--
endif::VK_KHR_ray_tracing_pipeline[]

ifdef::VK_NV_ray_tracing[]
[open,refpage='VkRayTracingShaderGroupCreateInfoNV',desc='Structure specifying shaders in a shader group',type='structs']
--
:refpage: VkRayTracingShaderGroupCreateInfoNV

The sname:VkRayTracingShaderGroupCreateInfoNV structure is defined as:

include::{generated}/api/structs/VkRayTracingShaderGroupCreateInfoNV.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:type is the type of hit group specified in this structure.
  * pname:generalShader is the index of the ray generation, miss, or
    callable shader from
    slink:VkRayTracingPipelineCreateInfoNV::pname:pStages in the group if
    the shader group has pname:type of
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV, and
    ename:VK_SHADER_UNUSED_NV otherwise.
  * pname:closestHitShader is the optional index of the closest hit shader
    from slink:VkRayTracingPipelineCreateInfoNV::pname:pStages in the group
    if the shader group has pname:type of
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV or
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV, and
    ename:VK_SHADER_UNUSED_NV otherwise.
  * pname:anyHitShader is the optional index of the any-hit shader from
    slink:VkRayTracingPipelineCreateInfoNV::pname:pStages in the group if
    the shader group has pname:type of
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV or
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV, and
    ename:VK_SHADER_UNUSED_NV otherwise.
  * pname:intersectionShader is the index of the intersection shader from
    slink:VkRayTracingPipelineCreateInfoNV::pname:pStages in the group if
    the shader group has pname:type of
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV, and
    ename:VK_SHADER_UNUSED_NV otherwise.

.Valid Usage
****
  * [[VUID-VkRayTracingShaderGroupCreateInfoNV-type-02413]]
    If pname:type is ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV then
    pname:generalShader must: be a valid index into
    slink:VkRayTracingPipelineCreateInfoNV::pname:pStages referring to a
    shader of ename:VK_SHADER_STAGE_RAYGEN_BIT_NV,
    ename:VK_SHADER_STAGE_MISS_BIT_NV, or
    ename:VK_SHADER_STAGE_CALLABLE_BIT_NV
  * [[VUID-VkRayTracingShaderGroupCreateInfoNV-type-02414]]
    If pname:type is ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV then
    pname:closestHitShader, pname:anyHitShader, and pname:intersectionShader
    must: be ename:VK_SHADER_UNUSED_NV
  * [[VUID-VkRayTracingShaderGroupCreateInfoNV-type-02415]]
    If pname:type is
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV then
    pname:intersectionShader must: be a valid index into
    slink:VkRayTracingPipelineCreateInfoNV::pname:pStages referring to a
    shader of ename:VK_SHADER_STAGE_INTERSECTION_BIT_NV
  * [[VUID-VkRayTracingShaderGroupCreateInfoNV-type-02416]]
    If pname:type is
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV then
    pname:intersectionShader must: be ename:VK_SHADER_UNUSED_NV
  * [[VUID-VkRayTracingShaderGroupCreateInfoNV-closestHitShader-02417]]
    pname:closestHitShader must: be either ename:VK_SHADER_UNUSED_NV or a
    valid index into slink:VkRayTracingPipelineCreateInfoNV::pname:pStages
    referring to a shader of ename:VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV
  * [[VUID-VkRayTracingShaderGroupCreateInfoNV-anyHitShader-02418]]
    pname:anyHitShader must: be either ename:VK_SHADER_UNUSED_NV or a valid
    index into slink:VkRayTracingPipelineCreateInfoNV::pname:pStages
    referring to a shader of ename:VK_SHADER_STAGE_ANY_HIT_BIT_NV
****

include::{generated}/validity/structs/VkRayTracingShaderGroupCreateInfoNV.adoc[]
--

endif::VK_NV_ray_tracing[]

ifdef::VK_KHR_ray_tracing_pipeline[]
[open,refpage='VkRayTracingShaderGroupCreateInfoKHR',desc='Structure specifying shaders in a shader group',type='structs']
--
:refpage: VkRayTracingShaderGroupCreateInfoKHR

The sname:VkRayTracingShaderGroupCreateInfoKHR structure is defined as:

include::{generated}/api/structs/VkRayTracingShaderGroupCreateInfoKHR.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:type is the type of hit group specified in this structure.
  * pname:generalShader is the index of the ray generation, miss, or
    callable shader from
    slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages in the group if
    the shader group has pname:type of
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR, and
    ename:VK_SHADER_UNUSED_KHR otherwise.
  * pname:closestHitShader is the optional index of the closest hit shader
    from slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages in the group
    if the shader group has pname:type of
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR or
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, and
    ename:VK_SHADER_UNUSED_KHR otherwise.
  * pname:anyHitShader is the optional index of the any-hit shader from
    slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages in the group if
    the shader group has pname:type of
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR or
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, and
    ename:VK_SHADER_UNUSED_KHR otherwise.
  * pname:intersectionShader is the index of the intersection shader from
    slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages in the group if
    the shader group has pname:type of
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, and
    ename:VK_SHADER_UNUSED_KHR otherwise.
  * pname:pShaderGroupCaptureReplayHandle is `NULL` or a pointer to replay
    information for this shader group queried from
    flink:vkGetRayTracingCaptureReplayShaderGroupHandlesKHR, as described in
    <<ray-tracing-capture-replay, Ray Tracing Capture Replay>>.
    Ignored if
    slink:VkPhysicalDeviceRayTracingPipelineFeaturesKHR::pname:rayTracingPipelineShaderGroupHandleCaptureReplay
    is ename:VK_FALSE.

ifdef::VK_EXT_pipeline_library_group_handles[]
If the pipeline is created with ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR and
the <<features-pipelineLibraryGroupHandles,pipelineLibraryGroupHandles>>
feature is enabled, pname:pShaderGroupCaptureReplayHandle is inherited by
all pipelines which link against this pipeline and remains bitwise identical
for any pipeline which references this pipeline library.
endif::VK_EXT_pipeline_library_group_handles[]

.Valid Usage
****
  * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-type-03474]]
    If pname:type is ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR then
    pname:generalShader must: be a valid index into
    slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages referring to a
    shader of ename:VK_SHADER_STAGE_RAYGEN_BIT_KHR,
    ename:VK_SHADER_STAGE_MISS_BIT_KHR, or
    ename:VK_SHADER_STAGE_CALLABLE_BIT_KHR
  * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-type-03475]]
    If pname:type is ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR then
    pname:closestHitShader, pname:anyHitShader, and pname:intersectionShader
    must: be ename:VK_SHADER_UNUSED_KHR
  * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-type-03476]]
    If pname:type is
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR then
    pname:intersectionShader must: be a valid index into
    slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages referring to a
    shader of ename:VK_SHADER_STAGE_INTERSECTION_BIT_KHR
  * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-type-03477]]
    If pname:type is
    ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR then
    pname:intersectionShader must: be ename:VK_SHADER_UNUSED_KHR
  * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-closestHitShader-03478]]
    pname:closestHitShader must: be either ename:VK_SHADER_UNUSED_KHR or a
    valid index into slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages
    referring to a shader of ename:VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR
  * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-anyHitShader-03479]]
    pname:anyHitShader must: be either ename:VK_SHADER_UNUSED_KHR or a valid
    index into slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages
    referring to a shader of ename:VK_SHADER_STAGE_ANY_HIT_BIT_KHR
  * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-rayTracingPipelineShaderGroupHandleCaptureReplayMixed-03603]]
    If
    slink:VkPhysicalDeviceRayTracingPipelineFeaturesKHR::pname:rayTracingPipelineShaderGroupHandleCaptureReplayMixed
    is ename:VK_FALSE then pname:pShaderGroupCaptureReplayHandle must: not
    be provided if it has not been provided on a previous call to ray
    tracing pipeline creation
  * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-rayTracingPipelineShaderGroupHandleCaptureReplayMixed-03604]]
    If
    slink:VkPhysicalDeviceRayTracingPipelineFeaturesKHR::pname:rayTracingPipelineShaderGroupHandleCaptureReplayMixed
    is ename:VK_FALSE then the caller must: guarantee that no ray tracing
    pipeline creation commands with pname:pShaderGroupCaptureReplayHandle
    provided execute simultaneously with ray tracing pipeline creation
    commands without pname:pShaderGroupCaptureReplayHandle provided
****

include::{generated}/validity/structs/VkRayTracingShaderGroupCreateInfoKHR.adoc[]
--
endif::VK_KHR_ray_tracing_pipeline[]

[open,refpage='VkRayTracingShaderGroupTypeKHR',desc='Shader group types',type='enums',alias='VkRayTracingShaderGroupTypeNV']
--
:refpage: VkRayTracingShaderGroupTypeKHR

Possible values of pname:type in sname:VkRayTracingShaderGroupCreateInfoKHR
are:

include::{generated}/api/enums/VkRayTracingShaderGroupTypeKHR.adoc[]

ifdef::VK_NV_ray_tracing[]
or the equivalent

include::{generated}/api/enums/VkRayTracingShaderGroupTypeNV.adoc[]
endif::VK_NV_ray_tracing[]

  * ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR indicates a shader
    group with a single ename:VK_SHADER_STAGE_RAYGEN_BIT_KHR,
    ename:VK_SHADER_STAGE_MISS_BIT_KHR, or
    ename:VK_SHADER_STAGE_CALLABLE_BIT_KHR shader in it.
  * ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR specifies
    a shader group that only hits triangles and must: not contain an
    intersection shader, only closest hit and any-hit shaders.
  * ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR
    specifies a shader group that only intersects with custom geometry and
    must: contain an intersection shader and may: contain closest hit and
    any-hit shaders.

[NOTE]
.Note
====
For current group types, the hit group type could be inferred from the
presence or absence of the intersection shader, but we provide the type
explicitly for future hit groups that do not have that property.
====
--

ifdef::VK_KHR_ray_tracing_pipeline[]
[open,refpage='VkRayTracingPipelineInterfaceCreateInfoKHR',desc='Structure specifying additional interface information when using libraries',type='structs']
--
:refpage: VkRayTracingPipelineInterfaceCreateInfoKHR

The sname:VkRayTracingPipelineInterfaceCreateInfoKHR structure is defined
as:

include::{generated}/api/structs/VkRayTracingPipelineInterfaceCreateInfoKHR.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:maxPipelineRayPayloadSize is the maximum payload size in bytes
    used by any shader in the pipeline.
  * pname:maxPipelineRayHitAttributeSize is the maximum attribute structure
    size in bytes used by any shader in the pipeline.

pname:maxPipelineRayPayloadSize is calculated as the maximum number of bytes
used by any block declared in the code:RayPayloadKHR or
code:IncomingRayPayloadKHR storage classes.
pname:maxPipelineRayHitAttributeSize is calculated as the maximum number of
bytes used by any block declared in the code:HitAttributeKHR storage class.
As variables in these storage classes do not have explicit offsets, the size
should be calculated as if each variable has a
<<interfaces-alignment-requirements, scalar alignment>> equal to the largest
scalar alignment of any of the block's members.

[NOTE]
.Note
====
There is no explicit upper limit for pname:maxPipelineRayPayloadSize, but in
practice it should be kept as small as possible.
Similar to invocation local memory, it must be allocated for each shader
invocation and for devices which support many simultaneous invocations, this
storage can rapidly be exhausted, resulting in failure.
====

.Valid Usage
****
  * [[VUID-VkRayTracingPipelineInterfaceCreateInfoKHR-maxPipelineRayHitAttributeSize-03605]]
    pname:maxPipelineRayHitAttributeSize must: be less than or equal to
    slink:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:maxRayHitAttributeSize
****

include::{generated}/validity/structs/VkRayTracingPipelineInterfaceCreateInfoKHR.adoc[]
--
endif::VK_KHR_ray_tracing_pipeline[]

[open,refpage='vkGetRayTracingShaderGroupHandlesKHR',desc='Query ray tracing pipeline shader group handles',type='protos',alias='vkGetRayTracingShaderGroupHandlesNV']
--
:refpage: vkGetRayTracingShaderGroupHandlesKHR

To query the opaque handles of shaders in the ray tracing pipeline, call:

ifdef::VK_KHR_ray_tracing_pipeline[]
include::{generated}/api/protos/vkGetRayTracingShaderGroupHandlesKHR.adoc[]
endif::VK_KHR_ray_tracing_pipeline[]

ifdef::VK_KHR_ray_tracing_pipeline+VK_NV_ray_tracing[or the equivalent command]

ifdef::VK_NV_ray_tracing[]
include::{generated}/api/protos/vkGetRayTracingShaderGroupHandlesNV.adoc[]
endif::VK_NV_ray_tracing[]

  * pname:device is the logical device containing the ray tracing pipeline.
  * pname:pipeline is the ray tracing pipeline object containing the
    shaders.
  * pname:firstGroup is the index of the first group to retrieve a handle
    for from the
ifdef::VK_KHR_ray_tracing_pipeline[]
slink:VkRayTracingPipelineCreateInfoKHR::pname:pGroups
endif::VK_KHR_ray_tracing_pipeline[]
ifdef::VK_KHR_ray_tracing_pipeline+VK_NV_ray_tracing[or]
ifdef::VK_NV_ray_tracing[]
slink:VkRayTracingPipelineCreateInfoNV::pname:pGroups
endif::VK_NV_ray_tracing[]
    array.
  * pname:groupCount is the number of shader handles to retrieve.
  * pname:dataSize is the size in bytes of the buffer pointed to by
    pname:pData.
  * pname:pData is a pointer to a user-allocated buffer where the results
    will be written.

ifdef::VK_EXT_pipeline_library_group_handles[]
If pname:pipeline was created with ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR
and the <<features-pipelineLibraryGroupHandles,pipelineLibraryGroupHandles>>
feature is enabled applications can: query group handles from that pipeline,
even if the pipeline is a library and is never bound to a command buffer.
These group handles remain bitwise identical for any pname:pipeline which
references the pipeline library.
Group indices are assigned as-if the pipeline was created without
ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR.
endif::VK_EXT_pipeline_library_group_handles[]

.Valid Usage
****
  * [[VUID-vkGetRayTracingShaderGroupHandlesKHR-pipeline-04619]]
    pname:pipeline must: be a ray tracing pipeline
  * [[VUID-vkGetRayTracingShaderGroupHandlesKHR-firstGroup-04050]]
    pname:firstGroup must: be less than the number of shader groups in
    pname:pipeline
  * [[VUID-vkGetRayTracingShaderGroupHandlesKHR-firstGroup-02419]]
    The sum of pname:firstGroup and pname:groupCount must: be less than or
    equal to the number of shader groups in pname:pipeline
  * [[VUID-vkGetRayTracingShaderGroupHandlesKHR-dataSize-02420]]
    pname:dataSize must: be at least
    [eq]#slink:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupHandleSize
    {times} pname:groupCount#
ifdef::VK_KHR_pipeline_library[]
  * [[VUID-vkGetRayTracingShaderGroupHandlesKHR-pipeline-07828]]
ifdef::VK_EXT_pipeline_library_group_handles[]
    If the
    <<features-pipelineLibraryGroupHandles,pipelineLibraryGroupHandles>>
    feature is not enabled,
endif::VK_EXT_pipeline_library_group_handles[]
    pname:pipeline must: not have been created with
    ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR
endif::VK_KHR_pipeline_library[]
****

include::{generated}/validity/protos/vkGetRayTracingShaderGroupHandlesKHR.adoc[]
--

ifdef::VK_KHR_ray_tracing_pipeline[]
[open,refpage='vkGetRayTracingCaptureReplayShaderGroupHandlesKHR',desc='Query opaque capture replay data for pipeline shader group handles',type='protos']
--
:refpage: vkGetRayTracingCaptureReplayShaderGroupHandlesKHR

To query the opaque capture data of shader groups in a ray tracing pipeline,
call:

include::{generated}/api/protos/vkGetRayTracingCaptureReplayShaderGroupHandlesKHR.adoc[]

  * pname:device is the logical device containing the ray tracing pipeline.
  * pname:pipeline is the ray tracing pipeline object containing the
    shaders.
  * pname:firstGroup is the index of the first group to retrieve a handle
    for from the slink:VkRayTracingPipelineCreateInfoKHR::pname:pGroups
    array.
  * pname:groupCount is the number of shader handles to retrieve.
  * pname:dataSize is the size in bytes of the buffer pointed to by
    pname:pData.
  * pname:pData is a pointer to a user-allocated buffer where the results
    will be written.

Once queried, this opaque data can: be provided at pipeline creation time
(in a subsequent execution), using
slink:VkRayTracingShaderGroupCreateInfoKHR::pname:pShaderGroupCaptureReplayHandle,
as described in <<ray-tracing-capture-replay, Ray Tracing Capture Replay>>.

ifdef::VK_EXT_pipeline_library_group_handles[]
If pname:pipeline was created with ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR
and the <<features-pipelineLibraryGroupHandles,pipelineLibraryGroupHandles>>
feature is enabled applications can: query capture replay group handles from
that pipeline.
The capture replay handle remains bitwise identical for any pname:pipeline
which references the pipeline library.
Group indices are assigned as-if the pipeline was created without
ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR.
endif::VK_EXT_pipeline_library_group_handles[]

.Valid Usage
****
  * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-pipeline-04620]]
    pname:pipeline must: be a ray tracing pipeline
  * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-firstGroup-04051]]
    pname:firstGroup must: be less than the number of shader groups in
    pname:pipeline
  * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-firstGroup-03483]]
    The sum of pname:firstGroup and pname:groupCount must: be less than or
    equal to the number of shader groups in pname:pipeline
  * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-dataSize-03484]]
    pname:dataSize must: be at least
    [eq]#slink:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupHandleCaptureReplaySize
    {times} pname:groupCount#
  * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-rayTracingPipelineShaderGroupHandleCaptureReplay-03606]]
    sname:VkPhysicalDeviceRayTracingPipelineFeaturesKHR::pname:rayTracingPipelineShaderGroupHandleCaptureReplay
    must: be enabled to call this function
  * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-pipeline-03607]]
    pname:pipeline must: have been created with a pname:flags that included
    ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
ifdef::VK_KHR_pipeline_library[]
  * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-pipeline-07829]]
ifdef::VK_EXT_pipeline_library_group_handles[]
    If the
    <<features-pipelineLibraryGroupHandles,pipelineLibraryGroupHandles>>
    feature is not enabled,
endif::VK_EXT_pipeline_library_group_handles[]
    pname:pipeline must: not have been created with
    ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR
endif::VK_KHR_pipeline_library[]
****

include::{generated}/validity/protos/vkGetRayTracingCaptureReplayShaderGroupHandlesKHR.adoc[]
--
endif::VK_KHR_ray_tracing_pipeline[]

ifdef::VK_NV_ray_tracing[]
Ray tracing pipelines can: contain more shaders than a graphics or compute
pipeline, so to allow parallel compilation of shaders within a pipeline, an
application can: choose to defer compilation until a later point in time.

[open,refpage='vkCompileDeferredNV',desc='Deferred compilation of shaders',type='protos']
--
:refpage: vkCompileDeferredNV

To compile a deferred shader in a pipeline call:

include::{generated}/api/protos/vkCompileDeferredNV.adoc[]

  * pname:device is the logical device containing the ray tracing pipeline.
  * pname:pipeline is the ray tracing pipeline object containing the
    shaders.
  * pname:shader is the index of the shader to compile.

.Valid Usage
****
  * [[VUID-vkCompileDeferredNV-pipeline-04621]]
    pname:pipeline must: be a ray tracing pipeline
  * [[VUID-vkCompileDeferredNV-pipeline-02237]]
    pname:pipeline must: have been created with
    ename:VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV
  * [[VUID-vkCompileDeferredNV-shader-02238]]
    pname:shader must: not have been called as a deferred compile before
****

include::{generated}/validity/protos/vkCompileDeferredNV.adoc[]
--
endif::VK_NV_ray_tracing[]

ifdef::VK_KHR_ray_tracing_pipeline[]
[open,refpage='vkGetRayTracingShaderGroupStackSizeKHR',desc='Query ray tracing pipeline shader group shader stack size',type='protos']
--
To query the pipeline stack size of shaders in a shader group in the ray
tracing pipeline, call:

include::{generated}/api/protos/vkGetRayTracingShaderGroupStackSizeKHR.adoc[]

  * pname:device is the logical device containing the ray tracing pipeline.
  * pname:pipeline is the ray tracing pipeline object containing the shaders
    groups.
  * pname:group is the index of the shader group to query.
  * pname:groupShader is the type of shader from the group to query.

The return value is the ray tracing pipeline stack size in bytes for the
specified shader as called from the specified shader group.

.Valid Usage
****
  * [[VUID-vkGetRayTracingShaderGroupStackSizeKHR-pipeline-04622]]
    pname:pipeline must: be a ray tracing pipeline
  * [[VUID-vkGetRayTracingShaderGroupStackSizeKHR-group-03608]]
    The value of pname:group must be less than the number of shader groups
    in pname:pipeline
  * [[VUID-vkGetRayTracingShaderGroupStackSizeKHR-groupShader-03609]]
    The shader identified by pname:groupShader in pname:group must: not be
    ename:VK_SHADER_UNUSED_KHR
****

include::{generated}/validity/protos/vkGetRayTracingShaderGroupStackSizeKHR.adoc[]
--

[open,refpage='VkShaderGroupShaderKHR',desc='Shader group shaders',type='enums']
--
Possible values of pname:groupShader in
flink:vkGetRayTracingShaderGroupStackSizeKHR are:

include::{generated}/api/enums/VkShaderGroupShaderKHR.adoc[]

  * ename:VK_SHADER_GROUP_SHADER_GENERAL_KHR uses the shader specified in
    the group with
    slink:VkRayTracingShaderGroupCreateInfoKHR::pname:generalShader
  * ename:VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR uses the shader specified
    in the group with
    slink:VkRayTracingShaderGroupCreateInfoKHR::pname:closestHitShader
  * ename:VK_SHADER_GROUP_SHADER_ANY_HIT_KHR uses the shader specified in
    the group with
    slink:VkRayTracingShaderGroupCreateInfoKHR::pname:anyHitShader
  * ename:VK_SHADER_GROUP_SHADER_INTERSECTION_KHR uses the shader specified
    in the group with
    slink:VkRayTracingShaderGroupCreateInfoKHR::pname:intersectionShader
--

[open,refpage='vkCmdSetRayTracingPipelineStackSizeKHR',desc='Set the stack size dynamically for a ray tracing pipeline',type='protos']
--
:refpage: vkCmdSetRayTracingPipelineStackSizeKHR

To <<pipelines-dynamic-state, dynamically set>> the stack size for a ray
tracing pipeline, call:

include::{generated}/api/protos/vkCmdSetRayTracingPipelineStackSizeKHR.adoc[]

  * pname:commandBuffer is the command buffer into which the command will be
    recorded.
  * pname:pipelineStackSize is the stack size to use for subsequent ray
    tracing trace commands.

This command sets the stack size for subsequent ray tracing commands when
the ray tracing pipeline is created with
ename:VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR set in
slink:VkPipelineDynamicStateCreateInfo::pname:pDynamicStates.
Otherwise, the stack size is computed as described in
<<ray-tracing-pipeline-stack, Ray Tracing Pipeline Stack>>.

.Valid Usage
****
  * [[VUID-vkCmdSetRayTracingPipelineStackSizeKHR-pipelineStackSize-03610]]
    pname:pipelineStackSize must: be large enough for any dynamic execution
    through the shaders in the ray tracing pipeline used by a subsequent
    trace call
****
include::{generated}/validity/protos/vkCmdSetRayTracingPipelineStackSizeKHR.adoc[]
--
endif::VK_KHR_ray_tracing_pipeline[]
endif::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[]


[[pipelines-destruction]]
== Pipeline Destruction

[open,refpage='vkDestroyPipeline',desc='Destroy a pipeline object',type='protos']
--
To destroy a pipeline, call:

include::{generated}/api/protos/vkDestroyPipeline.adoc[]

  * pname:device is the logical device that destroys the pipeline.
  * pname:pipeline is the handle of the pipeline to destroy.
  * pname:pAllocator controls host memory allocation as described in the
    <<memory-allocation, Memory Allocation>> chapter.

.Valid Usage
****
  * [[VUID-vkDestroyPipeline-pipeline-00765]]
    All submitted commands that refer to pname:pipeline must: have completed
    execution
ifndef::VKSC_VERSION_1_0[]
  * [[VUID-vkDestroyPipeline-pipeline-00766]]
    If sname:VkAllocationCallbacks were provided when pname:pipeline was
    created, a compatible set of callbacks must: be provided here
  * [[VUID-vkDestroyPipeline-pipeline-00767]]
    If no sname:VkAllocationCallbacks were provided when pname:pipeline was
    created, pname:pAllocator must: be `NULL`
endif::VKSC_VERSION_1_0[]
****

include::{generated}/validity/protos/vkDestroyPipeline.adoc[]
--


[[pipelines-multiple]]
== Multiple Pipeline Creation

Multiple pipelines can: be created simultaneously by passing an array of
slink:VkGraphicsPipelineCreateInfo,
ifdef::VK_KHR_ray_tracing_pipeline[slink:VkRayTracingPipelineCreateInfoKHR,]
ifdef::VK_NV_ray_tracing[slink:VkRayTracingPipelineCreateInfoNV,]
or slink:VkComputePipelineCreateInfo structures into the
flink:vkCreateGraphicsPipelines,
ifdef::VK_KHR_ray_tracing_pipeline[flink:vkCreateRayTracingPipelinesKHR,]
ifdef::VK_NV_ray_tracing[flink:vkCreateRayTracingPipelinesNV,]
and flink:vkCreateComputePipelines commands, respectively.
Applications can: group together similar pipelines to be created in a single
call, and implementations are encouraged to look for reuse opportunities
within a group-create.

When an application attempts to create many pipelines in a single command,
it is possible that some subset may: fail creation.
In that case, the corresponding entries in the pname:pPipelines output array
will be filled with dlink:VK_NULL_HANDLE values.
If any pipeline fails creation despite valid arguments (for example, due to
out of memory errors), the elink:VkResult code returned by
ftext:vkCreate*Pipelines will indicate why.
The implementation will attempt to create all pipelines, and only return
dlink:VK_NULL_HANDLE values for those that actually failed.

ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
If creation fails for a pipeline that had
ename:VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT set, pipelines at an
index in the pname:pPipelines array greater than or equal to that of the
failing pipeline must: be set to dlink:VK_NULL_HANDLE.
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]

If multiple pipelines fail to be created, the elink:VkResult must: be the
return value of any of the pipelines which did not return ename:VK_SUCCESS.


[[pipelines-pipeline-derivatives]]
== Pipeline Derivatives


A pipeline derivative is a child pipeline created from a parent pipeline,
where the child and parent are expected to have much commonality.

ifndef::VKSC_VERSION_1_0[]
The goal of derivative pipelines is that they be cheaper to create using the
parent as a starting point, and that it be more efficient (on either host or
device) to switch/bind between children of the same parent.

A derivative pipeline is created by setting the
ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag in the
stext:Vk*PipelineCreateInfo structure.
If this is set, then exactly one of pname:basePipelineHandle or
pname:basePipelineIndex members of the structure must: have a valid
handle/index, and specifies the parent pipeline.
If pname:basePipelineHandle is used, the parent pipeline must: have already
been created.
If pname:basePipelineIndex is used, then the parent is being created in the
same command.
dlink:VK_NULL_HANDLE acts as the invalid handle for
pname:basePipelineHandle, and -1 is the invalid index for
pname:basePipelineIndex.
If pname:basePipelineIndex is used, the base pipeline must: appear earlier
in the array.
The base pipeline must: have been created with the
ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set.
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
Pipeline derivatives are not supported in Vulkan SC due to the use of
read-only offline generated pipeline caches <<SCID-8>>.
endif::VKSC_VERSION_1_0[]

[[pipelines-cache]]
== Pipeline Cache

[open,refpage='VkPipelineCache',desc='Opaque handle to a pipeline cache object',type='handles']
--
ifndef::VKSC_VERSION_1_0[]
Pipeline cache objects allow the result of pipeline construction to be
reused between pipelines and between runs of an application.
Reuse between pipelines is achieved by passing the same pipeline cache
object when creating multiple related pipelines.
Reuse across runs of an application is achieved by retrieving pipeline cache
contents in one run of an application, saving the contents, and using them
to preinitialize a pipeline cache on a subsequent run.
The contents of the pipeline cache objects are managed by the
implementation.
Applications can: manage the host memory consumed by a pipeline cache object
and control the amount of data retrieved from a pipeline cache object.
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
Pipeline cache objects allow the application to load multiple binary
pipeline objects generated by an offline cache creation tool into pipeline
cache objects.
The cache can then be used during pipeline creation to load offline pipeline
data.
endif::VKSC_VERSION_1_0[]

Pipeline cache objects are represented by sname:VkPipelineCache handles:

include::{generated}/api/handles/VkPipelineCache.adoc[]
--


[[pipelines-cache-create]]
=== Creating a Pipeline Cache

[open,refpage='vkCreatePipelineCache',desc='Creates a new pipeline cache',type='protos']
--
:refpage: vkCreatePipelineCache
:objectnameplural: pipeline caches
:objectnamecamelcase: pipelineCache
:objectcount: 1

To create pipeline cache objects, call:

include::{generated}/api/protos/vkCreatePipelineCache.adoc[]

  * pname:device is the logical device that creates the pipeline cache
    object.
  * pname:pCreateInfo is a pointer to a slink:VkPipelineCacheCreateInfo
    structure containing initial parameters for the pipeline cache object.
  * pname:pAllocator controls host memory allocation as described in the
    <<memory-allocation, Memory Allocation>> chapter.
  * pname:pPipelineCache is a pointer to a slink:VkPipelineCache handle in
    which the resulting pipeline cache object is returned.

ifndef::VKSC_VERSION_1_0[]
[NOTE]
.Note
====
Applications can: track and manage the total host memory size of a pipeline
cache object using the pname:pAllocator.
Applications can: limit the amount of data retrieved from a pipeline cache
object in fname:vkGetPipelineCacheData.
Implementations should: not internally limit the total number of entries
added to a pipeline cache object or the total host memory consumed.
====
endif::VKSC_VERSION_1_0[]

ifdef::VKSC_VERSION_1_0[]
If the pipeline cache data pointed to by
slink:VkPipelineCacheCreateInfo::pname:pInitialData is not compatible with
the device, pipeline cache creation will fail and
ename:VK_ERROR_INVALID_PIPELINE_CACHE_DATA will be returned.
endif::VKSC_VERSION_1_0[]

Once created, a pipeline cache can: be passed to the
flink:vkCreateGraphicsPipelines
ifdef::VK_KHR_ray_tracing_pipeline[flink:vkCreateRayTracingPipelinesKHR,]
ifdef::VK_NV_ray_tracing[flink:vkCreateRayTracingPipelinesNV,]
and flink:vkCreateComputePipelines commands.
ifndef::VKSC_VERSION_1_0[]
If the pipeline cache passed into these commands is not
dlink:VK_NULL_HANDLE, the implementation will query it for possible reuse
opportunities and update it with new content.
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
The pipeline cache passed into these commands will be queried by the
implementation for matching pipelines on pipeline creation.
After the cache is created, its contents cannot be updated.
endif::VKSC_VERSION_1_0[]
The use of the pipeline cache object in these commands is internally
synchronized, and the same pipeline cache object can: be used in multiple
threads simultaneously.

ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
If pname:flags of pname:pCreateInfo includes
ename:VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, all commands
that modify the returned pipeline cache object must: be
<<fundamentals-threadingbehavior,externally synchronized>>.
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]

ifndef::VKSC_VERSION_1_0[]
[NOTE]
.Note
====
Implementations should: make every effort to limit any critical sections to
the actual accesses to the cache, which is expected to be significantly
shorter than the duration of the ftext:vkCreate*Pipelines commands.
====
endif::VKSC_VERSION_1_0[]

include::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[]

ifdef::VKSC_VERSION_1_0[]
.Valid Usage
****
  * [[VUID-vkCreatePipelineCache-pCreateInfo-05045]]
    The contents of the structure pointed to by pname:pCreateInfo and the
    data pointed to by pname:pCreateInfo->pInitialData must: be the same as
    specified in one of the
    slink:VkDeviceObjectReservationCreateInfo::pname:pPipelineCacheCreateInfos
    structures when the device was created
include::{chapters}/commonvalidity/memory_reservation_request_count_common.adoc[]
****
endif::VKSC_VERSION_1_0[]

include::{generated}/validity/protos/vkCreatePipelineCache.adoc[]
--

[open,refpage='VkPipelineCacheCreateInfo',desc='Structure specifying parameters of a newly created pipeline cache',type='structs']
--
The sname:VkPipelineCacheCreateInfo structure is defined as:

include::{generated}/api/structs/VkPipelineCacheCreateInfo.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[]
  * pname:flags is a bitmask of elink:VkPipelineCacheCreateFlagBits
    specifying the behavior of the pipeline cache.
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[]
ifndef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[]
  * pname:flags is reserved for future use.
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[]
  * pname:initialDataSize is the number of bytes in pname:pInitialData.
ifndef::VKSC_VERSION_1_0[]
    If pname:initialDataSize is zero, the pipeline cache will initially be
    empty.
  * pname:pInitialData is a pointer to previously retrieved pipeline cache
    data.
    If the pipeline cache data is incompatible (as defined below) with the
    device, the pipeline cache will be initially empty.
    If pname:initialDataSize is zero, pname:pInitialData is ignored.
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
  * pname:pInitialData is a pointer to pipeline cache data that has been
    generated offline.
    If the pipeline cache data is incompatible (as defined below) with the
    device, ename:VK_ERROR_INVALID_PIPELINE_CACHE_DATA is returned.
ifdef::hidden[]
// tag::scdeviation[]
  * slink:VkPipelineCacheCreateInfo::pname:pInitialData must: point to a
    valid pipeline cache that has been generated offline <<SCID-1>>,
    <<SCID-8>>.
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

.Valid Usage
****
ifndef::VKSC_VERSION_1_0[]
  * [[VUID-VkPipelineCacheCreateInfo-initialDataSize-00768]]
    If pname:initialDataSize is not `0`, it must: be equal to the size of
    pname:pInitialData, as returned by fname:vkGetPipelineCacheData when
    pname:pInitialData was originally retrieved
  * [[VUID-VkPipelineCacheCreateInfo-initialDataSize-00769]]
    If pname:initialDataSize is not `0`, pname:pInitialData must: have been
    retrieved from a previous call to fname:vkGetPipelineCacheData
endif::VKSC_VERSION_1_0[]
ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
  * [[VUID-VkPipelineCacheCreateInfo-pipelineCreationCacheControl-02892]]
    If the <<features-pipelineCreationCacheControl,
    pname:pipelineCreationCacheControl>> feature is not enabled, pname:flags
    must: not include
    ename:VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
ifdef::VKSC_VERSION_1_0[]
  * [[VUID-VkPipelineCacheCreateInfo-flags-05043]]
    pname:flags must: include ename:VK_PIPELINE_CACHE_CREATE_READ_ONLY_BIT
  * [[VUID-VkPipelineCacheCreateInfo-flags-05044]]
    pname:flags must: include
    ename:VK_PIPELINE_CACHE_CREATE_USE_APPLICATION_STORAGE_BIT
  * [[VUID-VkPipelineCacheCreateInfo-pInitialData-05139]]
    The pipeline cache data pointed to by pname:pInitialData must: not
    contain any pipelines with duplicate pipeline identifiers.
endif::VKSC_VERSION_1_0[]
****
ifdef::VKSC_VERSION_1_0[]
ifdef::hidden[]
// tag::scdeviation[]
  * slink:VkPipelineCacheCreateInfo::pname:initialDataSize must: not be `0`
    <<SCID-1>>, <<SCID-8>>.
  * slink:VkPipelineCacheCreateInfo::pname:pInitialData must: not be `NULL`
    <<SCID-1>>, <<SCID-8>>.
  * slink:VkPipelineCacheCreateInfo::pname:flags must: include
    ename:VK_PIPELINE_CACHE_CREATE_READ_ONLY_BIT <<SCID-1>>, <<SCID-8>>.
  * slink:VkPipelineCacheCreateInfo::pname:flags must: include
    ename:VK_PIPELINE_CACHE_CREATE_USE_APPLICATION_STORAGE_BIT <<SCID-2>>.
  * The contents of slink:VkPipelineCacheCreateInfo, including the data
    pointed to by slink:VkPipelineCacheCreateInfo::pname:pInitialData,
    passed to flink:vkCreatePipelineCache must: be the same as specified in
    one of the
    slink:VkDeviceObjectReservationCreateInfo::pname:pPipelineCacheCreateInfos
    structures when the device was created <<SCID-1>>.
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

include::{generated}/validity/structs/VkPipelineCacheCreateInfo.adoc[]
--

[open,refpage='VkPipelineCacheCreateFlags', desc='Bitmask of VkPipelineCreateFlagBits', type='flags']
--
include::{generated}/api/flags/VkPipelineCacheCreateFlags.adoc[]

ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[]
tname:VkPipelineCacheCreateFlags is a bitmask type for setting a mask of
zero or more elink:VkPipelineCacheCreateFlagBits.
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[]
ifndef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[]
tname:VkPipelineCacheCreateFlags is a bitmask type for setting a mask, but
is currently reserved for future use.
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[]
--

ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[]
[open,refpage='VkPipelineCacheCreateFlagBits',desc='Bitmask specifying the behavior of the pipeline cache',type='enums']
--
Bits which can: be set in slink:VkPipelineCacheCreateInfo::pname:flags,
specifying behavior of the pipeline cache, are:

include::{generated}/api/enums/VkPipelineCacheCreateFlagBits.adoc[]

ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
  * ename:VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT specifies
    that all commands that modify the created slink:VkPipelineCache will be
    <<fundamentals-threadingbehavior,externally synchronized>>.
    When set, the implementation may: skip any unnecessary processing needed
    to support simultaneous modification from multiple threads where
    allowed.
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[]
ifdef::VKSC_VERSION_1_0[]
  * ename:VK_PIPELINE_CACHE_CREATE_READ_ONLY_BIT specifies that the new
    pipeline cache will be read-only.
  * ename:VK_PIPELINE_CACHE_CREATE_USE_APPLICATION_STORAGE_BIT specifies
    that the application will maintain the contents of the memory pointed to
    by pname:pInitialData for the lifetime of the pipeline cache object
    created, avoiding the need for the implementation to make a copy of the
    data.
    The memory pointed to by pname:pInitialData can: be modified or released
    by the application only after any pipeline cache objects created using
    it have been destroyed.
ifdef::hidden[]
// tag::scaddition[]
  * extending elink:VkPipelineCacheCreateFlagBits
  ** ename:VK_PIPELINE_CACHE_CREATE_READ_ONLY_BIT <<SCID-1>>, <<SCID-8>>
  ** ename:VK_PIPELINE_CACHE_CREATE_USE_APPLICATION_STORAGE_BIT <<SCID-2>>
// end::scaddition[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]
--
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[]

ifdef::VKSC_VERSION_1_0[]
ifdef::hidden[]
// tag::scremoved[]
  * fname:vkMergePipelineCaches, fname:vkGetPipelineCacheData <<SCID-1>>,
    <<SCID-8>>
// end::scremoved[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]
ifndef::VKSC_VERSION_1_0[]


[[pipelines-cache-merge]]
=== Merging Pipeline Caches

[open,refpage='vkMergePipelineCaches',desc='Combine the data stores of pipeline caches',type='protos']
--
Pipeline cache objects can: be merged using the command:

include::{generated}/api/protos/vkMergePipelineCaches.adoc[]

  * pname:device is the logical device that owns the pipeline cache objects.
  * pname:dstCache is the handle of the pipeline cache to merge results
    into.
  * pname:srcCacheCount is the length of the pname:pSrcCaches array.
  * pname:pSrcCaches is a pointer to an array of pipeline cache handles,
    which will be merged into pname:dstCache.
    The previous contents of pname:dstCache are included after the merge.

[NOTE]
.Note
====
The details of the merge operation are implementation-dependent, but
implementations should: merge the contents of the specified pipelines and
prune duplicate entries.
====

.Valid Usage
****
  * [[VUID-vkMergePipelineCaches-dstCache-00770]]
    pname:dstCache must: not appear in the list of source caches
****

include::{generated}/validity/protos/vkMergePipelineCaches.adoc[]
--
endif::VKSC_VERSION_1_0[]
ifndef::VKSC_VERSION_1_0[]


[[pipelines-cache-retrieval]]
=== Retrieving Pipeline Cache Data

[open,refpage='vkGetPipelineCacheData',desc='Get the data store from a pipeline cache',type='protos']
--
Data can: be retrieved from a pipeline cache object using the command:

include::{generated}/api/protos/vkGetPipelineCacheData.adoc[]

  * pname:device is the logical device that owns the pipeline cache.
  * pname:pipelineCache is the pipeline cache to retrieve data from.
  * pname:pDataSize is a pointer to a code:size_t value related to the
    amount of data in the pipeline cache, as described below.
  * pname:pData is either `NULL` or a pointer to a buffer.

If pname:pData is `NULL`, then the maximum size of the data that can: be
retrieved from the pipeline cache, in bytes, is returned in pname:pDataSize.
Otherwise, pname:pDataSize must: point to a variable set by the user to the
size of the buffer, in bytes, pointed to by pname:pData, and on return the
variable is overwritten with the amount of data actually written to
pname:pData.
If pname:pDataSize is less than the maximum size that can: be retrieved by
the pipeline cache, at most pname:pDataSize bytes will be written to
pname:pData, and ename:VK_INCOMPLETE will be returned instead of
ename:VK_SUCCESS, to indicate that not all of the pipeline cache was
returned.

Any data written to pname:pData is valid and can: be provided as the
pname:pInitialData member of the slink:VkPipelineCacheCreateInfo structure
passed to fname:vkCreatePipelineCache.

Two calls to fname:vkGetPipelineCacheData with the same parameters must:
retrieve the same data unless a command that modifies the contents of the
cache is called between them.

The initial bytes written to pname:pData must: be a header as described in
the <<pipelines-cache-header, Pipeline Cache Header>> section.

If pname:pDataSize is less than what is necessary to store this header,
nothing will be written to pname:pData and zero will be written to
pname:pDataSize.

include::{generated}/validity/protos/vkGetPipelineCacheData.adoc[]
--
endif::VKSC_VERSION_1_0[]


[[pipelines-cache-header]]
=== Pipeline Cache Header

ifdef::VKSC_VERSION_1_0[]
Applications must: load data from <<pipelines-offline-compilation,offline
compiled>> pipeline caches into pipeline cache objects.
The results of pipeline compilations may: depend on the vendor ID, device
ID, driver version, and other details of the target device.
To allow detection of pipeline cache data that is incompatible with the
device, the pipeline cache data must: begin with a valid pipeline cache
header.
endif::VKSC_VERSION_1_0[]

ifndef::VKSC_VERSION_1_0[]
Applications can: store the data retrieved from the pipeline cache, and use
these data, possibly in a future run of the application, to populate new
pipeline cache objects.
The results of pipeline compiles, however, may: depend on the vendor ID,
device ID, driver version, and other details of the device.
To enable applications to detect when previously retrieved data is
incompatible with the device, the pipeline cache data must: begin with a
valid pipeline cache header.
endif::VKSC_VERSION_1_0[]

[NOTE]
.Note
====
Structures described in this section are not part of the Vulkan API and are
only used to describe the representation of data elements in pipeline cache
data.
Accordingly, the valid usage clauses defined for structures defined in this
section do not define valid usage conditions for APIs accepting pipeline
cache data as input, as providing invalid pipeline cache data as input to
any Vulkan API commands will result
ifndef::VKSC_VERSION_1_0[]
in the provided pipeline cache data being ignored.
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
in the runtime error ename:VK_ERROR_INVALID_PIPELINE_CACHE_DATA.
endif::VKSC_VERSION_1_0[]
====

[open,refpage='VkPipelineCacheHeaderVersionOne',desc='Structure describing the layout of the pipeline cache header',type='structs']
--
Version one of the pipeline cache header is defined as:

include::{generated}/api/structs/VkPipelineCacheHeaderVersionOne.adoc[]

  * pname:headerSize is the length in bytes of the pipeline cache header.
  * pname:headerVersion is a elink:VkPipelineCacheHeaderVersion value
    specifying the version of the header.
    A consumer of the pipeline cache should: use the cache version to
    interpret the remainder of the cache header.
  * pname:vendorID is the sname:VkPhysicalDeviceProperties::pname:vendorID
    of the implementation.
  * pname:deviceID is the sname:VkPhysicalDeviceProperties::pname:deviceID
    of the implementation.
  * pname:pipelineCacheUUID is the
    sname:VkPhysicalDeviceProperties::pname:pipelineCacheUUID of the
    implementation.

Unlike most structures declared by the Vulkan API, all fields of this
structure are written with the least significant byte first, regardless of
host byte-order.

The C language specification does not define the packing of structure
members.
This layout assumes tight structure member packing, with members laid out in
the order listed in the structure, and the intended size of the structure is
32 bytes.
If a compiler produces code that diverges from that pattern, applications
must: employ another method to set values at the correct offsets.

.Valid Usage
****
ifndef::VKSC_VERSION_1_0[]
  * [[VUID-VkPipelineCacheHeaderVersionOne-headerSize-04967]]
    pname:headerSize must: be 32
  * [[VUID-VkPipelineCacheHeaderVersionOne-headerVersion-04968]]
    pname:headerVersion must: be ename:VK_PIPELINE_CACHE_HEADER_VERSION_ONE
endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
  * [[VUID-VkPipelineCacheHeaderVersionOne-headerSize-05075]]
    pname:headerSize must: be 56
  * [[VUID-VkPipelineCacheHeaderVersionOne-headerVersion-05076]]
    pname:headerVersion must: be
    ename:VK_PIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE
endif::VKSC_VERSION_1_0[]
  * [[VUID-VkPipelineCacheHeaderVersionOne-headerSize-08990]]
    pname:headerSize must: not exceed the size of the pipeline cache
****
ifdef::VKSC_VERSION_1_0[]
ifdef::hidden[]
// tag::scdeviation[]
  * slink:VkPipelineCacheHeaderVersionOne::pname:headerSize must: be 56
    <<SCID-1>>.
  * slink:VkPipelineCacheHeaderVersionOne::pname:headerVersion must: be
    ename:VK_PIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE <<SCID-1>>.
// end::scdeviation[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]

include::{generated}/validity/structs/VkPipelineCacheHeaderVersionOne.adoc[]
--

[open,refpage='VkPipelineCacheHeaderVersion',desc='Encode pipeline cache version',type='enums',xrefs='vkCreatePipelineCache vkGetPipelineCacheData']
--
Possible values of the pname:headerVersion value of the pipeline cache
header are:

include::{generated}/api/enums/VkPipelineCacheHeaderVersion.adoc[]

  * ename:VK_PIPELINE_CACHE_HEADER_VERSION_ONE specifies version one of the
    pipeline cache, described by slink:VkPipelineCacheHeaderVersionOne.
ifdef::VKSC_VERSION_1_0[]
  * ename:VK_PIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE specifies
    version one of the pipeline cache for Vulkan SC, described by
    slink:VkPipelineCacheHeaderVersionSafetyCriticalOne.
endif::VKSC_VERSION_1_0[]
--

ifdef::VKSC_VERSION_1_0[]
[open,refpage='VkPipelineCacheHeaderVersionSafetyCriticalOne',desc='Structure describing the layout of the pipeline cache header for safety critical',type='structs']
--
Version one of the pipeline cache header for Vulkan SC is defined as:

include::{generated}/api/structs/VkPipelineCacheHeaderVersionSafetyCriticalOne.adoc[]

  * pname:headerVersionOne is a slink:VkPipelineCacheHeaderVersionOne
    structure.
  * pname:validationVersion is a elink:VkPipelineCacheValidationVersion enum
    value specifying the version of any validation information that is
    included in this pipeline cache.
  * pname:implementationData is 4 bytes of padding to ensure structure
    members are consistently aligned on all platforms.
    The contents of this field may: be used for implementation-specific
    information.
  * pname:pipelineIndexCount is the number of entries contained in the
    pipeline cache index.
  * pname:pipelineIndexStride is the number of bytes between consecutive
    pipeline cache index entries.
  * pname:pipelineIndexOffset is the offset in bytes from the beginning of
    the pipeline cache header to the pipeline cache index.

The <<pipelines-cache-index, pipeline cache index>> consists of
pname:pipelineIndexCount slink:VkPipelineCacheSafetyCriticalIndexEntry
structures containing an index of all the pipelines in this cache.
The pipeline cache index is located starting at pname:pipelineIndexOffset
bytes into the cache and the location of pipeline code:i is calculated as:
[eq]#pname:pipelineIndexOffset + code:i {times} pname:pipelineIndexStride#.
The slink:VkPipelineCacheSafetyCriticalIndexEntry structures may: not be
tightly packed, enabling additional implementation-specific data to be
stored with each entry, or for future extensibility.

[NOTE]
.Note
====
Because the pipeline cache index is keyed by pipeline identifier,
applications and offline compilers must ensure that there are no pipelines
with identical pipeline indentifiers in the same pipeline cache.
====

Unlike most structures declared by the Vulkan API, all fields of this
structure are written with the least significant byte first, regardless of
host byte-order.

The C language specification does not define the packing of structure
members.
This layout assumes tight structure member packing, with members laid out in
the order listed in the structure, and the intended size of the structure is
56 bytes.
If a compiler produces code that diverges from that pattern, applications
must: employ another method to set values at the correct offsets.

.Valid Usage
****
  * [[VUID-VkPipelineCacheHeaderVersionSafetyCriticalOne-validationVersion-05077]]
    pname:validationVersion must: be
    ename:VK_PIPELINE_CACHE_VALIDATION_VERSION_SAFETY_CRITICAL_ONE
  * [[VUID-VkPipelineCacheHeaderVersionSafetyCriticalOne-pipelineIndexStride-05078]]
    pname:pipelineIndexStride must: be greater than or equal to 56 (the size
    of the slink:VkPipelineCacheSafetyCriticalIndexEntry structure)
  * [[VUID-VkPipelineCacheHeaderVersionSafetyCriticalOne-pipelineIndexOffset-05079]]
    [eq]#pname:pipelineIndexOffset + pname:pipelineIndexCount {times}
    pname:pipelineIndexStride# must: not exceed the size of the pipeline
    cache
****

include::{generated}/validity/structs/VkPipelineCacheHeaderVersionSafetyCriticalOne.adoc[]
--

[open,refpage='VkPipelineCacheValidationVersion',desc='Encode pipeline cache validation version',type='enums']
--
The elink:VkPipelineCacheValidationVersion enumeration determines the
contents of the pipeline cache validation information.
Possible values are:

include::{generated}/api/enums/VkPipelineCacheValidationVersion.adoc[]

  * ename:VK_PIPELINE_CACHE_VALIDATION_VERSION_SAFETY_CRITICAL_ONE specifies
    version one of the pipeline cache validation information for Vulkan SC.
--

[[pipelines-cache-index]]
[open,refpage='VkPipelineCacheSafetyCriticalIndexEntry',desc='Structure describing the pipeline cache index entry',type='structs']
--
Each pipeline cache index entry consists of a
sname:VkPipelineCacheSafetyCriticalIndexEntry structure:

include::{generated}/api/structs/VkPipelineCacheSafetyCriticalIndexEntry.adoc[]

  * pname:pipelineIdentifier is the <<pipelines-identifier, pipeline
    identifier>> indicating which pipeline the information is associated
    with.
  * pname:pipelineMemorySize is the number of bytes of pipeline memory
    required for this pipeline.
    This is the minimum value that can: be successfully used for
    slink:VkPipelineOfflineCreateInfo::pname:poolEntrySize when this
    pipeline is used.
  * pname:jsonSize is the size in bytes of the pipeline JSON data
    representing the pipeline state for this pipeline.
    This value may: be zero, indicating the JSON data is not present in the
    pipeline cache for this pipeline.
  * pname:jsonOffset is the offset in bytes from the beginning of the
    pipeline cache header to the pipeline JSON data for this pipeline.
    This value must: be zero if the JSON data is not present in the pipeline
    cache for this pipeline.
  * pname:stageIndexCount is the number of entries in the pipeline cache
    stage validation index for this pipeline.
    This value may: be zero, indicating that no stage validation information
    is present in the pipeline cache for this pipeline.
  * pname:stageIndexStride is the number of bytes between consecutive stage
    validation index entries.
  * pname:stageIndexOffset is the offset in bytes from the beginning of the
    pipeline cache header to the <<pipelines-cache-stage-validation-index,
    stage validation index>> for this pipeline.
    This value must: be zero if no stage validation information is present
    for this pipeline.

The JSON data and the stage validation index are optionally: included in the
pipeline cache index entry.
They are only intended to be used for validation and debugging.
If present they must: include both the JSON data and the corresponding
SPIR-V modules that were used by the offline compiler to compile the
pipeline cache entry.

The data at pname:jsonOffset consists of a byte stream of pname:jsonSize
bytes of UTF-8 encoded JSON that was used by the
<<pipelines-offline-compilation, offline pipeline compiler>> to create this
pipeline cache entry.

The <<pipelines-cache-stage-validation-index, stage validation index>>
consists of pname:stageIndexCount
slink:VkPipelineCacheStageValidationIndexEntry structures which provide the
SPIR-V modules used by this pipeline and these are provided in the same
order as provided to the slink:VkPipelineShaderStageCreateInfo structure(s)
in the stext:Vk*PipelineCreateInfo structure for this pipeline.
The stage validation index is located at pname:stageIndexOffset bytes into
the cache and the location of stage code:i is calculated as:
[eq]#pname:stageIndexOffset {plus} code:i {times} pname:stageIndexStride#.
The slink:VkPipelineCacheStageValidationIndexEntry structures may: not be
tightly packed, enabling additional implementation-specific data to be
stored with each entry, or for future extensibility.

Unlike most structures declared by the Vulkan API, all fields of this
structure are written with the least significant byte first, regardless of
host byte-order.

The C language specification does not define the packing of structure
members.
This layout assumes tight structure member packing, with members laid out in
the order listed in the structure, and the intended size of the structure is
56 bytes.
If a compiler produces code that diverges from that pattern, applications
must: employ another method to set values at the correct offsets.

.Valid Usage
****
  * [[VUID-VkPipelineCacheSafetyCriticalIndexEntry-jsonSize-05080]]
    If pname:jsonSize is 0, pname:jsonOffset must: be 0
  * [[VUID-VkPipelineCacheSafetyCriticalIndexEntry-jsonSize-05081]]
    If pname:jsonSize is 0, pname:stageIndexCount must: be 0
  * [[VUID-VkPipelineCacheSafetyCriticalIndexEntry-jsonSize-08991]]
    If pname:jsonSize is not 0, [eq]#pname:jsonOffset {plus} pname:jsonSize#
    must: not exceed the size of the pipeline cache
  * [[VUID-VkPipelineCacheSafetyCriticalIndexEntry-stageIndexCount-05082]]
    If pname:stageIndexCount is 0, pname:stageIndexOffset and
    pname:stageIndexStride must: be 0
  * [[VUID-VkPipelineCacheSafetyCriticalIndexEntry-stageIndexCount-05083]]
    If pname:stageIndexCount is not 0, pname:stageIndexStride must: be
    greater than or equal to 16 (the size of the
    slink:VkPipelineCacheStageValidationIndexEntry structure)
  * [[VUID-VkPipelineCacheSafetyCriticalIndexEntry-stageIndexCount-05084]]
    If pname:stageIndexCount is not 0, [eq]#pname:stageIndexOffset {plus}
    pname:stageIndexCount {times} pname:stageIndexStride# must: not exceed
    the size of the pipeline cache
****

include::{generated}/validity/structs/VkPipelineCacheSafetyCriticalIndexEntry.adoc[]
--

[[pipelines-cache-stage-validation-index]]
[open,refpage='VkPipelineCacheStageValidationIndexEntry',desc='Structure describing the pipeline cache stage validation index',type='structs']
--
Each pipeline cache stage validation index entry consists of a
sname:VkPipelineCacheStageValidationIndexEntry structure:

include::{generated}/api/structs/VkPipelineCacheStageValidationIndexEntry.adoc[]

  * pname:codeSize is the size in bytes of the SPIR-V module for this
    pipeline stage.
  * pname:codeOffset is the offset in bytes from the beginning of the
    pipeline cache header to the SPIR-V module for this pipeline stage.

The data at pname:codeOffset consists of pname:codeSize bytes of SPIR-V
module as described in <<spirvenv, Appendix A>> that was used by the
<<pipelines-offline-compilation, offline pipeline compiler>> for this shader
stage when creating this pipeline cache entry.

Unlike most structures declared by the Vulkan API, all fields of this
structure are written with the least significant byte first, regardless of
host byte-order.

The C language specification does not define the packing of structure
members.
This layout assumes tight structure member packing, with members laid out in
the order listed in the structure, and the intended size of the structure is
16 bytes.
If a compiler produces code that diverges from that pattern, applications
must: employ another method to set values at the correct offsets.

.Valid Usage
****
  * [[VUID-VkPipelineCacheStageValidationIndexEntry-codeSize-05085]]
    pname:codeSize must: be greater than 0
  * [[VUID-VkPipelineCacheStageValidationIndexEntry-codeSize-05086]]
    pname:codeSize must: be a multiple of 4
  * [[VUID-VkPipelineCacheStageValidationIndexEntry-codeOffset-05087]]
    [eq]#pname:codeOffset {plus} pname:codeSize# must: not exceed the size
    of the pipeline cache
****

include::{generated}/validity/structs/VkPipelineCacheStageValidationIndexEntry.adoc[]
--

ifdef::hidden[]
// tag::scaddition[]
  * extending elink:VkPipelineCacheHeaderVersion
  ** ename:VK_PIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE <<SCID-1>>,
     <<SCID-8>>
  * slink:VkPipelineCacheHeaderVersionSafetyCriticalOne <<SCID-1>>,
    <<SCID-8>>
  * elink:VkPipelineCacheValidationVersion <<SCID-1>>, <<SCID-8>>
  * slink:VkPipelineCacheSafetyCriticalIndexEntry <<SCID-1>>, <<SCID-8>>
  * slink:VkPipelineCacheStageValidationIndexEntry<<SCID-1>>, <<SCID-8>>
// end::scaddition[]
endif::hidden[]
endif::VKSC_VERSION_1_0[]


[[pipelines-cache-destroy]]
=== Destroying a Pipeline Cache

[open,refpage='vkDestroyPipelineCache',desc='Destroy a pipeline cache object',type='protos']
--
To destroy a pipeline cache, call:

include::{generated}/api/protos/vkDestroyPipelineCache.adoc[]

  * pname:device is the logical device that destroys the pipeline cache
    object.
  * pname:pipelineCache is the handle of the pipeline cache to destroy.
  * pname:pAllocator controls host memory allocation as described in the
    <<memory-allocation, Memory Allocation>> chapter.

ifndef::VKSC_VERSION_1_0[]
.Valid Usage
****
  * [[VUID-vkDestroyPipelineCache-pipelineCache-00771]]
    If sname:VkAllocationCallbacks were provided when pname:pipelineCache
    was created, a compatible set of callbacks must: be provided here
  * [[VUID-vkDestroyPipelineCache-pipelineCache-00772]]
    If no sname:VkAllocationCallbacks were provided when pname:pipelineCache
    was created, pname:pAllocator must: be `NULL`
****
endif::VKSC_VERSION_1_0[]

include::{generated}/validity/protos/vkDestroyPipelineCache.adoc[]
--

ifdef::VKSC_VERSION_1_0[]
[[pipelines-offline-compilation]]
== Offline Pipeline Compilation

In Vulkan SC, the pipeline compilation process occurs offline <<SCID-8>>.

The <<shader-modules,SPIR-V shader module>> and pipeline state are supplied
to an offline pipeline cache compiler which creates a pipeline cache entry
for the pipeline.
The set of pipeline cache entries are combined offline into one or more
<<pipelines-cache, pipeline caches>>.
At application run-time, the offline generated pipeline cache is provided to
device creation as part of the slink:VkDeviceObjectReservationCreateInfo
structure and then loaded into a slink:VkPipelineCache object by the
application.
The device, pipeline, and pipeline cache creation functions can: extract
implementation-specific information from the pipeline cache.
The specific pipeline to be loaded from the cache is specified at pipeline
creation time using a <<pipelines-identifier,pipeline identifier>>.
The pipeline state that is provided at runtime to pipeline creation must:
match the state that was specified to the offline pipeline cache compiler
when the pipeline cache entry was created offline (with the exception of the
slink:VkPipelineShaderStageCreateInfo structure).

In order to assist with the specification of pipeline state for the offline
pipeline cache compiler, Khronos has defined a _pipeline JSON schema_ to
represent the pipeline state required to compile a SPIR-V module to
device-specific machine code and a set of utilities to help with reading and
writing of the JSON files.
See https://github.com/KhronosGroup/VulkanSC-Docs/wiki/JSON-schema for more
information.

[[pipelines-memory-reservation]]
== Pipeline Memory Reservation

Pipeline memory is allocated from a pool that is reserved at device creation
time.
The offline pipeline cache compiler writes the pipeline memory size
requirements for each pipeline into the pipeline's
slink:VkPipelineCacheSafetyCriticalIndexEntry::pname:pipelineMemorySize
entry in the <<pipelines-cache-index,pipeline cache index>>.
The offline pipeline cache compiler may: also report it separately.
The elements of
slink:VkDeviceObjectReservationCreateInfo::pname:pPipelinePoolSizes are
requests for pname:poolEntryCount pool entries each of pool size
pname:poolEntrySize, and any pipeline with a
slink:VkPipelineCacheSafetyCriticalIndexEntry::pname:pipelineMemorySize less
than or equal to slink:VkPipelineOfflineCreateInfo::pname:poolEntrySize can:
be placed in one of those pool entries.
The application should: request a set of pool sizes that best suits its
anticipated worst-case usage.

On implementations where
slink:VkPhysicalDeviceVulkanSC10Properties::pname:recyclePipelineMemory is
ename:VK_FALSE, the memory for the pipeline pool is not recycled when a
pipeline is destroyed, and once an entry has been used it cannot: be reused.
On implementations where
slink:VkPhysicalDeviceVulkanSC10Properties::pname:recyclePipelineMemory is
ename:VK_TRUE, the memory for the pipeline pool is recycled when a pipeline
is destroyed, and the entry it was using becomes available to be reused.

[[pipelines-identifier]]
== Pipeline Identifier

A _pipeline identifier_ is an identifier that can be used to identify a
specific pipeline independently from the pipeline description, shader stages
and any relevant fixed-function stages, that were used to create the
pipeline object.

The slink:VkPipelineOfflineCreateInfo structure allows an identifier to be
specified for the pipeline at pipeline creation via the pname:pNext field of
the slink:VkGraphicsPipelineCreateInfo,
ifdef::VK_KHR_ray_tracing_pipeline[slink:VkRayTracingPipelineCreateInfoKHR,]
ifdef::VK_NV_ray_tracing[slink:VkRayTracingPipelineCreateInfoNV,]
and slink:VkComputePipelineCreateInfo structures.
If a sname:VkPipelineOfflineCreateInfo structure is not included in the
pname:pNext chain then pipeline creation will fail and
ename:VK_ERROR_NO_PIPELINE_MATCH will be returned by the corresponding
ftext:vkCreate*Pipelines command.

The identifier must: be used by the implementation to match against the
existing content of the pipeline cache at pipeline creation.
This is required for Vulkan SC where pipelines are generated offline and
there is no shader code in the pipeline cache to match at runtime.

[NOTE]
.Note
====
The identifier values must be specified or generated during the offline
pipeline cache generation and embedded in to the pipeline cache blob.
====

[open,refpage='VkPipelineOfflineCreateInfo',desc='Structure specifying pipeline UUID and pipeline pool size to use',type='structs']
--
The sname:VkPipelineOfflineCreateInfo structure is defined as:

include::{generated}/api/structs/VkPipelineOfflineCreateInfo.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:pipelineIdentifier is an array of ename:VK_UUID_SIZE code:uint8_t
    values representing an identifier for the pipeline.
  * pname:matchControl is a elink:VkPipelineMatchControl value specifying
    the type of identifier being used and how the match should be performed.
  * pname:poolEntrySize is the size of the entry in pipeline memory to use
    for this pipeline.
    It must: be a size that was requested via slink:VkPipelinePoolSize when
    the device was created.

If a match in the pipeline cache is not found then
ename:VK_ERROR_NO_PIPELINE_MATCH will be returned to the application.

If pname:poolEntrySize is too small for the pipeline, or the number of
entries for the requested pool size exceeds the reserved count for that pool
size, pipeline creation will fail and ename:VK_ERROR_OUT_OF_POOL_MEMORY will
be returned by the corresponding ftext:vkCreate*Pipelines command.

.Valid Usage
****
  * [[VUID-VkPipelineOfflineCreateInfo-poolEntrySize-05028]]
    pname:poolEntrySize must: be one of the sizes requested via
    slink:VkPipelinePoolSize when the device was created
  * [[VUID-VkPipelineOfflineCreateInfo-recyclePipelineMemory-05029]]
    If
    slink:VkPhysicalDeviceVulkanSC10Properties::pname:recyclePipelineMemory
    is ename:VK_TRUE, the number of currently existing pipelines created
    with this same value of pname:poolEntrySize plus 1 must: be less than or
    equal to the sum of the slink:VkPipelinePoolSize::pname:poolEntryCount
    values with the same value of pname:poolEntrySize
  * [[VUID-VkPipelineOfflineCreateInfo-recyclePipelineMemory-05030]]
    If
    slink:VkPhysicalDeviceVulkanSC10Properties::pname:recyclePipelineMemory
    is ename:VK_FALSE, the total number of pipelines ever created with this
    same value of pname:poolEntrySize plus 1 must: be less than or equal to
    the sum of the slink:VkPipelinePoolSize::pname:poolEntryCount values
    with the same value of pname:poolEntrySize
****
ifdef::hidden[]
// tag::scaddition[]
  * slink:VkPipelineOfflineCreateInfo <<SCID-1>>, <<SCID-8>>
  * elink:VkPipelineMatchControl <<SCID-1>>
// end::scaddition[]
endif::hidden[]

include::{generated}/validity/structs/VkPipelineOfflineCreateInfo.adoc[]
--

[open,refpage='VkPipelineMatchControl',desc='Describes the type of Identifier and Match being used',type='enums',xrefs='VkPipelineOfflineCreateInfo']
--
Possible values of the pname:matchControl member of
sname:VkPipelineOfflineCreateInfo

include::{generated}/api/enums/VkPipelineMatchControl.adoc[]

are:

  * ename:VK_PIPELINE_MATCH_CONTROL_APPLICATION_UUID_EXACT_MATCH specifies
    that the identifier is a UUID generated by the application and the
    identifiers must be an exact match.

--
endif::VKSC_VERSION_1_0[]

[[pipelines-specialization-constants]]
== Specialization Constants

ifndef::VKSC_VERSION_1_0[]
Specialization constants are a mechanism whereby constants in a SPIR-V
module can: have their constant value specified at the time the
sname:VkPipeline is created.
This allows a SPIR-V module to have constants that can: be modified while
executing an application that uses the Vulkan API.

[NOTE]
.Note
====
Specialization constants are useful to allow a compute shader to have its
local workgroup size changed at runtime by the user, for example.
====

endif::VKSC_VERSION_1_0[]
ifdef::VKSC_VERSION_1_0[]
Specialization constants are a mechanism whereby constants in a SPIR-V
module can: have their constant value specified at the time the
sname:VkPipeline is compiled offline.
This allows a SPIR-V module to have constants that can: be modified at
compilation time rather than in the SPIR-V source.
The pname:pSpecializationInfo parameters are not used at runtime and should:
be ignored by the implementation.
If provided, the application must: set the pname:pSpecializationInfo
parameters to the values that were specified for the offline compilation of
this pipeline.

[NOTE]
.Note
====
Specialization constants are useful to allow a compute shader to have its
local workgroup size changed at pipeline compilation time, for example.
====
endif::VKSC_VERSION_1_0[]

Each slink:VkPipelineShaderStageCreateInfo structure contains a
pname:pSpecializationInfo member, which can: be `NULL` to indicate no
specialization constants, or point to a sname:VkSpecializationInfo
structure.

[open,refpage='VkSpecializationInfo',desc='Structure specifying specialization information',type='structs']
--
The sname:VkSpecializationInfo structure is defined as:

include::{generated}/api/structs/VkSpecializationInfo.adoc[]

  * pname:mapEntryCount is the number of entries in the pname:pMapEntries
    array.
  * pname:pMapEntries is a pointer to an array of
    sname:VkSpecializationMapEntry structures, which map constant IDs to
    offsets in pname:pData.
  * pname:dataSize is the byte size of the pname:pData buffer.
  * pname:pData contains the actual constant values to specialize with.

.Valid Usage
****
  * [[VUID-VkSpecializationInfo-offset-00773]]
    The pname:offset member of each element of pname:pMapEntries must: be
    less than pname:dataSize
  * [[VUID-VkSpecializationInfo-pMapEntries-00774]]
    The pname:size member of each element of pname:pMapEntries must: be less
    than or equal to pname:dataSize minus pname:offset
  * [[VUID-VkSpecializationInfo-constantID-04911]]
    The pname:constantID value of each element of pname:pMapEntries must: be
    unique within pname:pMapEntries
****

include::{generated}/validity/structs/VkSpecializationInfo.adoc[]
--

[open,refpage='VkSpecializationMapEntry',desc='Structure specifying a specialization map entry',type='structs']
--
The sname:VkSpecializationMapEntry structure is defined as:

include::{generated}/api/structs/VkSpecializationMapEntry.adoc[]

  * pname:constantID is the ID of the specialization constant in SPIR-V.
  * pname:offset is the byte offset of the specialization constant value
    within the supplied data buffer.
  * pname:size is the byte size of the specialization constant value within
    the supplied data buffer.

If a pname:constantID value is not a specialization constant ID used in the
shader, that map entry does not affect the behavior of the pipeline.

.Valid Usage
****
  * [[VUID-VkSpecializationMapEntry-constantID-00776]]
    For a pname:constantID specialization constant declared in a shader,
    pname:size must: match the byte size of the pname:constantID.
    If the specialization constant is of type code:boolean, pname:size must:
    be the byte size of basetype:VkBool32
****

include::{generated}/validity/structs/VkSpecializationMapEntry.adoc[]
--

In human readable SPIR-V:

[source,glsl]
----
OpDecorate %x SpecId 13 ; decorate .x component of WorkgroupSize with ID 13
OpDecorate %y SpecId 42 ; decorate .y component of WorkgroupSize with ID 42
OpDecorate %z SpecId 3  ; decorate .z component of WorkgroupSize with ID 3
OpDecorate %wgsize BuiltIn WorkgroupSize ; decorate WorkgroupSize onto constant
%i32 = OpTypeInt 32 0 ; declare an unsigned 32-bit type
%uvec3 = OpTypeVector %i32 3 ; declare a 3 element vector type of unsigned 32-bit
%x = OpSpecConstant %i32 1 ; declare the .x component of WorkgroupSize
%y = OpSpecConstant %i32 1 ; declare the .y component of WorkgroupSize
%z = OpSpecConstant %i32 1 ; declare the .z component of WorkgroupSize
%wgsize = OpSpecConstantComposite %uvec3 %x %y %z ; declare WorkgroupSize
----

From the above we have three specialization constants, one for each of the
x, y & z elements of the WorkgroupSize vector.

Now to specialize the above via the specialization constants mechanism:

[source,c++]
----
const VkSpecializationMapEntry entries[] =
{
    {
        .constantID = 13,
        .offset = 0 * sizeof(uint32_t),
        .size = sizeof(uint32_t)
    },
    {
        .constantID = 42,
        .offset = 1 * sizeof(uint32_t),
        .size = sizeof(uint32_t)
    },
    {
        .constantID = 3,
        .offset = 2 * sizeof(uint32_t),
        .size = sizeof(uint32_t)
    }
};

const uint32_t data[] = { 16, 8, 4 }; // our workgroup size is 16x8x4

const VkSpecializationInfo info =
{
    .mapEntryCount = 3,
    .pMapEntries  = entries,
    .dataSize = 3 * sizeof(uint32_t),
    .pData = data,
};
----

Then when calling flink:vkCreateComputePipelines, and passing the
sname:VkSpecializationInfo we defined as the pname:pSpecializationInfo
parameter of slink:VkPipelineShaderStageCreateInfo, we will create a compute
pipeline with the runtime specified local workgroup size.

Another example would be that an application has a SPIR-V module that has
some platform-dependent constants they wish to use.

In human readable SPIR-V:

// [source,glsl]
[source,glsl]
----
OpDecorate %1 SpecId 0  ; decorate our signed 32-bit integer constant
OpDecorate %2 SpecId 12 ; decorate our 32-bit floating-point constant
%i32 = OpTypeInt 32 1   ; declare a signed 32-bit type
%float = OpTypeFloat 32 ; declare a 32-bit floating-point type
%1 = OpSpecConstant %i32 -1 ; some signed 32-bit integer constant
%2 = OpSpecConstant %float 0.5 ; some 32-bit floating-point constant
----

From the above we have two specialization constants, one is a signed 32-bit
integer and the second is a 32-bit floating-point value.

Now to specialize the above via the specialization constants mechanism:

[source,c++]
----
struct SpecializationData {
    int32_t data0;
    float data1;
};

const VkSpecializationMapEntry entries[] =
{
    {
        .constantID = 0,
        .offset = offsetof(SpecializationData, data0),
        .size = sizeof(SpecializationData::data0)
    },
    {
        .constantID = 12,
        .offset = offsetof(SpecializationData, data1),
        .size = sizeof(SpecializationData::data1)
    }
};

SpecializationData data;
data.data0 = -42;    // set the data for the 32-bit integer
data.data1 = 42.0f;  // set the data for the 32-bit floating-point

const VkSpecializationInfo info =
{
    .mapEntryCount = 2,
    .pMapEntries = entries,
    .dataSize = sizeof(data),
    .pdata = &data,
};
----

It is legal for a SPIR-V module with specializations to be compiled into a
pipeline where no specialization information was provided.
SPIR-V specialization constants contain default values such that if a
specialization is not provided, the default value will be used.
In the examples above, it would be valid for an application to only
specialize some of the specialization constants within the SPIR-V module,
and let the other constants use their default values encoded within the
OpSpecConstant declarations.


ifdef::VK_KHR_pipeline_library[]
[[pipelines-library]]
== Pipeline Libraries

A pipeline library is a special pipeline that was created using the
ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR and cannot be bound, instead it
defines a set of pipeline state which can be linked into other pipelines.
ifdef::VK_KHR_ray_tracing_pipeline[]
For ray tracing pipelines this includes shaders and shader groups.
endif::VK_KHR_ray_tracing_pipeline[]
ifdef::VK_EXT_graphics_pipeline_library[]
For graphics pipelines this includes distinct library types defined by
elink:VkGraphicsPipelineLibraryFlagBitsEXT.
endif::VK_EXT_graphics_pipeline_library[]
The application must: maintain the lifetime of a pipeline library based on
the pipelines that link with it.

This linkage is achieved by using the following structure within the
appropriate creation mechanisms:

[open,refpage='VkPipelineLibraryCreateInfoKHR',desc='Structure specifying pipeline libraries to use when creating a pipeline',type='structs']
--
The sname:VkPipelineLibraryCreateInfoKHR structure is defined as:

include::{generated}/api/structs/VkPipelineLibraryCreateInfoKHR.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:libraryCount is the number of pipeline libraries in
    pname:pLibraries.
  * pname:pLibraries is a pointer to an array of slink:VkPipeline structures
    specifying pipeline libraries to use when creating a pipeline.

.Valid Usage
****
  * [[VUID-VkPipelineLibraryCreateInfoKHR-pLibraries-03381]]
    Each element of pname:pLibraries must: have been created with
    ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR
ifdef::VK_EXT_shader_module_identifier[]
  * [[VUID-VkPipelineLibraryCreateInfoKHR-pLibraries-06855]]
    If any library in pname:pLibraries was created with a shader stage with
    slink:VkPipelineShaderStageModuleIdentifierCreateInfoEXT and
    pname:identifierSize not equal to 0, the pipeline must: be created with
    the ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT flag
    set
endif::VK_EXT_shader_module_identifier[]
ifdef::VK_EXT_descriptor_buffer[]
  * [[VUID-VkPipelineLibraryCreateInfoKHR-pLibraries-08096]]
    If any element of pname:pLibraries was created with
    ename:VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, all elements must:
    have been created with
    ename:VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
endif::VK_EXT_descriptor_buffer[]
ifdef::VK_EXT_pipeline_protected_access[]
  * [[VUID-VkPipelineLibraryCreateInfoKHR-pipeline-07404]]
    If pname:pipeline is being created with
    ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT, every element of
    pname:pLibraries must: have been created with
    ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT
  * [[VUID-VkPipelineLibraryCreateInfoKHR-pipeline-07405]]
    If pname:pipeline is being created without
    ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT, every element of
    pname:pLibraries must: have been created without
    ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT
  * [[VUID-VkPipelineLibraryCreateInfoKHR-pipeline-07406]]
    If pname:pipeline is being created with
    ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT, every element of
    pname:pLibraries must: have been created with
    ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT
  * [[VUID-VkPipelineLibraryCreateInfoKHR-pipeline-07407]]
    If pname:pipeline is being created without
    ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT, every element of
    pname:pLibraries must: have been created without
    ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT
endif::VK_EXT_pipeline_protected_access[]
****

include::{generated}/validity/structs/VkPipelineLibraryCreateInfoKHR.adoc[]
--

Pipelines created with ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR libraries
can: depend on other pipeline libraries in
slink:VkPipelineLibraryCreateInfoKHR.

A pipeline library is considered in-use, as long as one of the linking
pipelines is in-use.
This applies recursively if a pipeline library includes other pipeline
libraries.

endif::VK_KHR_pipeline_library[]


[[pipelines-binding]]
== Pipeline Binding

[open,refpage='vkCmdBindPipeline',desc='Bind a pipeline object to a command buffer',type='protos']
--
Once a pipeline has been created, it can: be bound to the command buffer
using the command:

include::{generated}/api/protos/vkCmdBindPipeline.adoc[]

  * pname:commandBuffer is the command buffer that the pipeline will be
    bound to.
  * pname:pipelineBindPoint is a elink:VkPipelineBindPoint value specifying
    to which bind point the pipeline is bound.
    Binding one does not disturb the others.
  * pname:pipeline is the pipeline to be bound.

[[pipelines-bindpoint-commands]]
Once bound, a pipeline binding affects subsequent commands that interact
with the given pipeline type in the command buffer until a different
pipeline of the same type is bound to the bind
ifdef::VK_EXT_shader_object[]
point, or until the pipeline bind point is disturbed by binding a
<<shaders-objects, shader object>> as described in
<<shaders-objects-pipeline-interaction, Interaction with Pipelines>>.
endif::VK_EXT_shader_object[]
ifndef::VK_EXT_shader_object[]
point.
endif::VK_EXT_shader_object[]
Commands that do not interact with the <<shaders-binding,given pipeline>>
type must: not be affected by the pipeline state.

.Valid Usage
****
  * [[VUID-vkCmdBindPipeline-pipelineBindPoint-00777]]
    If pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_COMPUTE, the
    sname:VkCommandPool that pname:commandBuffer was allocated from must:
    support compute operations
  * [[VUID-vkCmdBindPipeline-pipelineBindPoint-00778]]
    If pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_GRAPHICS, the
    sname:VkCommandPool that pname:commandBuffer was allocated from must:
    support graphics operations
  * [[VUID-vkCmdBindPipeline-pipelineBindPoint-00779]]
    If pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_COMPUTE,
    pname:pipeline must: be a compute pipeline
  * [[VUID-vkCmdBindPipeline-pipelineBindPoint-00780]]
    If pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_GRAPHICS,
    pname:pipeline must: be a graphics pipeline
  * [[VUID-vkCmdBindPipeline-pipeline-00781]]
    If the <<features-variableMultisampleRate,
    pname:variableMultisampleRate>> feature is not supported, pname:pipeline
    is a graphics pipeline, the current subpass <<renderpass-noattachments,
    uses no attachments>>, and this is not the first call to this function
    with a graphics pipeline after transitioning to the current subpass,
    then the sample count specified by this pipeline must: match that set in
    the previous pipeline
ifdef::VK_EXT_sample_locations[]
  * [[VUID-vkCmdBindPipeline-variableSampleLocations-01525]]
    If
    slink:VkPhysicalDeviceSampleLocationsPropertiesEXT::pname:variableSampleLocations
    is ename:VK_FALSE, and pname:pipeline is a graphics pipeline created
    with a slink:VkPipelineSampleLocationsStateCreateInfoEXT structure
    having its pname:sampleLocationsEnable member set to ename:VK_TRUE but
    without ename:VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT enabled then the
    current render pass instance must: have been begun by specifying a
    slink:VkRenderPassSampleLocationsBeginInfoEXT structure whose
    pname:pPostSubpassSampleLocations member contains an element with a
    pname:subpassIndex matching the current subpass index and the
    pname:sampleLocationsInfo member of that element must: match the
    pname:sampleLocationsInfo specified in
    slink:VkPipelineSampleLocationsStateCreateInfoEXT when the pipeline was
    created
endif::VK_EXT_sample_locations[]
ifdef::VK_EXT_transform_feedback[]
  * [[VUID-vkCmdBindPipeline-None-02323]]
    This command must: not be recorded when transform feedback is active
endif::VK_EXT_transform_feedback[]
ifdef::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[]
  * [[VUID-vkCmdBindPipeline-pipelineBindPoint-02391]]
    If pname:pipelineBindPoint is
    ename:VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, the sname:VkCommandPool
    that pname:commandBuffer was allocated from must: support compute
    operations
  * [[VUID-vkCmdBindPipeline-pipelineBindPoint-02392]]
    If pname:pipelineBindPoint is
    ename:VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, pname:pipeline must: be a
    ray tracing pipeline
  * [[VUID-vkCmdBindPipeline-pipelineBindPoint-06721]]
    If pname:pipelineBindPoint is
    ename:VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, pname:commandBuffer must:
    not be a protected command buffer
endif::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[]
ifdef::VK_EXT_pipeline_protected_access[]
  * [[VUID-vkCmdBindPipeline-pipelineProtectedAccess-07408]]
    If the <<features-pipelineProtectedAccess,
    pname:pipelineProtectedAccess>> feature is enabled, and
    pname:commandBuffer is a protected command buffer, pname:pipeline must:
    have been created without
    ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT
  * [[VUID-vkCmdBindPipeline-pipelineProtectedAccess-07409]]
    If the <<features-pipelineProtectedAccess,
    pname:pipelineProtectedAccess>> feature is enabled, and
    pname:commandBuffer is not a protected command buffer, pname:pipeline
    must: have been created without
    ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT
endif::VK_EXT_pipeline_protected_access[]
ifdef::VK_KHR_pipeline_library[]
  * [[VUID-vkCmdBindPipeline-pipeline-03382]]
    pname:pipeline must: not have been created with
    ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR set
endif::VK_KHR_pipeline_library[]
ifdef::VK_NV_inherited_viewport_scissor[]
  * [[VUID-vkCmdBindPipeline-commandBuffer-04808]]
    If pname:commandBuffer is a secondary command buffer with
    slink:VkCommandBufferInheritanceViewportScissorInfoNV::pname:viewportScissor2D
    enabled and pname:pipelineBindPoint is
    ename:VK_PIPELINE_BIND_POINT_GRAPHICS, then the pname:pipeline must:
    have been created with ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT or
    ename:VK_DYNAMIC_STATE_VIEWPORT, and
    ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT or
    ename:VK_DYNAMIC_STATE_SCISSOR enabled
endif::VK_NV_inherited_viewport_scissor[]
ifdef::VK_NV_inherited_viewport_scissor,VK_EXT_discard_rectangles[]
  * [[VUID-vkCmdBindPipeline-commandBuffer-04809]]
    If pname:commandBuffer is a secondary command buffer with
    slink:VkCommandBufferInheritanceViewportScissorInfoNV::pname:viewportScissor2D
    enabled and pname:pipelineBindPoint is
    ename:VK_PIPELINE_BIND_POINT_GRAPHICS and pname:pipeline was created
    with slink:VkPipelineDiscardRectangleStateCreateInfoEXT structure and
    its pname:discardRectangleCount member is not `0`, or the pipeline was
    created with ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT
    enabled, then the pipeline must: have been created with
    ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT enabled
endif::VK_NV_inherited_viewport_scissor,VK_EXT_discard_rectangles[]
ifdef::VK_EXT_provoking_vertex[]
  * [[VUID-vkCmdBindPipeline-pipelineBindPoint-04881]]
    If pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_GRAPHICS and
    the <<limits-provokingVertexModePerPipeline,
    pname:provokingVertexModePerPipeline>> limit is ename:VK_FALSE, then
    pipeline's
    slink:VkPipelineRasterizationProvokingVertexStateCreateInfoEXT::pname:provokingVertexMode
    must: be the same as that of any other pipelines previously bound to
    this bind point within the current render pass instance, including any
    pipeline already bound when beginning the render pass instance
endif::VK_EXT_provoking_vertex[]
ifdef::VK_HUAWEI_subpass_shading[]
  * [[VUID-vkCmdBindPipeline-pipelineBindPoint-04949]]
    If pname:pipelineBindPoint is
    ename:VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI, the
    sname:VkCommandPool that pname:commandBuffer was allocated from must:
    support compute operations
  * [[VUID-vkCmdBindPipeline-pipelineBindPoint-04950]]
    If pname:pipelineBindPoint is
    ename:VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI, pname:pipeline
    must: be a subpass shading pipeline
endif::VK_HUAWEI_subpass_shading[]
****

include::{generated}/validity/protos/vkCmdBindPipeline.adoc[]
--

[open,refpage='VkPipelineBindPoint',desc='Specify the bind point of a pipeline object to a command buffer',type='enums']
--
Possible values of flink:vkCmdBindPipeline::pname:pipelineBindPoint,
specifying the bind point of a pipeline object, are:

include::{generated}/api/enums/VkPipelineBindPoint.adoc[]

  * ename:VK_PIPELINE_BIND_POINT_COMPUTE specifies binding as a compute
    pipeline.
  * ename:VK_PIPELINE_BIND_POINT_GRAPHICS specifies binding as a graphics
    pipeline.
ifdef::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[]
  * ename:VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR specifies binding as a ray
    tracing pipeline.
endif::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[]
ifdef::VK_HUAWEI_subpass_shading[]
  * ename:VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI specifies binding as
    a subpass shading pipeline.
endif::VK_HUAWEI_subpass_shading[]
ifdef::VK_AMDX_shader_enqueue[]
  * ename:VK_PIPELINE_BIND_POINT_EXECUTION_GRAPH_AMDX specifies binding as
    an <<executiongraphs, execution graph pipeline>>.
endif::VK_AMDX_shader_enqueue[]
--

ifdef::VK_NV_device_generated_commands[]
[open,refpage='vkCmdBindPipelineShaderGroupNV',desc='Bind a pipeline object's shader group to a command buffer',type='protos']
--
For pipelines that were created with the support of multiple shader groups
(see <<graphics-shadergroups,Graphics Pipeline Shader Groups>>), the regular
fname:vkCmdBindPipeline command will bind Shader Group `0`.
To explicitly bind a shader group use:

include::{generated}/api/protos/vkCmdBindPipelineShaderGroupNV.adoc[]

  * pname:commandBuffer is the command buffer that the pipeline will be
    bound to.
  * pname:pipelineBindPoint is a elink:VkPipelineBindPoint value specifying
    the bind point to which the pipeline will be bound.
  * pname:pipeline is the pipeline to be bound.
  * pname:groupIndex is the shader group to be bound.


.Valid Usage
****
  * [[VUID-vkCmdBindPipelineShaderGroupNV-groupIndex-02893]]
    pname:groupIndex must: be `0` or less than the effective
    slink:VkGraphicsPipelineShaderGroupsCreateInfoNV::pname:groupCount
    including the referenced pipelines
  * [[VUID-vkCmdBindPipelineShaderGroupNV-pipelineBindPoint-02894]]
    The pname:pipelineBindPoint must: be
    ename:VK_PIPELINE_BIND_POINT_GRAPHICS
  * [[VUID-vkCmdBindPipelineShaderGroupNV-groupIndex-02895]]
    The same restrictions as flink:vkCmdBindPipeline apply as if the bound
    pipeline was created only with the Shader Group from the
    pname:groupIndex information
  * [[VUID-vkCmdBindPipelineShaderGroupNV-deviceGeneratedCommands-02896]]
    The <<features-deviceGeneratedCommands, pname:deviceGeneratedCommands>>
    feature must: be enabled
****

include::{generated}/validity/protos/vkCmdBindPipelineShaderGroupNV.adoc[]
--
endif::VK_NV_device_generated_commands[]

ifdef::VK_EXT_shader_object[]
[[pipelines-shader-object-interaction]]
=== Interaction With Shader Objects

If the <<features-shaderObject, pname:shaderObject>> feature is enabled,
applications can: use both pipelines and <<shaders-objects, shader objects>>
at the same time.
The interaction between pipelines and shader objects is described in
<<shaders-objects-pipeline-interaction, Interaction with Pipelines>>.
endif::VK_EXT_shader_object[]

[[pipelines-dynamic-state]]
== Dynamic State

When a pipeline object is bound, any pipeline object state that is not
specified as dynamic is applied to the command buffer state.
Pipeline object state that is specified as dynamic is not applied to the
command buffer state at this time.
Instead, dynamic state can: be modified at any time and persists for the
lifetime of the command buffer, or until modified by another dynamic state
setting command, or made invalid by another pipeline bind with that state
specified as static.

When a pipeline object is bound, the following applies to each state
parameter:

  * If the state is not specified as dynamic in the new pipeline object,
    then that command buffer state is overwritten by the state in the new
    pipeline object.
    Before any draw or dispatch call with this pipeline there must: not have
    been any calls to any of the corresponding dynamic state setting
    commands after this pipeline was bound.
  * If the state is specified as dynamic in the new pipeline object, then
    that command buffer state is not disturbed.
    Before any draw or dispatch call with this pipeline there must: have
    been at least one call to each of the corresponding dynamic state
    setting commands.
    The state-setting commands must: be recorded after command buffer
    recording was begun, or after the last command binding a pipeline object
    with that state specified as static, whichever was the latter.
  * If the state is not included (corresponding pointer in
    slink:VkGraphicsPipelineCreateInfo was `NULL` or was ignored) in the new
    pipeline object, then that command buffer state is not disturbed.
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
    For example, mesh shading pipelines do not include vertex input state
    and therefore do not disturb any such command buffer state.
endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[]

Dynamic state that does not affect the result of operations can: be left
undefined:.

[NOTE]
.Note
====
For example, if blending is disabled by the pipeline object state then the
dynamic color blend constants do not need to be specified in the command
buffer, even if this state is specified as dynamic in the pipeline object.
====


ifdef::VK_AMD_shader_info,VK_KHR_pipeline_executable_properties,VK_EXT_pipeline_properties[]
[[pipelines-shader-information]]
== Pipeline Properties and Shader Information
endif::VK_AMD_shader_info,VK_KHR_pipeline_executable_properties,VK_EXT_pipeline_properties[]

ifdef::VK_KHR_pipeline_executable_properties[]
[open,refpage='vkGetPipelineExecutablePropertiesKHR',desc='Get the executables associated with a pipeline',type='protos']
--
When a pipeline is created, its state and shaders are compiled into zero or
more device-specific executables, which are used when executing commands
against that pipeline.
To query the properties of these pipeline executables, call:

include::{generated}/api/protos/vkGetPipelineExecutablePropertiesKHR.adoc[]

  * pname:device is the device that created the pipeline.
  * pname:pPipelineInfo describes the pipeline being queried.
  * pname:pExecutableCount is a pointer to an integer related to the number
    of pipeline executables available or queried, as described below.
  * pname:pProperties is either `NULL` or a pointer to an array of
    slink:VkPipelineExecutablePropertiesKHR structures.

If pname:pProperties is `NULL`, then the number of pipeline executables
associated with the pipeline is returned in pname:pExecutableCount.
Otherwise, pname:pExecutableCount must: point to a variable set by the user
to the number of elements in the pname:pProperties array, and on return the
variable is overwritten with the number of structures actually written to
pname:pProperties.
If pname:pExecutableCount is less than the number of pipeline executables
associated with the pipeline, at most pname:pExecutableCount structures will
be written, and ename:VK_INCOMPLETE will be returned instead of
ename:VK_SUCCESS, to indicate that not all the available properties were
returned.

.Valid Usage
****
  * [[VUID-vkGetPipelineExecutablePropertiesKHR-pipelineExecutableInfo-03270]]
    The <<features-pipelineExecutableInfo, pname:pipelineExecutableInfo>>
    feature must: be enabled
  * [[VUID-vkGetPipelineExecutablePropertiesKHR-pipeline-03271]]
    The pname:pipeline member of pname:pPipelineInfo must: have been created
    with pname:device
****

include::{generated}/validity/protos/vkGetPipelineExecutablePropertiesKHR.adoc[]
--

[open,refpage='VkPipelineExecutablePropertiesKHR',desc='Structure describing a pipeline executable',type='structs']
--
The sname:VkPipelineExecutablePropertiesKHR structure is defined as:

include::{generated}/api/structs/VkPipelineExecutablePropertiesKHR.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:stages is a bitmask of zero or more elink:VkShaderStageFlagBits
    indicating which shader stages (if any) were principally used as inputs
    to compile this pipeline executable.
  * pname:name is an array of ename:VK_MAX_DESCRIPTION_SIZE code:char
    containing a null-terminated UTF-8 string which is a short human
    readable name for this pipeline executable.
  * pname:description is an array of ename:VK_MAX_DESCRIPTION_SIZE code:char
    containing a null-terminated UTF-8 string which is a human readable
    description for this pipeline executable.
  * pname:subgroupSize is the subgroup size with which this pipeline
    executable is dispatched.

Not all implementations have a 1:1 mapping between shader stages and
pipeline executables and some implementations may: reduce a given shader
stage to fixed function hardware programming such that no pipeline
executable is available.
No guarantees are provided about the mapping between shader stages and
pipeline executables and pname:stages should: be considered a best effort
hint.
Because the application cannot: rely on the pname:stages field to provide an
exact description, pname:name and pname:description provide a human readable
name and description which more accurately describes the given pipeline
executable.

include::{generated}/validity/structs/VkPipelineExecutablePropertiesKHR.adoc[]
--
endif::VK_KHR_pipeline_executable_properties[]

ifdef::VK_EXT_pipeline_properties[]
[open,refpage='vkGetPipelinePropertiesEXT',desc='Query pipeline properties',type='protos']
--
To query the pipeline properties call:

include::{generated}/api/protos/vkGetPipelinePropertiesEXT.adoc[]

  * pname:device is the logical device that created the pipeline.
  * pname:pPipelineInfo is a pointer to a slink:VkPipelineInfoEXT structure
    which describes the pipeline being queried.
  * pname:pPipelineProperties is a pointer to a slink:VkBaseOutStructure
    structure in which the pipeline properties will be written.

To query a pipeline's pname:pipelineIdentifier pass a
slink:VkPipelinePropertiesIdentifierEXT structure in
pname:pPipelineProperties.
Each pipeline is associated with a pname:pipelineIdentifier and the
identifier is implementation specific.

.Valid Usage
****
  * [[VUID-vkGetPipelinePropertiesEXT-pipeline-06738]]
    The pname:pipeline member of pname:pPipelineInfo must have been created
    with pname:device
  * [[VUID-vkGetPipelinePropertiesEXT-pPipelineProperties-06739]]
    pname:pPipelineProperties must: be a valid pointer to a
    slink:VkPipelinePropertiesIdentifierEXT structure
  * [[VUID-vkGetPipelinePropertiesEXT-None-06766]]
    The <<features-pipelinePropertiesIdentifier,
    pname:pipelinePropertiesIdentifier>> feature must: be enabled
****

include::{generated}/validity/protos/vkGetPipelinePropertiesEXT.adoc[]
--

[open,refpage='VkPipelinePropertiesIdentifierEXT',desc='Structure used to retrieve pipeline properties',type='structs']
--
The sname:VkPipelinePropertiesIdentifierEXT structure is defined as:

include::{generated}/api/structs/VkPipelinePropertiesIdentifierEXT.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:pipelineIdentifier is an array of ename:VK_UUID_SIZE code:uint8_t
    values into which the pipeline identifier will be written.

include::{generated}/validity/structs/VkPipelinePropertiesIdentifierEXT.adoc[]
--
endif::VK_EXT_pipeline_properties[]

// This structure is used by both vkGetPipelineExecutablePropertiesKHR and
// vkGetPipelinePropertiesEXT above, placing it in a nonstandard position.
ifdef::VK_KHR_pipeline_executable_properties,VK_EXT_pipeline_properties[]
[open,refpage='VkPipelineInfoKHR',desc='Structure describing a pipeline',type='structs',alias='VkPipelineInfoEXT']
--
The sname:VkPipelineInfoKHR structure is defined as:

include::{generated}/api/structs/VkPipelineInfoKHR.adoc[]

ifdef::VK_EXT_pipeline_properties[]
or the equivalent

include::{generated}/api/structs/VkPipelineInfoEXT.adoc[]
endif::VK_EXT_pipeline_properties[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:pipeline is a sname:VkPipeline handle.

include::{generated}/validity/structs/VkPipelineInfoKHR.adoc[]
--
endif::VK_KHR_pipeline_executable_properties,VK_EXT_pipeline_properties[]

ifdef::VK_KHR_pipeline_executable_properties[]
[open,refpage='vkGetPipelineExecutableStatisticsKHR',desc='Get compile time statistics associated with a pipeline executable',type='protos']
--
Each pipeline executable may: have a set of statistics associated with it
that are generated by the pipeline compilation process.
These statistics may: include things such as instruction counts, amount of
spilling (if any), maximum number of simultaneous threads, or anything else
which may: aid developers in evaluating the expected performance of a
shader.
To query the compile time statistics associated with a pipeline executable,
call:

include::{generated}/api/protos/vkGetPipelineExecutableStatisticsKHR.adoc[]

  * pname:device is the device that created the pipeline.
  * pname:pExecutableInfo describes the pipeline executable being queried.
  * pname:pStatisticCount is a pointer to an integer related to the number
    of statistics available or queried, as described below.
  * pname:pStatistics is either `NULL` or a pointer to an array of
    slink:VkPipelineExecutableStatisticKHR structures.

If pname:pStatistics is `NULL`, then the number of statistics associated
with the pipeline executable is returned in pname:pStatisticCount.
Otherwise, pname:pStatisticCount must: point to a variable set by the user
to the number of elements in the pname:pStatistics array, and on return the
variable is overwritten with the number of structures actually written to
pname:pStatistics.
If pname:pStatisticCount is less than the number of statistics associated
with the pipeline executable, at most pname:pStatisticCount structures will
be written, and ename:VK_INCOMPLETE will be returned instead of
ename:VK_SUCCESS, to indicate that not all the available statistics were
returned.

.Valid Usage
****
  * [[VUID-vkGetPipelineExecutableStatisticsKHR-pipelineExecutableInfo-03272]]
    The <<features-pipelineExecutableInfo, pname:pipelineExecutableInfo>>
    feature must: be enabled
  * [[VUID-vkGetPipelineExecutableStatisticsKHR-pipeline-03273]]
    The pname:pipeline member of pname:pExecutableInfo must: have been
    created with pname:device
  * [[VUID-vkGetPipelineExecutableStatisticsKHR-pipeline-03274]]
    The pname:pipeline member of pname:pExecutableInfo must: have been
    created with ename:VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR
****

include::{generated}/validity/protos/vkGetPipelineExecutableStatisticsKHR.adoc[]
--

[open,refpage='VkPipelineExecutableInfoKHR',desc='Structure describing a pipeline executable to query for associated statistics or internal representations',type='structs']
--
The sname:VkPipelineExecutableInfoKHR structure is defined as:

include::{generated}/api/structs/VkPipelineExecutableInfoKHR.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:pipeline is the pipeline to query.
  * pname:executableIndex is the index of the pipeline executable to query
    in the array of executable properties returned by
    flink:vkGetPipelineExecutablePropertiesKHR.

.Valid Usage
****
  * [[VUID-VkPipelineExecutableInfoKHR-executableIndex-03275]]
    pname:executableIndex must: be less than the number of pipeline
    executables associated with pname:pipeline as returned in the
    pname:pExecutableCount parameter of
    fname:vkGetPipelineExecutablePropertiesKHR
****

include::{generated}/validity/structs/VkPipelineExecutableInfoKHR.adoc[]
--

[open,refpage='VkPipelineExecutableStatisticKHR',desc='Structure describing a compile time pipeline executable statistic',type='structs']
--
The sname:VkPipelineExecutableStatisticKHR structure is defined as:

include::{generated}/api/structs/VkPipelineExecutableStatisticKHR.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:name is an array of ename:VK_MAX_DESCRIPTION_SIZE code:char
    containing a null-terminated UTF-8 string which is a short human
    readable name for this statistic.
  * pname:description is an array of ename:VK_MAX_DESCRIPTION_SIZE code:char
    containing a null-terminated UTF-8 string which is a human readable
    description for this statistic.
  * pname:format is a elink:VkPipelineExecutableStatisticFormatKHR value
    specifying the format of the data found in pname:value.
  * pname:value is the value of this statistic.

include::{generated}/validity/structs/VkPipelineExecutableStatisticKHR.adoc[]
--

[open,refpage='VkPipelineExecutableStatisticFormatKHR',desc='Enum describing a pipeline executable statistic's data format',type='enums']
--
The ename:VkPipelineExecutableStatisticFormatKHR enum is defined as:

include::{generated}/api/enums/VkPipelineExecutableStatisticFormatKHR.adoc[]

  * ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR specifies that
    the statistic is returned as a 32-bit boolean value which must: be
    either ename:VK_TRUE or ename:VK_FALSE and should: be read from the
    fname:b32 field of sname:VkPipelineExecutableStatisticValueKHR.
  * ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR specifies that
    the statistic is returned as a signed 64-bit integer and should: be read
    from the fname:i64 field of sname:VkPipelineExecutableStatisticValueKHR.
  * ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR specifies that
    the statistic is returned as an unsigned 64-bit integer and should: be
    read from the fname:u64 field of
    sname:VkPipelineExecutableStatisticValueKHR.
  * ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR specifies that
    the statistic is returned as a 64-bit floating-point value and should:
    be read from the fname:f64 field of
    sname:VkPipelineExecutableStatisticValueKHR.
--

[open,refpage='VkPipelineExecutableStatisticValueKHR',desc='A union describing a pipeline executable statistic's value',type='structs']
--
The sname:VkPipelineExecutableStatisticValueKHR union is defined as:

include::{generated}/api/structs/VkPipelineExecutableStatisticValueKHR.adoc[]

  * pname:b32 is the 32-bit boolean value if the
    ename:VkPipelineExecutableStatisticFormatKHR is
    ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR.
  * pname:i64 is the signed 64-bit integer value if the
    ename:VkPipelineExecutableStatisticFormatKHR is
    ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR.
  * pname:u64 is the unsigned 64-bit integer value if the
    ename:VkPipelineExecutableStatisticFormatKHR is
    ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR.
  * pname:f64 is the 64-bit floating-point value if the
    ename:VkPipelineExecutableStatisticFormatKHR is
    ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR.

include::{generated}/validity/structs/VkPipelineExecutableStatisticValueKHR.adoc[]
--

[open,refpage='vkGetPipelineExecutableInternalRepresentationsKHR',desc='Get internal representations of the pipeline executable',type='protos']
--
Each pipeline executable may: have one or more text or binary internal
representations associated with it which are generated as part of the
compile process.
These may: include the final shader assembly, a binary form of the compiled
shader, or the shader compiler's internal representation at any number of
intermediate compile steps.
To query the internal representations associated with a pipeline executable,
call:

include::{generated}/api/protos/vkGetPipelineExecutableInternalRepresentationsKHR.adoc[]

  * pname:device is the device that created the pipeline.
  * pname:pExecutableInfo describes the pipeline executable being queried.
  * pname:pInternalRepresentationCount is a pointer to an integer related to
    the number of internal representations available or queried, as
    described below.
  * pname:pInternalRepresentations is either `NULL` or a pointer to an array
    of slink:VkPipelineExecutableInternalRepresentationKHR structures.

If pname:pInternalRepresentations is `NULL`, then the number of internal
representations associated with the pipeline executable is returned in
pname:pInternalRepresentationCount.
Otherwise, pname:pInternalRepresentationCount must: point to a variable set
by the user to the number of elements in the pname:pInternalRepresentations
array, and on return the variable is overwritten with the number of
structures actually written to pname:pInternalRepresentations.
If pname:pInternalRepresentationCount is less than the number of internal
representations associated with the pipeline executable, at most
pname:pInternalRepresentationCount structures will be written, and
ename:VK_INCOMPLETE will be returned instead of ename:VK_SUCCESS, to
indicate that not all the available representations were returned.

While the details of the internal representations remain
implementation-dependent, the implementation should: order the internal
representations in the order in which they occur in the compiled pipeline
with the final shader assembly (if any) last.

.Valid Usage
****
  * [[VUID-vkGetPipelineExecutableInternalRepresentationsKHR-pipelineExecutableInfo-03276]]
    The <<features-pipelineExecutableInfo, pname:pipelineExecutableInfo>>
    feature must: be enabled
  * [[VUID-vkGetPipelineExecutableInternalRepresentationsKHR-pipeline-03277]]
    The pname:pipeline member of pname:pExecutableInfo must: have been
    created with pname:device
  * [[VUID-vkGetPipelineExecutableInternalRepresentationsKHR-pipeline-03278]]
    The pname:pipeline member of pname:pExecutableInfo must: have been
    created with
    ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR
****

include::{generated}/validity/protos/vkGetPipelineExecutableInternalRepresentationsKHR.adoc[]
--

[open,refpage='VkPipelineExecutableInternalRepresentationKHR',desc='Structure describing the textual form of a pipeline executable internal representation',type='structs']
--
The sname:VkPipelineExecutableInternalRepresentationKHR structure is defined
as:

include::{generated}/api/structs/VkPipelineExecutableInternalRepresentationKHR.adoc[]

  * pname:sType is a elink:VkStructureType value identifying this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:name is an array of ename:VK_MAX_DESCRIPTION_SIZE code:char
    containing a null-terminated UTF-8 string which is a short human
    readable name for this internal representation.
  * pname:description is an array of ename:VK_MAX_DESCRIPTION_SIZE code:char
    containing a null-terminated UTF-8 string which is a human readable
    description for this internal representation.
  * pname:isText specifies whether the returned data is text or opaque data.
    If pname:isText is ename:VK_TRUE then the data returned in pname:pData
    is text and is guaranteed to be a null-terminated UTF-8 string.
  * pname:dataSize is an integer related to the size, in bytes, of the
    internal representation's data, as described below.
  * pname:pData is either `NULL` or a pointer to a block of data into which
    the implementation will write the internal representation.

If pname:pData is `NULL`, then the size, in bytes, of the internal
representation data is returned in pname:dataSize.
Otherwise, pname:dataSize must be the size of the buffer, in bytes, pointed
to by pname:pData and on return pname:dataSize is overwritten with the
number of bytes of data actually written to pname:pData including any
trailing null character.
If pname:dataSize is less than the size, in bytes, of the internal
representation's data, at most pname:dataSize bytes of data will be written
to pname:pData, and ename:VK_INCOMPLETE will be returned instead of
ename:VK_SUCCESS, to indicate that not all the available representation was
returned.

If pname:isText is ename:VK_TRUE and pname:pData is not `NULL` and
pname:dataSize is not zero, the last byte written to pname:pData will be a
null character.

include::{generated}/validity/structs/VkPipelineExecutableInternalRepresentationKHR.adoc[]
--
endif::VK_KHR_pipeline_executable_properties[]


ifdef::VK_AMD_shader_info[]
include::{chapters}/VK_AMD_shader_info.adoc[]
endif::VK_AMD_shader_info[]


// These includes have their own section headers

ifdef::VK_AMD_pipeline_compiler_control[]
include::{chapters}/VK_AMD_pipeline_compiler_control.adoc[]
endif::VK_AMD_pipeline_compiler_control[]

ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_feedback[]
include::{chapters}/VK_EXT_pipeline_creation_feedback/pipelines.adoc[]
endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_feedback[]