Vulkan text support - #3582
Open
Wunka wants to merge 24 commits into
Open
Conversation
IntegratedQuantum
requested changes
Sep 7, 2026
Comment on lines
+1267
to
+1270
| textureRect: [4]f32 align(16), | ||
| offset: [2]f32 align(8), | ||
| fontEffects: c_int, | ||
| textureBounds: [4]f32 align(16), |
Member
There was a problem hiding this comment.
Suggested change
| textureRect: [4]f32 align(16), | |
| offset: [2]f32 align(8), | |
| fontEffects: c_int, | |
| textureBounds: [4]f32 align(16), | |
| glyphData: GlyphUniforms, |
| }}); | ||
| } | ||
|
|
||
| pub fn uploadGlyphs(self: Image, offset: i32, width: i32, height: i32, pitch: i32, data: []const u8) void { |
Member
There was a problem hiding this comment.
Why is this here? vulkan.zig is meant for low-level interfaces, glyphs definitely do not qualify
Contributor
Author
There was a problem hiding this comment.
.... yeah a lot of my things were not even needed.... I added now a config struct to UploadData, where we can add things if we want to configure more.
|
|
||
| pub fn uploadData(self: Image, offset: usize, data: []const u8) void { | ||
| const UploadDataConfig = struct { | ||
| bufferOffset: usize = 0, |
Member
There was a problem hiding this comment.
pointless, please remove
IntegratedQuantum
requested changes
Sep 8, 2026
IntegratedQuantum
requested changes
Sep 9, 2026
| } | ||
|
|
||
| pub fn uploadImage(self: Image, other: Image) void { | ||
| currentFrame.uploadCommands.copyImageToImage(self, c.VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, other, c.VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, &.{ |
Member
There was a problem hiding this comment.
You also need to add pipeline barriers (like the other code) to ensure that both images are in the right layout and to return the dest image to VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL
| c.glPixelStorei(c.GL_UNPACK_ALIGNMENT, 1); | ||
| c.glTexSubImage2D(c.GL_TEXTURE_2D, 0, textureOffset, 0, width, height, c.GL_RED, c.GL_UNSIGNED_BYTE, buffer); | ||
| if (main.settings.launchConfig.vulkanTestingMode) { | ||
| glyphTexture[0].vulkanImage.?.size = .{width, height, 1}; |
Member
There was a problem hiding this comment.
This is still wrong (see other comment)
IntegratedQuantum
requested changes
Sep 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.