Skip to content

bugfix(w3dtreebuffer): Refill the tree buffers after a device reset - #3449

Merged
xezon merged 1 commit into
TheSuperHackers:mainfrom
tintinhamans:arctic/fix/rebuild-buffers-after-reset
Oct 10, 2026
Merged

xezon merged 1 commit into
TheSuperHackers:mainfrom
tintinhamans:arctic/fix/rebuild-buffers-after-reset

Conversation

@tintinhamans

@tintinhamans tintinhamans commented Oct 9, 2026 •

Copy link
Copy Markdown

After a device reset the trees disappeared until the camera moved.

allocateTreeBuffers() recreates the tree buffers empty but did not set m_anythingChanged, so they were not refilled until a camera move did. It now sets the flag.

Before and after a forced device reset, camera not moved. Top is main, bottom is this change.

image

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f71f091e-cc16-411a-bf32-440d7b43d0d0

📥 Commits

Reviewing files that changed from the base of the PR and between 8c379f6 and 1dcd673.


You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f0052cb3-fc05-4582-a9ca-f1e51457221d



📥 Commits

Reviewing files that changed from the base of the PR and between 2119cc9 and 8c379f6.




📒 Files selected for processing (1)
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTreeBuffer.cpp



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





Walkthrough

allocateTreeBuffers now sets m_anythingChanged after initializing the vertex and index buffers. The existing rebuild path then refills them.

Changes

Tree Buffer Allocation

Layer / File(s) Summary
Mark tree data for rebuilding
Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DTreeBuffer.cpp
After initializing the vertex and index buffers, allocateTreeBuffers sets m_anythingChanged.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: mirelle7

Merge Risk: ⚪ Minimal · up to 8c379

The change addresses tree buffers remaining empty after a device reset; no concrete merge blocker is evident.

Pre-merge checks | Passed 4
✅ Passed checks (4 passed)
Check name Status Explanation
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 clearly identifies the bug fix and the affected W3D tree buffer behavior after a device reset.
Description check Passed The description directly explains the disappearing trees, the missing m_anythingChanged update, and the resulting fix.



  • Autofix · 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.

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium impact] This change appears safe to merge.

Summary

allocateTreeBuffers() now sets m_anythingChanged after creating empty buffers.

  • Trees refill after a graphics device reset.

Reviews (3) · Last reviewed commit: "bugfix(w3d): Refill the tree buffers aft..." · Reviewed by Greptile

@Mauller Mauller left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks woody

@xezon xezon added Bug Something is not working right, typically is user facing Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour labels Oct 10, 2026
@xezon xezon changed the title bugfix(w3d): Refill the tree buffers after a device reset bugfix(w3dtreebuffer): Refill the tree buffers after a device reset Oct 10, 2026
@xezon

xezon commented Oct 10, 2026

Copy link
Copy Markdown

This branch has made no builds.

@tintinhamans
tintinhamans marked this pull request as draft October 10, 2026 15:57
@tintinhamans
tintinhamans marked this pull request as ready for review October 10, 2026 15:57
@tintinhamans
tintinhamans force-pushed the arctic/fix/rebuild-buffers-after-reset branch from 8c379f6 to 1dcd673 Compare October 10, 2026 16:01
@tintinhamans

Copy link
Copy Markdown
Author

Rebase seems to have woken it.

@xezon
xezon merged commit dd161b0 into TheSuperHackers:main Oct 10, 2026
24 checks passed
@tintinhamans
tintinhamans deleted the arctic/fix/rebuild-buffers-after-reset branch October 14, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working right, typically is user facing Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants