mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-24 00:11:11 +01:00
[spv-out] implement discard
This commit is contained in:
1 parent
3c2843fa63
commit
f2d624944c
2 files changed
+7
No files matched your search
@@ -707,6 +707,10 @@ pub(super) fn instruction_branch_conditional(
|
||||
instruction
|
||||
}
|
||||
|
||||
pub(super) fn instruction_kill() -> Instruction {
|
||||
Instruction::new(Op::Kill)
|
||||
}
|
||||
|
||||
pub(super) fn instruction_return() -> Instruction {
|
||||
Instruction::new(Op::Return)
|
||||
}
|
||||
|
||||
@@ -2339,6 +2339,9 @@ impl Writer {
|
||||
crate::Statement::Return { value: None } => {
|
||||
block.termination = Some(super::instructions::instruction_return());
|
||||
}
|
||||
crate::Statement::Kill => {
|
||||
block.termination = Some(super::instructions::instruction_kill());
|
||||
}
|
||||
crate::Statement::Store { pointer, value } => {
|
||||
let (pointer_id, _, _) = self.write_expression_pointer(
|
||||
ir_module,
|
||||
|
||||
Reference in new issue
Block a user