| ... | @@ -20,30 +20,6 @@ pub extern const global_invocation_id: @Vector(3, u32) addrspace(.input); | ... | @@ -20,30 +20,6 @@ pub extern const global_invocation_id: @Vector(3, u32) addrspace(.input); |
| 20 | pub extern const vertex_index: u32 addrspace(.input); | 20 | pub extern const vertex_index: u32 addrspace(.input); |
| 21 | pub extern const instance_index: u32 addrspace(.input); | 21 | pub extern const instance_index: u32 addrspace(.input); |
| 22 | | 22 | |
| 23 | /// Forms the main linkage for `input` and `output` address spaces. | | |
| 24 | /// `ptr` must be a reference to variable or struct field. | | |
| 25 | pub fn location(comptime ptr: anytype, comptime loc: u32) void { | | |
| 26 | asm volatile ( | | |
| 27 | \\OpDecorate %ptr Location $loc | | |
| 28 | : | | |
| 29 | : [ptr] "" (ptr), | | |
| 30 | [loc] "c" (loc), | | |
| 31 | ); | | |
| 32 | } | | |
| 33 | | | |
| 34 | /// Forms the main linkage for `input` and `output` address spaces. | | |
| 35 | /// `ptr` must be a reference to variable or struct field. | | |
| 36 | pub fn binding(comptime ptr: anytype, comptime set: u32, comptime bind: u32) void { | | |
| 37 | asm volatile ( | | |
| 38 | \\OpDecorate %ptr DescriptorSet $set | | |
| 39 | \\OpDecorate %ptr Binding $bind | | |
| 40 | : | | |
| 41 | : [ptr] "" (ptr), | | |
| 42 | [set] "c" (set), | | |
| 43 | [bind] "c" (bind), | | |
| 44 | ); | | |
| 45 | } | | |
| 46 | | | |
| 47 | pub const ExecutionMode = union(Tag) { | 23 | pub const ExecutionMode = union(Tag) { |
| 48 | /// Sets origin of the framebuffer to the upper-left corner | 24 | /// Sets origin of the framebuffer to the upper-left corner |
| 49 | origin_upper_left, | 25 | origin_upper_left, |