Skip to content

[wgpu-core] when mapping buffers for reading, mark buffers as initialized only when they have MAP_WRITE usage #6178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

teoxoy
Copy link
Member

@teoxoy teoxoy commented Aug 28, 2024

Fixes #6137.
I couldn't test this locally as my buffer mappings seem to be coherent but the new wgpu_test::dispatch_workgroups_indirect::reset_bind_groups testcase in #5714 runs into this.

@teoxoy teoxoy requested a review from a team as a code owner August 28, 2024 09:45
@teoxoy teoxoy force-pushed the gles-flush-explicit branch from 7268700 to afcc390 Compare August 28, 2024 10:37
@teoxoy teoxoy force-pushed the gles-flush-explicit branch 3 times, most recently from 520730e to 2a8cbd9 Compare August 29, 2024 18:36
Copy link
Member

@ErichDonGubler ErichDonGubler left a comment

Choose a reason for hiding this comment

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

Approving to leave the current conversation and CI as the only blockers I intend.

@teoxoy teoxoy changed the title [gles] enable MAP_FLUSH_EXPLICIT_BIT for MAP_READ buffers as well [wgpu-core] when mapping buffers for reading, mark buffers as initialized only when they have MAP_WRITE usage Aug 29, 2024
@teoxoy teoxoy force-pushed the gles-flush-explicit branch from 2a8cbd9 to 0b76e1e Compare August 29, 2024 18:54
@teoxoy teoxoy requested review from Wumpf and cwfitzgerald August 30, 2024 08:47
@ErichDonGubler
Copy link
Member

@teoxoy: If @Wumpf and @cwfitzgerald don't have anything to say by ~Wednesday, I think it'd be fair to just merge, if not earlier.

@jimblandy
Copy link
Member

jimblandy commented Sep 3, 2024

I'll run the test case in #6137 against this on my machine.

@jimblandy
Copy link
Member

This patch does indeed silence the GLES validation error provoked on trunk by the test in #6137.

@jimblandy
Copy link
Member

I was going to suggest including the test from #6137 in this PR, but the OP says that #5714 will also cover it, so I think that should be good enough. Tests are not product.

@ErichDonGubler ErichDonGubler enabled auto-merge (squash) September 4, 2024 14:45
@ErichDonGubler ErichDonGubler merged commit 4e78829 into gfx-rs:trunk Sep 4, 2024
25 checks passed
@teoxoy teoxoy deleted the gles-flush-explicit branch September 4, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

wgpu_hal tries to call glFlushMappedBufferRange on buffer without setting GL_MAP_FLUSH_EXPLICIT_BIT
3 participants