feat: update naga::back::spv::Function::to_words (#7156)

This commit is contained in:
Junjun Dong authored and GitHub committed 2025-02-16 21:43:24 -05:00
1 parent d8833d0798
commit 98649a79a0
3 files changed
+2 -3

No files matched your search

+1
View File
@@ -130,6 +130,7 @@ By @cwfitzgerald in [#7030](https://github.com/gfx-rs/wgpu/pull/7030).
- Support @must_use attribute on function declarations. By @turbocrime in [#6801](https://github.com/gfx-rs/wgpu/pull/6801).
- Support for generating the candidate intersections from AABB geometry, and confirming the hits. By @kvark in [#7047](https://github.com/gfx-rs/wgpu/pull/7047).
- Make naga::back::spv::Function::to_words write the OpFunctionEnd instruction in itself, instead of making another call after it. By @junjunjd in [#7156](https://github.com/gfx-rs/wgpu/pull/7156).
### Changes
-1
View File
@@ -510,7 +510,6 @@ impl Writer {
);
function.to_words(&mut self.logical_layout.function_definitions);
Instruction::function_end().to_words(&mut self.logical_layout.function_definitions);
self.ray_get_intersection_function = Some(func_id);
func_id
}
+1 -2
View File
@@ -40,6 +40,7 @@ impl Function {
instruction.to_words(sink);
}
}
Instruction::function_end().to_words(sink);
}
}
@@ -544,7 +545,6 @@ impl Writer {
function.consume(block, Instruction::return_value(return_id));
function.to_words(&mut self.logical_layout.function_definitions);
Instruction::function_end().to_words(&mut self.logical_layout.function_definitions);
Ok(())
}
@@ -947,7 +947,6 @@ impl Writer {
self.temp_list = temp_list;
function.to_words(&mut self.logical_layout.function_definitions);
Instruction::function_end().to_words(&mut self.logical_layout.function_definitions);
Ok(function_id)
}