[PR #1032] [MERGED] shader_recompiler: Increase push constants user data to full capacity. #1893

Closed
opened 2026-02-27 21:14:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1032
Author: @squidbus
Created: 9/23/2024
Status: Merged
Merged: 9/23/2024
Merged by: @raphaelthegreat

Base: mainHead: ud-regs


📝 Commits (1)

  • 5cd0d73 shader_recompiler: Increase push constants user data to full capacity.

📊 Changes

2 files changed (+10 additions, -4 deletions)

View changed files

📝 src/shader_recompiler/backend/spirv/spirv_emit_context.cpp (+6 -2)
📝 src/shader_recompiler/info.h (+4 -2)

📄 Description

  • Increase push constants user data regs capacity to full number of user data regs.
  • Add compile-time assert that push data size is less than or equal to minimum guaranteed by the Vulkan spec.
  • Add assert to PushUd that indices don't exceed user data capacity, to prevent unnoticed memory corruption.

Fixes at least one shader regressed by https://github.com/shadps4-emu/shadPS4/pull/1013 in CUSA16429 which uses 10 user data registers.


🔄 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/1032 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 9/23/2024 **Status:** ✅ Merged **Merged:** 9/23/2024 **Merged by:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Base:** `main` ← **Head:** `ud-regs` --- ### 📝 Commits (1) - [`5cd0d73`](https://github.com/shadps4-emu/shadPS4/commit/5cd0d7386ca13d5aa4920421a683fed3d38da12d) shader_recompiler: Increase push constants user data to full capacity. ### 📊 Changes **2 files changed** (+10 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/shader_recompiler/backend/spirv/spirv_emit_context.cpp` (+6 -2) 📝 `src/shader_recompiler/info.h` (+4 -2) </details> ### 📄 Description * Increase push constants user data regs capacity to full number of user data regs. * Add compile-time assert that push data size is less than or equal to minimum guaranteed by the Vulkan spec. * Add assert to `PushUd` that indices don't exceed user data capacity, to prevent unnoticed memory corruption. Fixes at least one shader regressed by https://github.com/shadps4-emu/shadPS4/pull/1013 in CUSA16429 which uses 10 user data registers. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:14:21 +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#1893
No description provided.