[PR #871] [MERGED] shader_recompiler: Use correct integer type for OpImageWrite. #1812

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

📋 Pull Request Information

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

Base: mainHead: image-type


📝 Commits (1)

  • 47e5717 shader_recompiler: Use correct integer type for OpImageWrite.

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp (+1 -1)

📄 Description

PR https://github.com/shadps4-emu/shadPS4/pull/837 changed the integer type for OpImageWrite from U32 to S32, which introduced the following validation error when the image type is U32:

VUID-VkShaderModuleCreateInfo-pCode-08737: Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08737 ] | MessageID = 0xa5625282 | vkCreateShaderModule(): pCreateInfo->pCode (spirv-val produced an error):
Expected Image 'Sampled Type' to be the same as Texel components
  OpImageWrite %91 %92 %93

Instead, use buffer.result_type which is already either U32[4] or S32[4] depending on the image sampled type.

Fixes regressions reported in https://github.com/shadps4-emu/shadPS4/issues/869


🔄 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/871 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 9/11/2024 **Status:** ✅ Merged **Merged:** 9/11/2024 **Merged by:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Base:** `main` ← **Head:** `image-type` --- ### 📝 Commits (1) - [`47e5717`](https://github.com/shadps4-emu/shadPS4/commit/47e57174aa2ef700a43445cf3d3d5e30a058ace8) shader_recompiler: Use correct integer type for OpImageWrite. ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp` (+1 -1) </details> ### 📄 Description PR https://github.com/shadps4-emu/shadPS4/pull/837 changed the integer type for OpImageWrite from U32 to S32, which introduced the following validation error when the image type is U32: ``` VUID-VkShaderModuleCreateInfo-pCode-08737: Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08737 ] | MessageID = 0xa5625282 | vkCreateShaderModule(): pCreateInfo->pCode (spirv-val produced an error): Expected Image 'Sampled Type' to be the same as Texel components OpImageWrite %91 %92 %93 ``` Instead, use `buffer.result_type` which is already either U32[4] or S32[4] depending on the image sampled type. Fixes regressions reported in https://github.com/shadps4-emu/shadPS4/issues/869 --- <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:03 +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#1812
No description provided.