[PR #3541] [MERGED] shader_recompiler: Support PointSize and ViewportIndex attributes. #3556

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3541
Author: @squidbus
Created: 9/6/2025
Status: Merged
Merged: 9/7/2025
Merged by: @squidbus

Base: mainHead: vpid


📝 Commits (1)

  • c7c3f21 shader_recompiler: Support PointSize and ViewportIndex attributes.

📊 Changes

12 files changed (+83 additions, -36 deletions)

View changed files

📝 src/shader_recompiler/backend/spirv/emit_spirv.cpp (+11 -3)
📝 src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp (+8 -3)
📝 src/shader_recompiler/backend/spirv/emit_spirv_special.cpp (+3 -0)
📝 src/shader_recompiler/backend/spirv/spirv_emit_context.cpp (+9 -1)
📝 src/shader_recompiler/backend/spirv/spirv_emit_context.h (+2 -0)
📝 src/shader_recompiler/info.h (+1 -0)
📝 src/shader_recompiler/ir/attribute.cpp (+6 -4)
📝 src/shader_recompiler/ir/attribute.h (+3 -2)
📝 src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp (+4 -1)
📝 src/shader_recompiler/ir/position.h (+27 -14)
📝 src/shader_recompiler/runtime_info.h (+3 -3)
📝 src/video_core/renderer_vulkan/vk_pipeline_cache.cpp (+6 -5)

📄 Description

Adds support for the PointSize and ViewportIndex pre-rasterization attribute exports, with the appropriate capabilities set for each pre-rasterization stage.

Note that it asserts for ViewportIndex if clip space conversion in-shader is needed, as the push constants only fit the first viewport currently. Hopefully a rare case if hit at all.

Fixes Unhandled output 1 on attribute Position1 and Unhandled output 6 on attribute Position1 asserts.


🔄 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/3541 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 9/6/2025 **Status:** ✅ Merged **Merged:** 9/7/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `vpid` --- ### 📝 Commits (1) - [`c7c3f21`](https://github.com/shadps4-emu/shadPS4/commit/c7c3f212bf39c819ceb8cdbd21506e76e579571a) shader_recompiler: Support PointSize and ViewportIndex attributes. ### 📊 Changes **12 files changed** (+83 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `src/shader_recompiler/backend/spirv/emit_spirv.cpp` (+11 -3) 📝 `src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp` (+8 -3) 📝 `src/shader_recompiler/backend/spirv/emit_spirv_special.cpp` (+3 -0) 📝 `src/shader_recompiler/backend/spirv/spirv_emit_context.cpp` (+9 -1) 📝 `src/shader_recompiler/backend/spirv/spirv_emit_context.h` (+2 -0) 📝 `src/shader_recompiler/info.h` (+1 -0) 📝 `src/shader_recompiler/ir/attribute.cpp` (+6 -4) 📝 `src/shader_recompiler/ir/attribute.h` (+3 -2) 📝 `src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp` (+4 -1) 📝 `src/shader_recompiler/ir/position.h` (+27 -14) 📝 `src/shader_recompiler/runtime_info.h` (+3 -3) 📝 `src/video_core/renderer_vulkan/vk_pipeline_cache.cpp` (+6 -5) </details> ### 📄 Description Adds support for the `PointSize` and `ViewportIndex` pre-rasterization attribute exports, with the appropriate capabilities set for each pre-rasterization stage. Note that it asserts for `ViewportIndex` if clip space conversion in-shader is needed, as the push constants only fit the first viewport currently. Hopefully a rare case if hit at all. Fixes `Unhandled output 1 on attribute Position1` and `Unhandled output 6 on attribute Position1` asserts. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:04:08 +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#3556
No description provided.