diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-09-10 21:51:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-10 21:51:57 +0300 |
| commit | 425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch) | |
| tree | e52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/renderer/opengl | |
| parent | 90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff) | |
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/renderer/opengl')
| -rw-r--r-- | vendor/libghostty-vt/src/renderer/opengl/shaders.zig | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/vendor/libghostty-vt/src/renderer/opengl/shaders.zig b/vendor/libghostty-vt/src/renderer/opengl/shaders.zig index 68c1f36a..68d2babf 100644 --- a/vendor/libghostty-vt/src/renderer/opengl/shaders.zig +++ b/vendor/libghostty-vt/src/renderer/opengl/shaders.zig @@ -63,22 +63,16 @@ const PipelineDescription = struct { /// We create a type for the pipeline collection based on our desc array. const PipelineCollection = t: { - var fields: [pipeline_descs.len]std.builtin.Type.StructField = undefined; - for (pipeline_descs, 0..) |pipeline, i| { - fields[i] = .{ - .name = pipeline[0], - .type = Pipeline, - .default_value_ptr = null, - .is_comptime = false, - .alignment = @alignOf(Pipeline), - }; + const StructField = std.builtin.Type.StructField; + + var names: [pipeline_descs.len][]const u8 = undefined; + var types = [_]type{Pipeline} ** pipeline_descs.len; + var attrs = [_]StructField.Attributes{.{ .@"align" = @alignOf(Pipeline) }} ** pipeline_descs.len; + + for (pipeline_descs, &names) |pipeline, *name| { + name.* = pipeline[0]; } - break :t @Type(.{ .@"struct" = .{ - .layout = .auto, - .fields = &fields, - .decls = &.{}, - .is_tuple = false, - } }); + break :t @Struct(.auto, null, &names, &types, &attrs); }; /// This contains the state for the shaders used by the Metal renderer. |
