@@ -8,6 +8,7 @@ use core::fmt;
88
99use arrayvec:: ArrayVec ;
1010use hashbrown:: hash_map:: Entry ;
11+ use naga:: BuiltIn ;
1112use shader_io_deductions:: { display_deductions_as_optional_list, MaxVertexShaderOutputDeduction } ;
1213use thiserror:: Error ;
1314use wgt:: {
@@ -153,7 +154,7 @@ impl fmt::Display for InterfaceVar {
153154#[ derive( Debug , Eq , PartialEq ) ]
154155enum Varying {
155156 Local { location : u32 , iv : InterfaceVar } ,
156- BuiltIn ( naga :: BuiltIn ) ,
157+ BuiltIn ( BuiltIn ) ,
157158}
158159
159160#[ allow( unused) ]
@@ -1412,10 +1413,10 @@ impl Interface {
14121413 } ) ;
14131414 }
14141415 }
1415- Varying :: BuiltIn ( naga :: BuiltIn :: PrimitiveIndex ) => {
1416+ Varying :: BuiltIn ( BuiltIn :: PrimitiveIndex ) => {
14161417 this_stage_primitive_index = true ;
14171418 }
1418- Varying :: BuiltIn ( naga :: BuiltIn :: DrawIndex ) => {
1419+ Varying :: BuiltIn ( BuiltIn :: DrawIndex ) => {
14191420 has_draw_id = true ;
14201421 }
14211422 Varying :: BuiltIn ( _) => { }
@@ -1472,9 +1473,7 @@ impl Interface {
14721473 cmp @ wgt:: CompareFunction :: Equal | cmp @ wgt:: CompareFunction :: NotEqual ,
14731474 ) = compare_function
14741475 {
1475- if let Varying :: BuiltIn ( naga:: BuiltIn :: Position { invariant : false } ) =
1476- * output
1477- {
1476+ if let Varying :: BuiltIn ( BuiltIn :: Position { invariant : false } ) = * output {
14781477 log:: warn!(
14791478 concat!(
14801479 "Vertex shader with entry point {} outputs a " ,
@@ -1583,15 +1582,15 @@ impl Interface {
15831582
15841583 if entry_point
15851584 . outputs
1586- . contains ( & Varying :: BuiltIn ( naga :: BuiltIn :: FragDepth ) )
1585+ . contains ( & Varying :: BuiltIn ( BuiltIn :: FragDepth ) )
15871586 && !has_depth_attachment
15881587 {
15891588 return Err ( StageError :: MissingFragDepthAttachment ) ;
15901589 }
15911590 }
15921591 ShaderStageForValidation :: Mesh => {
15931592 for output in & entry_point. outputs {
1594- if matches ! ( output, Varying :: BuiltIn ( naga :: BuiltIn :: PrimitiveIndex ) ) {
1593+ if matches ! ( output, Varying :: BuiltIn ( BuiltIn :: PrimitiveIndex ) ) {
15951594 this_stage_primitive_index = true ;
15961595 }
15971596 }
0 commit comments