Skip to content

Vulkan: Fix HDR pipeline blend factors and quad vertex buffer handling#18678

Merged
LibretroAdmin merged 1 commit intolibretro:masterfrom
MajorPainTheCactus:vulkan-hdr-pipeline-fixes
Feb 2, 2026
Merged

Vulkan: Fix HDR pipeline blend factors and quad vertex buffer handling#18678
LibretroAdmin merged 1 commit intolibretro:masterfrom
MajorPainTheCactus:vulkan-hdr-pipeline-fixes

Conversation

@MajorPainTheCactus
Copy link
Copy Markdown
Contributor

Summary

  • Set explicit HDR blend factors: Adds VK_BLEND_FACTOR_ONE (src) and VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA (dst) to the HDR pipeline blend attachment for correct alpha compositing
  • Guard buffer allocation: Checks the return value of vulkan_buffer_chain_alloc before writing vertices, and moves vkCmdBindVertexBuffers/vkCmdDraw inside the success block to avoid drawing with invalid buffers
  • Replace quad macro with explicit vertices: Replaces the VULKAN_WRITE_QUAD_VBO macro with explicit per-vertex definitions for the fullscreen HDR quad, improving clarity and avoiding potential macro expansion issues

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.
@LibretroAdmin LibretroAdmin merged commit 34debba into libretro:master Feb 2, 2026
35 checks passed
@MajorPainTheCactus MajorPainTheCactus deleted the vulkan-hdr-pipeline-fixes branch February 16, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants