Skip to content

Vulkan/D3D12: Fix HDR rendering, ribbon shaders, and pipeline barriers#18734

Merged
LibretroAdmin merged 3 commits intolibretro:masterfrom
MajorPainTheCactus:revert-mipmap-changes
Feb 16, 2026
Merged

Vulkan/D3D12: Fix HDR rendering, ribbon shaders, and pipeline barriers#18734
LibretroAdmin merged 3 commits intolibretro:masterfrom
MajorPainTheCactus:revert-mipmap-changes

Conversation

@MajorPainTheCactus
Copy link
Contributor

Summary

  • Fix Vulkan render pass / framebuffer format mismatch when rendering through the SDR offscreen buffer in HDR mode. The filter chain's final pass was using vk->render_pass (A2B10G10R10) while the offscreen buffer framebuffer was created with vk->sdr_render_pass (B8G8R8A8), causing a validation error on vkCmdBeginRenderPass
  • Fix incorrect srcStageMask in Vulkan image layout transition after HDR pipeline (SHADER_READ_BIT requires FRAGMENT_SHADER_BIT, not COLOR_ATTACHMENT_OUTPUT_BIT)
  • Update Vulkan and D3D12 ribbon shaders
  • Add missing Vulkan extension

@MajorPainTheCactus
Copy link
Contributor Author

@warmenhoven Here's the PR with all the Vulkan validation errors fixed AND the addition of the ribbon shaders adhering to the rest of the menu system and using the menu alpha instead of 1.0. The HDR version of XMB looks much more in line with the SDR version now. If you have the time please let me know if this fixes the issues you were seeing on MacOS and/or iOS so that we can get this merged. Thanks

Save point for in-progress gfx driver changes including
Vulkan ribbon shader updates and D3D12 fixes.
Fix render pass / framebuffer format mismatch when rendering through
the SDR offscreen buffer in HDR mode. The filter chain's final pass
and the frame render pass were using vk->render_pass (A2B10G10R10)
while the offscreen buffer framebuffer was created with
vk->sdr_render_pass (B8G8R8A8), causing a Vulkan validation error.

Select the correct render pass at frame time based on
use_offscreen_buffer, and rebuild the filter chain's final pass
pipeline to use the SDR render pass both at shader preset load and
at swapchain recreation.

Also fix an incorrect srcStageMask in the image layout transition
after the HDR pipeline: SHADER_READ_BIT requires FRAGMENT_SHADER_BIT,
not COLOR_ATTACHMENT_OUTPUT_BIT.
Change the alpha blend operation from ADD to MAX in the blend-enabled
pipeline states for both Vulkan and D3D12. This ensures the render
target alpha channel is always 1.0 (since the background establishes
alpha=1.0 and max(src, 1.0) preserves it) while leaving RGB blending
with SRC_ALPHA / ONE_MINUS_SRC_ALPHA completely unchanged.
@LibretroAdmin LibretroAdmin merged commit 394867d into libretro:master Feb 16, 2026
35 checks passed
@MajorPainTheCactus MajorPainTheCactus deleted the revert-mipmap-changes branch February 16, 2026 09:24
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

Comments