diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-06-16 19:20:03 -0400 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2023-06-16 19:20:03 -0400 |
commit | 9d31372930eb061e1a5f43fa7e0cb27e2ffa197a (patch) | |
tree | 01eccc97fc146025ec7a77e0b82f4282e3739d9d /render/vulkan/pass.c | |
parent | 97fdd57eb2ae4b9c076430fa5293c60a83f07447 (diff) |
render/vulkan: Handle quad pipeline through generic pipeline path
Diffstat (limited to 'render/vulkan/pass.c')
-rw-r--r-- | render/vulkan/pass.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/render/vulkan/pass.c b/render/vulkan/pass.c index 0a2d666d..9b060239 100644 --- a/render/vulkan/pass.c +++ b/render/vulkan/pass.c @@ -432,13 +432,24 @@ static void render_pass_add_rect(struct wlr_render_pass *wlr_pass, wlr_matrix_project_box(matrix, &options->box, WL_OUTPUT_TRANSFORM_NORMAL, 0, proj); wlr_matrix_multiply(matrix, pass->projection, matrix); + struct wlr_vk_pipeline *pipe = setup_get_or_create_pipeline( + pass->render_buffer->render_setup, + &(struct wlr_vk_pipeline_key) { + .source = WLR_VK_SHADER_SOURCE_SINGLE_COLOR, + .layout = &renderer->default_pipeline_layout, + }); + if (!pipe) { + pass->failed = true; + break; + } + struct wlr_vk_vert_pcr_data vert_pcr_data = { .uv_off = { 0, 0 }, .uv_size = { 1, 1 }, }; mat3_to_mat4(matrix, vert_pcr_data.mat4); - bind_pipeline(pass, pass->render_buffer->render_setup->quad_pipe); + bind_pipeline(pass, pipe->vk); vkCmdPushConstants(cb, renderer->default_pipeline_layout.vk, VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(vert_pcr_data), &vert_pcr_data); vkCmdPushConstants(cb, renderer->default_pipeline_layout.vk, @@ -534,6 +545,7 @@ static void render_pass_add_texture(struct wlr_render_pass *wlr_pass, struct wlr_vk_pipeline *pipe = setup_get_or_create_pipeline( render_buffer->render_setup, &(struct wlr_vk_pipeline_key) { + .source = WLR_VK_SHADER_SOURCE_TEXTURE, .layout = texture->pipeline_layout, .texture_transform = texture->transform, }); |