You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: Make surface definitions transactional - #562
Restore direct scanout binding when surface redefinition fails
hw/display/vmware_vga_3d.c:3776
When redefining the active direct-scanout surface, vmsvga3d_surface_prepare() detaches its direct binding before this OTable write. If the write fails, this path frees the candidate but does not restore that binding. Detach preserves the current pixels in a copy, but the rejected redefine still changes the live scanout source while leaving the old surface installed. Stage the fallible materialization before publishing and defer clearing the binding until commit, or restore the prior binding on failure.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
Budget inconsistencies remain unresolved, and rollback and scanout storage lifetimes require human validation.
Review effort: Balanced Findings: None
Previously missed (2)
In code that hasn't changed since last review
Separate GB and legacy surface memory accounting
hw/display/vmware_vga_3d.c:3228
GB and legacy commits both update state->surface_bytes, but GB allocations now check that total against 1 GiB while legacy definitions still check it against 512 MiB. With 576 MiB of GB shadows installed, a 64 MiB legacy DEFINE is rejected; creating that legacy surface first and then the same GB surfaces succeeds. Allocation order therefore determines whether the same surface set fits. Track GB and legacy usage separately, including replacements between the two kinds and destruction, so each advertised budget applies to the corresponding surfaces.
Use GB memory sizing during guest-backed surface recovery
hw/display/vmware_vga_3d.c:3481
vmsvga3d_d3d10_recover_gb_surface_live() still calls this installer, so guest-backed surface recovery uses 512 MiB while GB DEFINE now allows 1 GiB. When a valid OTable entry has no host surface, recovering a 64 MiB depth surface with 512 MiB already installed fails the budget check, although DEFINE would accept it; vmsvga3d_d3d10_dsv_realize_live() then returns false. Route GB recovery through preparation/commit with vmsvga3d_gb_surface_memory_size(s), preserving the legacy limit for legacy DEFINE calls.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.