[PR #4053] [CLOSED] Fix fragment StencilRef export path in SPIR-V backend #3900

Closed
opened 2026-02-27 22:05:23 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/4053
Author: @OhLookWeGOTit
Created: 2/19/2026
Status: Closed

Base: mainHead: main


📝 Commits (5)

📊 Changes

8 files changed (+24 additions, -2 deletions)

View changed files

📝 externals/CLI11 (+1 -1)
📝 externals/sdl3 (+1 -1)
📝 src/shader_recompiler/backend/spirv/emit_spirv.cpp (+5 -0)
📝 src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp (+10 -0)
📝 src/shader_recompiler/backend/spirv/spirv_emit_context.cpp (+4 -0)
📝 src/shader_recompiler/backend/spirv/spirv_emit_context.h (+1 -0)
📝 src/shader_recompiler/profile.h (+1 -0)
📝 src/video_core/renderer_vulkan/vk_pipeline_cache.cpp (+1 -0)

📄 Description

The issue was that Stencil Ref writes were going through a broken SPIR-V path: it used an invalid access chain and could try writing to an output that wasn’t actually declared. So even when a game asked to export stencil ref, behavior wasn’t reliable.

This fixes some regressions in Dragon Engine titles started from v0.11.0 and Yakuza 6 Blue Jacket demo crashes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/4053 **Author:** [@OhLookWeGOTit](https://github.com/OhLookWeGOTit) **Created:** 2/19/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (5) - [`e02dee6`](https://github.com/shadps4-emu/shadPS4/commit/e02dee61382ee09dbae5e880441fcde5d917b8e8) Fix fragment StencilRef export path in SPIR-V backend - [`892b069`](https://github.com/shadps4-emu/shadPS4/commit/892b069ce626ce9046e0976ede808210d7be7364) Merge branch 'main' of https://github.com/shadps4-emu/shadPS4 - [`2a1f4b0`](https://github.com/shadps4-emu/shadPS4/commit/2a1f4b0bebba99c3db9ebc337918ee164cd1f3b8) Fix fragment StencilRef export path in SPIR-V backend - [`fbb017b`](https://github.com/shadps4-emu/shadPS4/commit/fbb017b50b93a52e6f00b85c604ffca70d893ada) Fix clang-format in StencilRef export path - [`53c3bbf`](https://github.com/shadps4-emu/shadPS4/commit/53c3bbf6487523ab0b69bbc26a87722332b2e9de) Merge branch 'main' into main ### 📊 Changes **8 files changed** (+24 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `externals/CLI11` (+1 -1) 📝 `externals/sdl3` (+1 -1) 📝 `src/shader_recompiler/backend/spirv/emit_spirv.cpp` (+5 -0) 📝 `src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp` (+10 -0) 📝 `src/shader_recompiler/backend/spirv/spirv_emit_context.cpp` (+4 -0) 📝 `src/shader_recompiler/backend/spirv/spirv_emit_context.h` (+1 -0) 📝 `src/shader_recompiler/profile.h` (+1 -0) 📝 `src/video_core/renderer_vulkan/vk_pipeline_cache.cpp` (+1 -0) </details> ### 📄 Description The issue was that Stencil Ref writes were going through a broken SPIR-V path: it used an invalid access chain and could try writing to an output that wasn’t actually declared. So even when a game asked to export stencil ref, behavior wasn’t reliable. This fixes some regressions in Dragon Engine titles started from v0.11.0 and Yakuza 6 Blue Jacket demo crashes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:05:23 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3900
No description provided.