@@ -1317,37 +1317,42 @@ impl Interface {
1317
1317
}
1318
1318
}
1319
1319
1320
- if shader_stage == naga :: ShaderStage :: Vertex {
1321
- for output in entry_point . outputs . iter ( ) {
1322
- //TODO: count builtins towards the limit?
1323
- inter_stage_components += match * output {
1324
- Varying :: Local { ref iv , .. } => iv . ty . dim . num_components ( ) ,
1325
- Varying :: BuiltIn ( _ ) => 0 ,
1326
- } ;
1327
-
1328
- if let Some (
1329
- cmp @ wgt :: CompareFunction :: Equal | cmp @ wgt :: CompareFunction :: NotEqual ,
1330
- ) = compare_function
1331
- {
1332
- if let Varying :: BuiltIn ( naga :: BuiltIn :: Position { invariant : false } ) = * output
1320
+ # [ expect ( clippy :: single_match ) ]
1321
+ match shader_stage {
1322
+ naga :: ShaderStage :: Vertex => {
1323
+ for output in entry_point . outputs . iter ( ) {
1324
+ //TODO: count builtins towards the limit?
1325
+ inter_stage_components += match * output {
1326
+ Varying :: Local { ref iv , .. } => iv . ty . dim . num_components ( ) ,
1327
+ Varying :: BuiltIn ( _ ) => 0 ,
1328
+ } ;
1329
+
1330
+ if let Some (
1331
+ cmp @ wgt :: CompareFunction :: Equal | cmp @ wgt :: CompareFunction :: NotEqual ,
1332
+ ) = compare_function
1333
1333
{
1334
- log:: warn!(
1335
- concat!(
1336
- "Vertex shader with entry point {} outputs a " ,
1337
- "@builtin(position) without the @invariant attribute and " ,
1338
- "is used in a pipeline with {cmp:?}. On some machines, " ,
1339
- "this can cause bad artifacting as {cmp:?} assumes the " ,
1340
- "values output from the vertex shader exactly match the " ,
1341
- "value in the depth buffer. The @invariant attribute on the " ,
1342
- "@builtin(position) vertex output ensures that the exact " ,
1343
- "same pixel depths are used every render."
1344
- ) ,
1345
- entry_point_name,
1346
- cmp = cmp
1347
- ) ;
1334
+ if let Varying :: BuiltIn ( naga:: BuiltIn :: Position { invariant : false } ) =
1335
+ * output
1336
+ {
1337
+ log:: warn!(
1338
+ concat!(
1339
+ "Vertex shader with entry point {} outputs a " ,
1340
+ "@builtin(position) without the @invariant attribute and " ,
1341
+ "is used in a pipeline with {cmp:?}. On some machines, " ,
1342
+ "this can cause bad artifacting as {cmp:?} assumes the " ,
1343
+ "values output from the vertex shader exactly match the " ,
1344
+ "value in the depth buffer. The @invariant attribute on the " ,
1345
+ "@builtin(position) vertex output ensures that the exact " ,
1346
+ "same pixel depths are used every render."
1347
+ ) ,
1348
+ entry_point_name,
1349
+ cmp = cmp
1350
+ ) ;
1351
+ }
1348
1352
}
1349
1353
}
1350
1354
}
1355
+ _ => ( ) ,
1351
1356
}
1352
1357
1353
1358
if inter_stage_components > self . limits . max_inter_stage_shader_components {
0 commit comments