mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-28 00:59:12 +01:00
[naga] Implement atan2 in const (#8222)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
2 files changed
+8
-2
No files matched your search
@@ -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<f32>";*
|
||||
webgpu:shader,execution,flow_control,return:*
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user