Vulkan: Fix HDR pipeline blend factors and quad vertex buffer handling#18678
Merged
LibretroAdmin merged 1 commit intolibretro:masterfrom Feb 2, 2026
Merged
Conversation
Set explicit blend factors (src=ONE, dst=ONE_MINUS_SRC_ALPHA) on the HDR pipeline blend attachment for correct alpha compositing. Refactor vulkan_run_hdr_pipeline to check the return value of vulkan_buffer_chain_alloc before writing vertices, replace the VULKAN_WRITE_QUAD_VBO macro with explicit vertex definitions for clarity, and move vkCmdBindVertexBuffers/vkCmdDraw inside the allocation success block to avoid drawing with invalid buffers.
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.
Summary
VK_BLEND_FACTOR_ONE(src) andVK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA(dst) to the HDR pipeline blend attachment for correct alpha compositingvulkan_buffer_chain_allocbefore writing vertices, and movesvkCmdBindVertexBuffers/vkCmdDrawinside the success block to avoid drawing with invalid buffersVULKAN_WRITE_QUAD_VBOmacro with explicit per-vertex definitions for the fullscreen HDR quad, improving clarity and avoiding potential macro expansion issues