mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
[naga] Implement atan2 in const (#8222)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
d2ee4b8be5
commit
084431b548
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user