[PR #477] [MERGED] Fix gcc compilation error in vk_graphics_pipeline.cpp #1588

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/477
Author: @Random06457
Created: 8/19/2024
Status: Merged
Merged: 8/19/2024
Merged by: @georgemoralis

Base: mainHead: compilation-fix


📝 Commits (1)

  • a2e766d fix gcc compilation error in vk_graphics_pipeline.cpp

📊 Changes

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

View changed files

📝 src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp (+9 -8)

📄 Description

The main branch currently doesn't compile with GCC.

GCC fails to infer the type of the two parts of a ternary expression whose types are different but both contain an implicit cast operator to the same type.

See example here: https://godbolt.org/z/Y5KdM77EW

Maybe adding a GCC pipeline to the CI could be a good idea for GCC/Clang differences(?)


🔄 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/477 **Author:** [@Random06457](https://github.com/Random06457) **Created:** 8/19/2024 **Status:** ✅ Merged **Merged:** 8/19/2024 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `compilation-fix` --- ### 📝 Commits (1) - [`a2e766d`](https://github.com/shadps4-emu/shadPS4/commit/a2e766dbd2785ca0d6943929552789c7b09ca75b) fix gcc compilation error in vk_graphics_pipeline.cpp ### 📊 Changes **1 file changed** (+9 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp` (+9 -8) </details> ### 📄 Description The main branch currently doesn't compile with GCC. GCC fails to infer the type of the two parts of a ternary expression whose types are different but both contain an implicit cast operator to the same type. See example here: https://godbolt.org/z/Y5KdM77EW Maybe adding a GCC pipeline to the CI could be a good idea for GCC/Clang differences(?) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:13:11 +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#1588
No description provided.