mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 00:05:58 +03:00
[PR #2146] [MERGED] renderer: handle disabled clipping #2518
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#2518
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/2146
Author: @roamic
Created: 1/14/2025
Status: ✅ Merged
Merged: 1/18/2025
Merged by: @roamic
Base:
main← Head:fix-disabled-viewport📝 Commits (4)
50bbfc4renderer: handle disabled clip space092db68make the feature optional, add error log, remove window offsetb6f2ce3disable clipping for rect lists, apply vport transform172308aaccount for max viewport limit, add todo for ViewportIndex📊 Changes
11 files changed (+149 additions, -35 deletions)
View changed files
📝
src/shader_recompiler/backend/spirv/emit_spirv_special.cpp(+38 -0)📝
src/shader_recompiler/backend/spirv/spirv_emit_context.cpp(+23 -14)📝
src/shader_recompiler/info.h(+8 -0)📝
src/shader_recompiler/profile.h(+2 -0)📝
src/shader_recompiler/runtime_info.h(+3 -1)📝
src/video_core/renderer_vulkan/vk_graphics_pipeline.h(+6 -1)📝
src/video_core/renderer_vulkan/vk_instance.cpp(+6 -0)📝
src/video_core/renderer_vulkan/vk_instance.h(+8 -0)📝
src/video_core/renderer_vulkan/vk_pipeline_cache.cpp(+5 -0)📝
src/video_core/renderer_vulkan/vk_rasterizer.cpp(+49 -18)📝
src/video_core/renderer_vulkan/vk_rasterizer.h(+1 -1)📄 Description
Adds handling to the disabled clipping by creating a vertex shader permutation that converts vertex coordinates from clip space to screen space and fits them inside a huge (
[0..16383, 0..16383]) viewport. One shortcoming of this method is that it does not support multiple different viewport transformations but nothing can be done about this without hardware and API support.Also implicitly disables clipping for the
RECTLISTprimitive because this primitive should not be clipped, rather it should be culled.Other minor changes:
primitiveTopologyPatchListRestartif it is supported by the device to silence the validation errors.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.