Graphics: surface loss and restore in the renderer
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- csharp
- Domain
- desktop, game-dev, mobile-dev
Research direction
Start with Renderer.cs:256-284 and trace the surface and swapchain lifecycle through the host event handling and Device.Dispose; the issue also depends on #245. Implement the listed loss, restore, resize, and disposal behavior, then verify that Linux passes 100 minimize and restore cycles without validation errors and that recreation has no busy-wait.
Written by the indexing model from the issue text.
Description
Current State
The surface is never destroyed or recreated. Renderer.RecreateSwapChain (Renderer.cs:256-284) busy-waits on window.DoEvents() until the framebuffer is non-zero and throws if formats change; framebufferResized is never set; oldSwapchain is always null; Device.Dispose destroys neither surface nor instance. On Android the surface disappears on every pause.
Tasks
- On surface lost: wait idle, destroy swapchain and surface, pause ticking, stop rendering
- On surface restored: recreate surface and swapchain; rebuild render pass and pipelines if the format changed
- Pass
oldSwapchainon recreation; set the resize flag from host events - Destroy surface and instance on dispose
- Desktop stress test: minimize/restore and resize
Acceptance Criteria
- 100 minimize/restore cycles validation-clean on Linux
- No busy-wait remains
Related
- Android plan task A10 · seniority Sr · mergeable now (.NET 10)
- Depends on: #245
- Platform roadmap: #100
- Dominant language
- C#
- Stars
- 1
- Forks
- 1
- Avg merge
- 1h 45m
- Merged PRs (30d)
- 31
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MASS4ORG/Turian
-
c:assets p:low size:XS t:task
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
c:engine c:scripting p:medium size:XL t:refactor
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
c:assets c:platform p:low size:M t:feature
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Maintainers usually reply within 1 day
-
c:platform c:scripting p:low size:M t:task
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
c:docs good first issue p:low size:S t:docs
Difficulty 3/5 1-2 days Newbie friendliness 67/100
Maintainers usually reply within 1 day
Similar issues
-
:watch: Not Triaged async-task-programming/subsvc dotnet-csharp/svc
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
python triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
microsoft/semantic-kernel#14590 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Needs-Triage
Difficulty 1/5 Under an hour Newbie friendliness 88/100
PowerShell/PowerShell#28194 ·
Maintainers usually reply within 1 day
-
AI Projects Client customer-reported needs-team-attention question Service Attention
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Azure/azure-sdk-for-net#63804 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day