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

Web: pass correct size argument to setIndexBuffer and setVertexBuffer #2202

Merged
merged 2 commits into from
Nov 22, 2021

Conversation

afiedler
Copy link
Contributor

Connections

Description
Chrome Canary started validating the size argument in the methods setIndexBuffer and setVertexBuffer on GPURenderEncoderBase. This PR corrects an issue where wgpu was passing size as 0 when the BufferSlice was open-ended. In that case, size should be passed as undefined.

Testing
Run some of the web examples using WebGPU and Chrome Canary 98.0.4720.0 or later.

Size must be passed to setIndexBuffer in Javascript as undefined in order for WebGGPU to use the default size, which is the full buffer size.
@kvark kvark enabled auto-merge (rebase) November 22, 2021 13:54
@kvark kvark merged commit 8196b75 into gfx-rs:master Nov 22, 2021
@cwfitzgerald cwfitzgerald added the PR: needs back-porting PR with a fix that needs to land on crates label Nov 23, 2021
@kvark
Copy link
Member

kvark commented Dec 2, 2021

Published in wgpu-0.11.1

@kvark kvark removed the PR: needs back-porting PR with a fix that needs to land on crates label Dec 2, 2021
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.

3 participants