aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv/Section.zig
diff options
context:
space:
mode:
authorRobin Voetter <robin@voetter.nl>2022-11-29 23:44:31 +0100
committerRobin Voetter <robin@voetter.nl>2023-04-09 01:51:51 +0200
commit8a00ec162c76ef28cbbca59a7124d7d175a77e97 (patch)
treecaa6c579cb256603f8d5e08a52c0eb627c31a98b /src/codegen/spirv/Section.zig
parent700dee34d5c7bdedc678032689c761e3a417fa03 (diff)
downloadzig-8a00ec162c76ef28cbbca59a7124d7d175a77e97.tar.gz
zig-8a00ec162c76ef28cbbca59a7124d7d175a77e97.zip
spirv: more fixes and improvements
- Formatting. - Improve `decorate` helper function to generate a decoration for a result-id. - Reorder some functions in a more logical way
Diffstat (limited to 'src/codegen/spirv/Section.zig')
-rw-r--r--src/codegen/spirv/Section.zig28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/codegen/spirv/Section.zig b/src/codegen/spirv/Section.zig
index 2fd8309261..ce40717ef3 100644
--- a/src/codegen/spirv/Section.zig
+++ b/src/codegen/spirv/Section.zig
@@ -65,34 +65,6 @@ pub fn emit(
section.writeOperands(opcode.Operands(), operands);
}
-/// Decorate a result-id.
-pub fn decorate(
- section: *Section,
- allocator: Allocator,
- target: spec.IdRef,
- decoration: spec.Decoration.Extended,
-) !void {
- try section.emit(allocator, .OpDecorate, .{
- .target = target,
- .decoration = decoration,
- });
-}
-
-/// Decorate a result-id which is a member of some struct.
-pub fn decorateMember(
- section: *Section,
- allocator: Allocator,
- structure_type: spec.IdRef,
- member: u32,
- decoration: spec.Decoration.Extended,
-) !void {
- try section.emit(allocator, .OpMemberDecorate, .{
- .structure_type = structure_type,
- .member = member,
- .decoration = decoration,
- });
-}
-
pub fn writeWord(section: *Section, word: Word) void {
section.instructions.appendAssumeCapacity(word);
}