[PR #2793] [MERGED] shader_recompiler: Implement S_FLBIT_I32_B32 and V_MUL_HI_I32. #2983

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/2793
Author: @squidbus
Created: 4/16/2025
Status: Merged
Merged: 4/16/2025
Merged by: @georgemoralis

Base: mainHead: flbit-mul


📝 Commits (1)

  • 9274552 shader_recompiler: Implement S_FLBIT_I32_B32 and V_MUL_HI_I32.

📊 Changes

8 files changed (+33 additions, -12 deletions)

View changed files

📝 src/shader_recompiler/backend/spirv/emit_spirv_instructions.h (+2 -2)
📝 src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp (+9 -4)
📝 src/shader_recompiler/frontend/translate/scalar_alu.cpp (+13 -0)
📝 src/shader_recompiler/frontend/translate/translate.h (+1 -0)
📝 src/shader_recompiler/frontend/translate/vector_alu.cpp (+3 -1)
📝 src/shader_recompiler/ir/ir_emitter.cpp (+2 -2)
📝 src/shader_recompiler/ir/ir_emitter.h (+1 -1)
📝 src/shader_recompiler/ir/opcodes.inc (+2 -2)

📄 Description

  • Implement S_FLBIT_I32_B32 same as V_FFBH_U32, since they seem to do the same thing but for scalar vs vector.
  • Implement V_MUL_HI_I32. Added casting to the SPIR-V implementation to satisfy type rules for OpSMulExtended, which relies on the fact that our other integer instructions always produce U32 to be valid. Refactored the IR instructions to just return the hi component to make this casting easier.

🔄 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/2793 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 4/16/2025 **Status:** ✅ Merged **Merged:** 4/16/2025 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `flbit-mul` --- ### 📝 Commits (1) - [`9274552`](https://github.com/shadps4-emu/shadPS4/commit/9274552e396cb8264cf8c5b05914009ecca307cb) shader_recompiler: Implement S_FLBIT_I32_B32 and V_MUL_HI_I32. ### 📊 Changes **8 files changed** (+33 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `src/shader_recompiler/backend/spirv/emit_spirv_instructions.h` (+2 -2) 📝 `src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp` (+9 -4) 📝 `src/shader_recompiler/frontend/translate/scalar_alu.cpp` (+13 -0) 📝 `src/shader_recompiler/frontend/translate/translate.h` (+1 -0) 📝 `src/shader_recompiler/frontend/translate/vector_alu.cpp` (+3 -1) 📝 `src/shader_recompiler/ir/ir_emitter.cpp` (+2 -2) 📝 `src/shader_recompiler/ir/ir_emitter.h` (+1 -1) 📝 `src/shader_recompiler/ir/opcodes.inc` (+2 -2) </details> ### 📄 Description * Implement `S_FLBIT_I32_B32` same as `V_FFBH_U32`, since they seem to do the same thing but for scalar vs vector. * Implement `V_MUL_HI_I32`. Added casting to the SPIR-V implementation to satisfy type rules for `OpSMulExtended`, which relies on the fact that our other integer instructions always produce `U32` to be valid. Refactored the IR instructions to just return the `hi` component to make this casting easier. --- <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:00 +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#2983
No description provided.