diff --git a/cts_runner/test.lst b/cts_runner/test.lst index 20fb875f3..827bf0111 100644 --- a/cts_runner/test.lst +++ b/cts_runner/test.lst @@ -134,6 +134,8 @@ fails-if(metal) webgpu:api,operation,uncapturederror:iff_uncaptured:* //FAIL: webgpu:api,operation,uncapturederror:onuncapturederror_order_wrt_addEventListener // There are also two unimplemented SKIPs in uncapturederror not enumerated here. webgpu:api,validation,encoding,queries,general:occlusion_query,query_type:* +webgpu:shader,execution,expression,call,builtin,atan2:f16:* +webgpu:shader,execution,expression,call,builtin,atan2:f32:* webgpu:shader,execution,expression,call,builtin,textureSample:sampled_1d_coords:* webgpu:shader,execution,expression,call,builtin,textureSampleBaseClampToEdge:2d_coords:stage="c";textureType="texture_2d";* webgpu:shader,execution,flow_control,return:* diff --git a/naga/src/proc/constant_evaluator.rs b/naga/src/proc/constant_evaluator.rs index 5aa9baaa9..f5a5d25ca 100644 --- a/naga/src/proc/constant_evaluator.rs +++ b/naga/src/proc/constant_evaluator.rs @@ -1178,6 +1178,11 @@ impl<'a> ConstantEvaluator<'a> { crate::MathFunction::Atan => { component_wise_float!(self, span, [arg], |e| { Ok([e.atan()]) }) } + crate::MathFunction::Atan2 => { + component_wise_float!(self, span, [arg, arg1.unwrap()], |y, x| { + Ok([y.atan2(x)]) + }) + } crate::MathFunction::Asinh => { component_wise_float!(self, span, [arg], |e| { Ok([e.asinh()]) }) } @@ -1346,8 +1351,7 @@ impl<'a> ConstantEvaluator<'a> { crate::MathFunction::Cross => self.cross_product(arg, arg1.unwrap(), span), // unimplemented - crate::MathFunction::Atan2 - | crate::MathFunction::Modf + crate::MathFunction::Modf | crate::MathFunction::Frexp | crate::MathFunction::Ldexp | crate::MathFunction::Dot