aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-06-07 20:46:33 +0200
committerSimon Ser <contact@emersion.fr>2023-06-07 20:46:33 +0200
commitfd9e4b860fa8a742dfd4c67f1d546ab71a5b8fda (patch)
tree49a2bcfd6fce0b1e31b13b3664ba8af14ebf73fe
parent1b947c08c66c039ce44caeaa35de9f0f455206b8 (diff)
render/vulkan: fix bound pipeline check for output_pipe
renderer->bound_pipe is legacy, pass->bound_pipeline is used for the render pass API code-path. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3657
-rw-r--r--render/vulkan/pass.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/render/vulkan/pass.c b/render/vulkan/pass.c
index ac0ba263..73ab8a3c 100644
--- a/render/vulkan/pass.c
+++ b/render/vulkan/pass.c
@@ -82,12 +82,6 @@ static bool render_pass_submit(struct wlr_render_pass *wlr_pass) {
// Apply output shader to map blend image to actual output image
vkCmdNextSubpass(render_cb->vk, VK_SUBPASS_CONTENTS_INLINE);
- VkPipeline pipe = render_buffer->render_setup->output_pipe;
- if (pipe != renderer->bound_pipe) {
- vkCmdBindPipeline(render_cb->vk, VK_PIPELINE_BIND_POINT_GRAPHICS, pipe);
- renderer->bound_pipe = pipe;
- }
-
float final_matrix[9] = {
renderer->render_width, 0, -1,
0, renderer->render_height, -1,
@@ -99,6 +93,7 @@ static bool render_pass_submit(struct wlr_render_pass *wlr_pass) {
};
mat3_to_mat4(final_matrix, vert_pcr_data.mat4);
+ bind_pipeline(pass, render_buffer->render_setup->output_pipe);
vkCmdPushConstants(render_cb->vk, renderer->output_pipe_layout,
VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(vert_pcr_data), &vert_pcr_data);
vkCmdBindDescriptorSets(render_cb->vk,