mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-17 06:46:39 -04:00
render: unify render pass accessors
Introduce helper functions to retrieve backend-specific render passes from struct wlr_render_pass and replace ad-hoc internal accessors.
This commit is contained in:
parent
d8d61ffd49
commit
fce738d78d
11 changed files with 135 additions and 99 deletions
|
|
@ -1844,6 +1844,14 @@ static bool pipeline_key_equals(const struct wlr_vk_pipeline_key *a,
|
|||
return true;
|
||||
}
|
||||
|
||||
struct wlr_vk_renderer *wlr_vk_renderer_from_renderer(
|
||||
struct wlr_renderer *wlr_renderer) {
|
||||
assert(wlr_renderer->impl == &renderer_impl);
|
||||
|
||||
struct wlr_vk_renderer *renderer = wl_container_of(wlr_renderer, renderer, wlr_renderer);
|
||||
return renderer;
|
||||
}
|
||||
|
||||
// Initializes the pipeline for rendering textures and using the given
|
||||
// VkRenderPass and VkPipelineLayout.
|
||||
struct wlr_vk_pipeline *setup_get_or_create_pipeline(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue