Skip to content

Rework rework presentation#9361

Merged
teoxoy merged 11 commits intogfx-rs:trunkfrom
atlv24:ad/rework-presentation
Apr 14, 2026
Merged

Rework rework presentation#9361
teoxoy merged 11 commits intogfx-rs:trunkfrom
atlv24:ad/rework-presentation

Conversation

@atlv24
Copy link
Copy Markdown
Collaborator

@atlv24 atlv24 commented Apr 2, 2026

Connections
Supersedes #9222
Fixes #6748
Fixes #9109
Progress towards #4098

Description
Redoes #9222 in the way @teoxoy suggested, we use the last submissions fence index instead of giving presents their own index. also clean git history and adding some safety comments and a repro test while we're at it.
Also factors out a shared part of submit as suggested in #9307

Testing
Repro case added, it fails before the fix and passes after the fix.

Squash or Rebase?

Rebase, the commits are clean and each compile etc.

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@atlv24 atlv24 force-pushed the ad/rework-presentation branch 3 times, most recently from 6e7f56a to 1394e40 Compare April 2, 2026 13:11
@inner-daemons inner-daemons mentioned this pull request Apr 2, 2026
6 tasks
@atlv24 atlv24 force-pushed the ad/rework-presentation branch from 1394e40 to 23cd6ab Compare April 2, 2026 18:23
@atlv24 atlv24 force-pushed the ad/rework-presentation branch 2 times, most recently from ec1eb90 to 494a4e1 Compare April 7, 2026 08:13
@@ -276,60 +361,20 @@ impl Surface {
pub fn present(&self) -> Result<Status, SurfaceError> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you move present fully on the queue (removing this function and Global::surface_present)? It's odd to have it in both places now.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I had to keep Global::surface_present because deno uses it, and theres no way to get at the Queue itself afaict in deno. Addressed the rest though

@atlv24 atlv24 force-pushed the ad/rework-presentation branch from 494a4e1 to fd1a2be Compare April 11, 2026 02:13
@atlv24
Copy link
Copy Markdown
Collaborator Author

atlv24 commented Apr 11, 2026

@teoxoy I redid the commits, but a lot of them are the same as before. The relevant ones are the 1st commit (new) and the 6th commit (amended). The 4th and 7th commits were split out of that commit, 4 6 and 7 used to be all one commit. 5 is also a new commit, opportunistically avoiding removing the error sink due to dead code warning by instead just using it in a place it should be used

P.S. Hiding whitespace in the 1st commit is both useful and hurtful, try looking at the commit in both modes.

@inner-daemons
Copy link
Copy Markdown
Collaborator

@atlv24 Can you list out the things that have changed from my thing to yours?

@atlv24
Copy link
Copy Markdown
Collaborator Author

atlv24 commented Apr 12, 2026

The PR description says whats different, its up to date. I recommend just reviewing commit by commit, there's not really a point in comparing the PRs at this point i believe

@atlv24 atlv24 force-pushed the ad/rework-presentation branch 2 times, most recently from 9d513dd to ea3cc7e Compare April 12, 2026 18:05
@atlv24
Copy link
Copy Markdown
Collaborator Author

atlv24 commented Apr 12, 2026

Two new commits, the last couple fix(core):'s

Copy link
Copy Markdown
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

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

Thanks for making this easy to review! I have 2 last comments.

@atlv24 atlv24 force-pushed the ad/rework-presentation branch from ea3cc7e to 904e540 Compare April 13, 2026 19:58
@atlv24
Copy link
Copy Markdown
Collaborator Author

atlv24 commented Apr 13, 2026

Fixed the two feedback items and rebased on trunk, should be good to go now

@teoxoy teoxoy merged commit 981d3c8 into gfx-rs:trunk Apr 14, 2026
59 checks passed
@atlv24 atlv24 deleted the ad/rework-presentation branch April 14, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Queue should outlast device SYNC-HAZARD-WRITE-AFTER-PRESENT when presenting a surface just after getting it.

3 participants