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

[WebGPU] Error if any required feature is not available #4194

Open
IceSentry opened this issue Oct 2, 2023 · 2 comments · Fixed by #4196
Open

[WebGPU] Error if any required feature is not available #4194

IceSentry opened this issue Oct 2, 2023 · 2 comments · Fixed by #4196
Labels
api: webgpu Issues with direct interface with WebGPU type: bug Something isn't working

Comments

@IceSentry
Copy link
Collaborator

IceSentry commented Oct 2, 2023

Description
When requesting POLYGON_MODE_LINE in webgpu it doesn't give an error despite it not working. Webgl correctly gives an error.

A similar issue also happen when using PolygonMode::Line without requesting the feature. In webgl it will give an error while in webgpu it gives no error but doesn't render correctly.

Repro steps
I discovered this with bevy. I tried making a simple reproduction but I couldn't figure out how to build a simple repro and build it for wasm, I kept getting unrelated errors, I was probably doing something wrong. Is there a simple template somewhere that I could use?

Expected vs observed behavior
Expected: All platform that do not support POLYGON_MODE_LINE to raise an error if the feature is requested
Observed: Some platform that do not support POLYGON_MODE_LINE do not raise an error if the feature is requested

Platform
I was using windows, but I don't think this is OS related.
This was found with bevy 0.12-dev which is still on wgpu 0.16

@teoxoy teoxoy added type: bug Something isn't working api: webgpu Issues with direct interface with WebGPU labels Oct 2, 2023
@IceSentry
Copy link
Collaborator Author

@teoxoy I'm not sure that PR completely fixed the issue. Like I said, I'm not sure how to reproduce it outside of bevy, but that PR only fixed the primitive validation not the feature check validation. Was it just already fixed on main?

@cwfitzgerald
Copy link
Member

cwfitzgerald commented Oct 4, 2023

Yeah we solved a different problem. The following code should error in the None case.

if desc.required_features.contains(flag) {
Some(JsValue::from(value))
} else {
None
}

@cwfitzgerald cwfitzgerald reopened this Oct 4, 2023
@teoxoy teoxoy changed the title POLYGON_MODE_LINE in webgpu doesn't give an error despite not being supported [WebGPU] Error if any required feature is not available Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: webgpu Issues with direct interface with WebGPU type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants