[PR #1859] [MERGED] renderer_vulkan: Make sure at least one viewport is set #2350

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1859
Author: @squidbus
Created: 12/24/2024
Status: Merged
Merged: 12/25/2024
Merged by: @raphaelthegreat

Base: mainHead: viewport


📝 Commits (1)

  • 58232c0 renderer_vulkan: Make sure at least one viewport is set

📊 Changes

2 files changed (+61 additions, -66 deletions)

View changed files

📝 src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp (+8 -22)
📝 src/video_core/renderer_vulkan/vk_rasterizer.cpp (+53 -44)

📄 Description

Avoids a validation error when all viewports are disabled, by inserting a dummy viewport and scissor making sure there is at least one defined as required by Vulkan spec.

Additionally:

  • Changes dynamic viewport/scissor state to include count using eViewportWithCountEXT/eScissorWithCountEXT from VK_EXT_extended_dynamic_state. Allows removing initial viewport/scissor and counts from the pipeline definition.
  • Consolidates the viewport and scissor calculations into one loop instead of splitting over two, plus some other minor tidying of the logic.

🔄 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/1859 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 12/24/2024 **Status:** ✅ Merged **Merged:** 12/25/2024 **Merged by:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Base:** `main` ← **Head:** `viewport` --- ### 📝 Commits (1) - [`58232c0`](https://github.com/shadps4-emu/shadPS4/commit/58232c0c23d009565aaf12a09c8880615b8cd876) renderer_vulkan: Make sure at least one viewport is set ### 📊 Changes **2 files changed** (+61 additions, -66 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp` (+8 -22) 📝 `src/video_core/renderer_vulkan/vk_rasterizer.cpp` (+53 -44) </details> ### 📄 Description Avoids a validation error when all viewports are disabled, by inserting a dummy viewport and scissor making sure there is at least one defined as required by Vulkan spec. Additionally: * Changes dynamic viewport/scissor state to include count using `eViewportWithCountEXT`/`eScissorWithCountEXT` from `VK_EXT_extended_dynamic_state`. Allows removing initial viewport/scissor and counts from the pipeline definition. * Consolidates the viewport and scissor calculations into one loop instead of splitting over two, plus some other minor tidying of the logic. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:16:10 +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#2350
No description provided.