tessellation: run Gran Turismo 7's patches #1919
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1919
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1919"
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?
@ew-sudo on GitHub · 2026-10-26 19:26 UTC · original
ew-sudo:pr-gt7-tessellation→main· +134 −37 · 3 files · 5 commits · openGran Turismo 7 (PPSA01317) stopped in the tessellation analysis as soon as its cars or tracks were drawn. This series adds what its LS/HS/TES need on top of the current tessellation code. It keeps the recent work (strides across branches, patch constants, control-point read-back, looped HS reflection) and does not replace it.
VGT_TF_PARAM.TYPE 2(quads, 4 outer + 2 inner factors),TOPOLOGY 3(CCW), fractional-even spacing, and power-of-two approximated by equal spacing.(ID & 0x1f00) + (ordinal << 10).ActiveAddress): patch-constant addresses computed under a narrower EXEC were taken for control-point writes, and the cars rendered as shards.Related
unsupported tessellation memory shape(LS0xdaf84971c11582b7).Testing
Gran Turismo 7 (PPSA01317), RTX 4070 Laptop: menus, garage and race start, together with #1918
@coderabbitai[bot] on GitHub · 2026-10-26 19:33 UTC · original
Walkthrough
The changes select tessellation fields for shader-stage keys, expand control-point address analysis, and account for memory offsets when classifying patch accesses. SPIR-V tessellation handling now uses domain-specific factor counts and supports triangle and quad execution modes with validated partitioning and topology values.
Suggested reviewers:
nmzikPriority:
Normal
Change: Bug fix
Merge Risk:
Moderate · up to
68befDifferent tessellation patch sizes can reuse a shader with the wrong interface, and some valid bit-field instructions can produce incorrect address analysis. Fix both before merging.
Pre-merge checks:
4 ·
1
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@ -156,2 +208,2 @@if (rhs.constant == 0u && third.constant == 8u) value = constant(0u);}if (is_constant(rhs) && is_constant(third))value = extract(lhs, rhs.constant, third.constant);@coderabbitai[bot] on GitHub · 2026-10-26 19:33 UTC · original
Mask
V_BFE_U32operands before address analysis.V_BFE_U32uses only the low five bits of its offset and width operands. A width of32therefore produces zero, butextract(lhs, 0, 32)can retain the control-point index. An offset of40means offset8, butextractreturns zero. Either case can produce an incorrect stride or patch-access classification. Passrhs.constant & 31uandthird.constant & 31utoextract. (gpuopen.com)Proposed correction
Committable suggestion
@ -453,0 +464,4 @@tess.patch_size, tess.domain, tess.partitioning,tess.output_topology});break;}@coderabbitai[bot] on GitHub · 2026-10-26 19:33 UTC · original
🔎 Supported by static analysis
Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 8592
Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 36594
Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 24507
Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 18779
Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 19095
Include
input_control_pointsin the Local program key.PipelineCache::GetProgramkeys the stage program bystage,params.hash,user_data_count, andstatic_state. For a Local shader,static_statestores only the nonzero flag andls_stride. The translatedControlInputinterface uses the actualtess.input_control_pointsvalue. Different patch counts can therefore reuse the same cached Local program.Suggested fix
Committable suggestion
@coderabbitai[bot] on GitHub · 2026-10-26 19:33 UTC · original · reviewed
Actionable comments posted: 2
1b09c3f6-b0e5-4fd6-9ea9-08e9d6b4a255Reviewing files that changed from the base of the PR and between
f90a8b1589and68befc66da.src/graphics/shader/recompiler/Tessellation.cppsrc/graphics/shader/recompiler/backend/spirv/spirvEmitterTessellation.cppsrc/graphics/shader/shader.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.