-
Notifications
You must be signed in to change notification settings - Fork 548
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
[GL] Rebind buffer to another target panic on WebGL #3669
Comments
Weird, so it's a vertex buffer? If so, why are we binding it to the |
I will try to investigate it. Maybe we should check first if the buffer already bounded to another target and try to create a new one 🤔
No, I used different buffers. Anyway, you can see the same error with any let vertex_buffer = device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
label: Some("VertexBuffer"),
contents: bytemuck::cast_slice(VERTICES),
usage: wgpu::BufferUsage::VERTEX,
});
let index_buffer = device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
label: Some("IndexBuffer"),
contents: bytemuck::cast_slice(INDICES),
usage: wgpu::BufferUsage::INDEX,
}); |
Also this issue, not an error for |
IIRC, that's because the browser needs to know exactly what the indices are, so that it can prevent out-of-bounds access on vertex fetching. So it's a safety requirement on the Web... |
@kvark Could buffer rebinding potentially be a problem for |
I don't think it will affect GLES in any way, no. Having a WebGL-specific workaround sounds fine. |
From WebGL docs:
SpectorJS trace:
Note: Error was found with code from #3668
The text was updated successfully, but these errors were encountered: