Update gpu_format.cpp #1003

Manually merged
github merged 2 commits from gh-pr/1003/head into gh-pr/1003/base 2026-11-26 09:40:02 +00:00
Owner

@⁠rocketrobot99 on GitHub · 2026-10-03 12:17 UTC · original
rocketrobot99:main → main · +18 −7 · 2 files · 2 commits · merged 2026-10-03 12:57 UTC

Problem

in New Super Lucky's Tale some worlds are not accessible :

image image

Fix SRGB render-target formats (k8Srgb, k8_8Srgb)

Corrects render_target_bytes_per_element for SRGB formats:

  • k8Srgb: 1 byte (was 0)
  • k8_8Srgb: 2 bytes (was 0)

These formats appear in ChannelLayout::k8 and k8_8 render-target paths. Incorrect RT byte sizes caused TextureCache render-target validation failures in Lucky's Tale.

After

image
**@⁠rocketrobot99** on GitHub · 2026-10-03 12:17 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1003) `rocketrobot99:main` → `main` · +18 −7 · 2 files · 2 commits · merged 2026-10-03 12:57 UTC ### Problem in New Super Lucky's Tale some worlds are not accessible : <img width="1922" height="1112" alt="image" src="https://github.com/user-attachments/assets/f45dab63-57fa-441a-b756-e8774f38ea39" /> <img width="928" height="129" alt="image" src="https://github.com/user-attachments/assets/b0b80b27-fe62-476e-93c9-7e8b6ef77cf4" /> Fix SRGB render-target formats (k8Srgb, k8_8Srgb) Corrects render_target_bytes_per_element for SRGB formats: - k8Srgb: 1 byte (was 0) - k8_8Srgb: 2 bytes (was 0) These formats appear in ChannelLayout::k8 and k8_8 render-target paths. Incorrect RT byte sizes caused TextureCache render-target validation failures in Lucky's Tale. ### After <img width="1922" height="1112" alt="image" src="https://github.com/user-attachments/assets/ad5fa57d-e4c1-449f-932e-5aedf0fbd583" />
Fix SRGB render-target formats (k8Srgb, k8_8Srgb)

Corrects render_target_bytes_per_element for SRGB formats:
- k8Srgb: 1 byte (was 0)
- k8_8Srgb: 2 bytes (was 0)

These formats appear in ChannelLayout::k8 and k8_8 render-target paths.
Incorrect RT byte sizes caused TextureCache render-target validation failures
in Lucky's Tale
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:40:00 +00:00
github manually merged commit 7f0d29b537 into gh-pr/1003/base 2026-11-26 09:40:02 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-03 12:22 UTC · original · edited 2026-10-03 12:28 UTC

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d1f0222e-71f3-4d8e-9c5c-06ed05a24c4f
📥 Commits

Reviewing files that changed from the base of the PR and between f53e5d2283 and ce47c202ed.

📒 Files selected for processing (1)
  • src/graphics/guest_gpu/gpu_format.cpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The k8Srgb and k8_8Srgb entries in kFormatInfo now report render-target byte sizes of 1 and 2, respectively, instead of 0.

Suggested reviewers: nmzik

Priority: ➖ Normal

Change: Bug fix

Merge Risk: ⚪ Minimal · up to ce47c

No actionable merge-blocking risk was identified.

Security Architecture Review

Security architecture risk: 🔵 Low · up to ce47c

The change enables two graphics formats without removing existing validation. No new security flaw was established, but failure recovery and color-space compatibility are not fully verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated exposure expansion is guest selection of two additional render-target encodings reaching host image descriptors. These use host formats already mapped by the implementation; the demonstrated change is format acceptance rather than a new privilege or service boundary.

Trust Boundaries and Controls

  • observed — Guest layout and channel order remain validated before format acceptance. Shared-image reuse compares backing identity and layout compatibility, while image registration rejects ranges outside the guest address space.

