Skip to content

Commit f93c893

Browse files
committed
pixelbender: Implement Div opcode
1 parent 1820792 commit f93c893

File tree

1 file changed

+2
-1
lines changed
  • render/naga-pixelbender/src

1 file changed

+2
-1
lines changed

render/naga-pixelbender/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,14 +884,15 @@ impl ShaderBuilder<'_> {
884884
right: src,
885885
})
886886
}
887-
Opcode::Sub | Opcode::Add | Opcode::Mul => {
887+
Opcode::Sub | Opcode::Add | Opcode::Mul | Opcode::Div => {
888888
// The destination is also used as the first operand: 'dst = dst <op> src'
889889
let left = self.load_src_register(&dst)?;
890890

891891
let op = match opcode {
892892
Opcode::Sub => BinaryOperator::Subtract,
893893
Opcode::Add => BinaryOperator::Add,
894894
Opcode::Mul => BinaryOperator::Multiply,
895+
Opcode::Div => BinaryOperator::Divide,
895896
_ => unreachable!(),
896897
};
897898

0 commit comments

Comments
 (0)