[PR #3076] [MERGED] shader_recompiler: Cleanup fragment attribute handling #3201

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3076
Author: @raphaelthegreat
Created: 6/10/2025
Status: Merged
Merged: 6/10/2025
Merged by: @georgemoralis

Base: mainHead: misc-fix


📝 Commits (3)

  • 0fe0047 image: Take minimum of mip levels
  • e2963a1 texture_cache: Update depth target image
  • cb3459a shader_recompiler: Cleanup fragment attribute handling

📊 Changes

4 files changed (+25 additions, -20 deletions)

View changed files

📝 src/shader_recompiler/backend/spirv/spirv_emit_context.cpp (+15 -13)
📝 src/shader_recompiler/frontend/translate/vector_interpolation.cpp (+7 -5)
📝 src/video_core/texture_cache/image.cpp (+2 -1)
📝 src/video_core/texture_cache/texture_cache.cpp (+1 -1)

📄 Description

Main purpose is to fix regression reported in https://github.com/shadps4-emu/shadPS4/pull/3055#issuecomment-2955788516 but I also placed some minor fixes I found in the process as well

The attribute indexing code was using the attribute semantic (i.e which vertex shader paramN output it uses) for indexing into arrays while the added interpolation code was using the fragment attribute index. This was confusing so I changed the code to always just index using the attribute number and only use the semantic for the location specifier in SPIRV


🔄 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/3076 **Author:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Created:** 6/10/2025 **Status:** ✅ Merged **Merged:** 6/10/2025 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `misc-fix` --- ### 📝 Commits (3) - [`0fe0047`](https://github.com/shadps4-emu/shadPS4/commit/0fe0047b52740ea8b2614bbd28c29a75a3188ce5) image: Take minimum of mip levels - [`e2963a1`](https://github.com/shadps4-emu/shadPS4/commit/e2963a19a30e0824bda5ecab54e38efa1d83cd81) texture_cache: Update depth target image - [`cb3459a`](https://github.com/shadps4-emu/shadPS4/commit/cb3459a6c5ceaf5cf91de37df6022382221959f7) shader_recompiler: Cleanup fragment attribute handling ### 📊 Changes **4 files changed** (+25 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `src/shader_recompiler/backend/spirv/spirv_emit_context.cpp` (+15 -13) 📝 `src/shader_recompiler/frontend/translate/vector_interpolation.cpp` (+7 -5) 📝 `src/video_core/texture_cache/image.cpp` (+2 -1) 📝 `src/video_core/texture_cache/texture_cache.cpp` (+1 -1) </details> ### 📄 Description Main purpose is to fix regression reported in https://github.com/shadps4-emu/shadPS4/pull/3055#issuecomment-2955788516 but I also placed some minor fixes I found in the process as well The attribute indexing code was using the attribute semantic (i.e which vertex shader paramN output it uses) for indexing into arrays while the added interpolation code was using the fragment attribute index. This was confusing so I changed the code to always just index using the attribute number and only use the semantic for the location specifier in SPIRV --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:02:48 +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#3201
No description provided.