Resilience and Maintainability Implications

  • observed — Cache lookup and insertion are lock-protected, registration follows image insertion, and deletion unregisters guest-page ownership before immediate or deferred destruction. Image destruction releases cached views and backing resources. These controls support lifecycle containment, but complete allocation-failure recovery was not established.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title names the file changed, but it does not describe the SRGB render-target byte-size updates.
Description check ✅ Passed The description explains the SRGB render-target byte-size changes and their reported impact in Lucky’s Tale.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 help to get the list of available commands.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-03 12:22 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1003#issuecomment-5969118188) · edited 2026-10-03 12:28 UTC <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/1003?cs_source=review_comment"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=2" alt="Review in Change Stack →" width="220" height="32"></a> Navigate logical layers of code changes, visualize relationships, and explore their blast radius. <!-- review_stack_entry_end --> <!-- recent_review_start --> No actionable comments were generated in the recent review. 🎉 <details> <summary>ℹ️ Recent review info</summary> <details> <summary>⚙️ Run configuration</summary> - **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `d1f0222e-71f3-4d8e-9c5c-06ed05a24c4f` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between f53e5d22839f560c3a7848662298c63a17636599 and ce47c202edb670795a4a69bcf7de2bd0abb261fe. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `src/graphics/guest_gpu/gpu_format.cpp` </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. </details> --- <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough The `k8Srgb` and `k8_8Srgb` entries in `kFormatInfo` now report render-target byte sizes of 1 and 2, respectively, instead of 0. **Suggested reviewers:** `nmzik` </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ➖ Normal <!-- change_assessment_commit:"ce47c202edb670795a4a69bcf7de2bd0abb261fe" --> **Change:** Bug fix <!-- change_assessment_end --> <!-- final_review_risk_start --> **Merge Risk:** _⚪ Minimal_ · up to `ce47c` <!-- final_review_risk_coverage:{"sourceCommitId":"ce47c202edb670795a4a69bcf7de2bd0abb261fe","coveredCommitId":"ce47c202edb670795a4a69bcf7de2bd0abb261fe","kind":"reviewed"} --> No actionable merge-blocking risk was identified. <!-- final_review_risk_end --> <!-- architecture_review_start --> ### Security Architecture Review **Security architecture risk:** _🔵 Low_ · up to `ce47c` The change enables two graphics formats without removing existing validation. No new security flaw was established, but failure recovery and color-space compatibility are not fully verified. **Retained concerns** No architecture-level concerns identified. <details> <summary>Security review details</summary> **Security Blast Radius** - _inferred_ — The demonstrated exposure expansion is guest selection of two additional render-target encodings reaching host image descriptors. These use host formats already mapped by the implementation; the demonstrated change is format acceptance rather than a new privilege or service boundary. **Trust Boundaries and Controls** - _observed_ — Guest layout and channel order remain validated before format acceptance. Shared-image reuse compares backing identity and layout compatibility, while image registration rejects ranges outside the guest address space. **Resilience and Maintainability Implications** - _observed_ — Cache lookup and insertion are lock-protected, registration follows image insertion, and deletion unregisters guest-page ownership before immediate or deferred destruction. Image destruction releases cached views and backing resources. These controls support lifecycle containment, but complete allocation-failure recovery was not established. </details> <!-- architecture_review_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary>🚥 Pre-merge checks | ✅ 5</summary> <details> <summary>✅ Passed checks (5 passed)</summary> | Check name | Status | Explanation | | :------------------------: | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1… | | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Title check | ✅ Passed | The title names the file changed, but it does not describe the SRGB render-target byte-size updates. | | Description check | ✅ Passed | The description explains the SRGB render-target byte-size changes and their reported impact in Lucky’s Tale. | </details> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- autopilot:start --> - [ ] <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autopilot</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts <!-- autopilot:end --> <!-- tips_start --> --- Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=1003)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary>❤️ Share</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </details> <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
This discussion has been locked. Commenting is limited to contributors.
No description provided.