mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-18 22:05:48 -05:00
render/vulkan: Dynamically create texture views
Now that we are dynamically creating pipeline layouts, we need separate texture views for each pipeline layout we choose to use with a texture.
This commit is contained in:
parent
7c5a3afd60
commit
3ee0f52e09
4 changed files with 62 additions and 33 deletions
|
|
@ -555,10 +555,17 @@ static void render_pass_add_texture(struct wlr_render_pass *wlr_pass,
|
|||
return;
|
||||
}
|
||||
|
||||
struct wlr_vk_texture_view *view =
|
||||
vulkan_texture_get_or_create_view(texture, pipe->layout);
|
||||
if (!view) {
|
||||
pass->failed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
bind_pipeline(pass, pipe->vk);
|
||||
|
||||
vkCmdBindDescriptorSets(cb, VK_PIPELINE_BIND_POINT_GRAPHICS,
|
||||
pipe->layout->vk, 0, 1, &texture->ds, 0, NULL);
|
||||
pipe->layout->vk, 0, 1, &view->ds, 0, NULL);
|
||||
|
||||
vkCmdPushConstants(cb, pipe->layout->vk,
|
||||
VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(vert_pcr_data), &vert_pcr_data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue