Skip to content
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

hal/gles: fix index buffer state not being reset in reset_state #2391

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

rparrett
Copy link
Contributor

Connections

Fixes #2378

Description

See discussion in #2378 for the full background.

This fixes a webgl2 crash that I have been experiencing. The old gfx gl implementation that hal/gles is based on did the same thing and this seemingly was an unintentional omission when porting it.

Testing

Tested webgl examples that are expected to work

  • cube
  • hello-triangle
  • msaa-line
  • shadow
  • skybox
  • water

I observed some unpleasant flickering in cube both with and without these changes.

@rparrett rparrett changed the title hal/gles: Fix index buffer state not being reset in reset_state hal/gles: fix index buffer state not being reset in reset_state Jan 13, 2022
Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

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

Very nice!

@kvark
Copy link
Member

kvark commented Jan 13, 2022

Thank you! Do you require this patch on crates?

@kvark kvark enabled auto-merge (rebase) January 13, 2022 19:24
@kvark kvark added the PR: needs back-porting PR with a fix that needs to land on crates label Jan 13, 2022
@kvark kvark merged commit 5b2b6f5 into gfx-rs:master Jan 13, 2022
@rparrett
Copy link
Contributor Author

I do not, but I personally think it's a good idea / would appreciate it.

Some factors I'm thinking about are:

  • The way this sort of bubbled up randomly into a pretty unremarkably bevy game,
  • Bevy users not really having any options to mitigate this as far as I can tell
  • Bevy and wgpu's release schedules
  • An upcoming bevy game jam

But I don't fully understand the full chain from bevy code to the crash this fixes or how rare the situation might be.

@rparrett
Copy link
Contributor Author

If it's an ordeal, at least the issue is a bit more discoverable now and bevy still seems to be compatible with wgpu up to this commit so users can simply patch wgpu.

@kvark
Copy link
Member

kvark commented Jan 13, 2022

We will definitely release a patch for this. No need to align any release schedules.
The question is how urgent this patch needs to be.

@rparrett
Copy link
Contributor Author

Oh, probably not very urgent at all.

@kvark kvark mentioned this pull request Jan 21, 2022
@kvark
Copy link
Member

kvark commented Jan 21, 2022

published in wgpu-hal-0.12.3

@kvark kvark removed the PR: needs back-porting PR with a fix that needs to land on crates label Jan 21, 2022
@rparrett
Copy link
Contributor Author

Thanks!

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.

bindBuffer errors in webgl bevy game
2 participants