[PR #3420] [MERGED] ir: Perform degamma in shader when sampler sets force_degamma #3454

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3420
Author: @raphaelthegreat
Created: 8/15/2025
Status: Merged
Merged: 8/19/2025
Merged by: @squidbus

Base: mainHead: force_degamma


📝 Commits (2)

  • ce048e9 ir: Perform degamma in shader when sampler sets force_degamma
  • 3636193 specialization: Add srgb if image is sampled

📊 Changes

12 files changed (+82 additions, -43 deletions)

View changed files

📝 src/shader_recompiler/backend/spirv/emit_spirv_floating_point.cpp (+4 -0)
📝 src/shader_recompiler/backend/spirv/emit_spirv_instructions.h (+1 -0)
📝 src/shader_recompiler/info.h (+0 -11)
📝 src/shader_recompiler/ir/ir_emitter.cpp (+4 -0)
📝 src/shader_recompiler/ir/ir_emitter.h (+1 -0)
📝 src/shader_recompiler/ir/opcodes.inc (+1 -0)
📝 src/shader_recompiler/ir/passes/resource_tracking_pass.cpp (+7 -4)
📝 src/shader_recompiler/ir/reinterpret.h (+31 -1)
📝 src/shader_recompiler/specialization.h (+6 -1)
📝 src/video_core/amdgpu/pixel_format.h (+9 -0)
📝 src/video_core/amdgpu/resource.h (+0 -5)
📝 src/video_core/texture_cache/sampler.cpp (+18 -21)

📄 Description

This is simpler than trying to adjust image format to be SRGB when binding. It could also be possible for an image binding to be used with different samplers (in which case it would be wrong to change image format).


🔄 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/3420 **Author:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Created:** 8/15/2025 **Status:** ✅ Merged **Merged:** 8/19/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `force_degamma` --- ### 📝 Commits (2) - [`ce048e9`](https://github.com/shadps4-emu/shadPS4/commit/ce048e9a1ad217df6b8c6a0cd929f96cb7116085) ir: Perform degamma in shader when sampler sets force_degamma - [`3636193`](https://github.com/shadps4-emu/shadPS4/commit/3636193267940d43ae4c579a8c2aff041da94e92) specialization: Add srgb if image is sampled ### 📊 Changes **12 files changed** (+82 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `src/shader_recompiler/backend/spirv/emit_spirv_floating_point.cpp` (+4 -0) 📝 `src/shader_recompiler/backend/spirv/emit_spirv_instructions.h` (+1 -0) 📝 `src/shader_recompiler/info.h` (+0 -11) 📝 `src/shader_recompiler/ir/ir_emitter.cpp` (+4 -0) 📝 `src/shader_recompiler/ir/ir_emitter.h` (+1 -0) 📝 `src/shader_recompiler/ir/opcodes.inc` (+1 -0) 📝 `src/shader_recompiler/ir/passes/resource_tracking_pass.cpp` (+7 -4) 📝 `src/shader_recompiler/ir/reinterpret.h` (+31 -1) 📝 `src/shader_recompiler/specialization.h` (+6 -1) 📝 `src/video_core/amdgpu/pixel_format.h` (+9 -0) 📝 `src/video_core/amdgpu/resource.h` (+0 -5) 📝 `src/video_core/texture_cache/sampler.cpp` (+18 -21) </details> ### 📄 Description This is simpler than trying to adjust image format to be SRGB when binding. It could also be possible for an image binding to be used with different samplers (in which case it would be wrong to change image format). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:03:45 +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#3454
No description provided.