feat: per-window GPU textures and alpha-blended cursor for VirGL compositing#261
Merged
feat: per-window GPU textures and alpha-blended cursor for VirGL compositing#261
Conversation
Per-window VirGL GPU textures caused z-order issues — all window content quads rendered at the same depth, bleeding through other windows' frames, and hiding the cursor. Revert to single-texture compositing where BWM blits window content into COMPOSITE_TEX via MAP_SHARED with occluded span clipping, then kernel adds cursor and renders one fullscreen SUBMIT_3D textured quad. - Restore BWM blit functions: blit_client_pixels (with occluder clipping), blit_mapped_pixels, blit_pixels_to_fb, rects_overlap - Remove kernel-level blit_window_to_compositor (was slow due to scattered page boundary handling) - Remove per-window texture pool (8 × 4.8MB = 38MB RAM saved) - Remove lazy VirGL texture init from composite syscall - Simplify window registration (no page_phys_addrs clone needed) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…GL compositing Add per-window VirGL texture pool (up to 8 slots) with lazy init on first composite, GPU cursor texture (12x18 arrow with transparency), and alpha blend state for cursor rendering. BWM simplified by removing CPU-side mapped buffer blitting — compositing now fully delegated to the kernel's GPU pipeline. - Per-window GPU textures: create_window_texture() with same proven resource creation pattern as COMPOSITE_TEX - Cursor texture: RESOURCE_CURSOR_TEX_ID with alpha channel, uploaded once at init, rendered as alpha-blended quad - VirGL alpha blend: create_blend_alpha() with SRC_ALPHA/INV_SRC_ALPHA - BWM: removed mapped_ptr/blit_pixels_to_fb/blit_client_pixels/occluder logic — ~200 lines of CPU compositing code eliminated - Lazy per-window texture init in handle_composite_windows syscall Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
create_blend_alpha()) with SRC_ALPHA / INV_SRC_ALPHA for transparent cursor renderingTest plan
🤖 Generated with Claude Code