Repository navigation
feat(renderer): Vulkan render target and test path - #29
Merged
Merged
Conversation
Add renderer::skia_vk behind a `vulkan` feature: it wraps a host-owned VkImage as a top-left Skia render target and draws a scene into it, the counterpart of skia_fbo. skia_fbo and the C renderer API move behind a `gl` feature, on by default; gl-rs becomes a dev-dependency and the unused GL import in drawing/scene.rs goes. tests/vulkan_image_cache.rs renders an image-cached layer into a VkImage created with ash (dev-dependency only) and checks it against the raster path. It skips where no Vulkan device is available.
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.
Adds
renderer::skia_vk, behind a newvulkanfeature. It wraps aVkImagethe host owns as a Skia render target with a top-left origin, and draws a scene into it, much asskia_fbodoes for a GL framebuffer. lay-rs still loads no Vulkan itself: the host creates the instance, the device, theDirectContextand the image, and passes raw handles as Skia's own Vulkan types.skia_fboand the C renderer API now sit behind aglfeature. It is in the default set, so crates that keep default features see no change.gl-rswas only used by tests, so it moves to dev-dependencies. The unused GLdirect_contextsimport indrawing/scene.rsis gone. The engine is untouched.tests/vulkan_image_cache.rsis a headless test of the GPU image-cache path on Vulkan. It usesash, which is a dev-dependency only, to pick a device with a graphics queue and create a device-local RGBA8 image, then renders a scene with an image-cached layer throughskia_vk. It checks that the cache surface was allocated on the Vulkan context and reused on the next frame, and that both the frame and a GPU subtree buffer match the raster render. Where no Vulkan device is available the test prints a note and returns.Run it with: