mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[spv-out] Fix write_function returning block id
This commit is contained in:
committed by
Dzmitry Malyshau
parent
6de675313b
commit
b56c2ddbdc
@@ -311,23 +311,23 @@ impl Writer {
|
||||
parameter_type_ids,
|
||||
};
|
||||
|
||||
let id = self.generate_id();
|
||||
let function_id = self.generate_id();
|
||||
let function_type =
|
||||
self.get_function_type(lookup_function_type, function_parameter_pointer_ids);
|
||||
function.signature = Some(super::instructions::instruction_function(
|
||||
return_type_id,
|
||||
id,
|
||||
function_id,
|
||||
spirv::FunctionControl::empty(),
|
||||
function_type,
|
||||
));
|
||||
|
||||
let id = self.write_block(&ir_function.body, ir_module, ir_function, &mut function);
|
||||
self.write_block(&ir_function.body, ir_module, ir_function, &mut function);
|
||||
|
||||
function.to_words(&mut self.logical_layout.function_definitions);
|
||||
super::instructions::instruction_function_end()
|
||||
.to_words(&mut self.logical_layout.function_definitions);
|
||||
|
||||
id
|
||||
function_id
|
||||
}
|
||||
|
||||
// TODO Move to instructions module
|
||||
|
||||
Reference in New Issue
Block a user