mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-24 16:31:11 +01:00
1 parent
0491d39232
commit
f49314dbbd
10 files changed
+160
-95
No files matched your search
@@ -1280,14 +1280,14 @@ fn inject_common_builtin(
|
||||
0b10 => Some(VectorSize::Tri),
|
||||
_ => Some(VectorSize::Quad),
|
||||
};
|
||||
let ty = || match size {
|
||||
let ty = |kind| match size {
|
||||
Some(size) => TypeInner::Vector {
|
||||
size,
|
||||
kind: Sk::Float,
|
||||
kind,
|
||||
width: float_width,
|
||||
},
|
||||
None => TypeInner::Scalar {
|
||||
kind: Sk::Float,
|
||||
kind,
|
||||
width: float_width,
|
||||
},
|
||||
};
|
||||
@@ -1300,9 +1300,15 @@ fn inject_common_builtin(
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
let second_kind = if fun == MacroCall::MathFunction(MathFunction::Ldexp) {
|
||||
Sk::Sint
|
||||
} else {
|
||||
Sk::Float
|
||||
};
|
||||
|
||||
declaration
|
||||
.overloads
|
||||
.push(module.add_builtin(vec![ty(), ty()], fun))
|
||||
.push(module.add_builtin(vec![ty(Sk::Float), ty(second_kind)], fun))
|
||||
}
|
||||
}
|
||||
"transpose" => {
|
||||
|
||||
Reference in new issue
Block a user