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

[WIP] Update wgpu to 0.7 #1410

Closed

Conversation

yutannihilation
Copy link
Contributor

This pull requests update wgpu to 0.7, which was released on Feb 2nd, 2021.

Most of the changes are straightforward, but I see several errors after update, probably due to the stricter validation. Especially, I don't understand what's wrong with this error. BindGroupLayout's wgpu::BindingType::Sampler's comparison is true and actual SamplerDescriptor has compare: Some(wgpu::CompareFunction::Always)...

Caused by:
    In Device::create_render_pipeline
      note: label = `conrod_render_pipeline_descriptor`
    error in stage FRAGMENT
    error matching global binding at index 1 in group 0 against the pipeline layout: comparison flag doesn't match the shader

@mitchmindtree
Copy link
Contributor

Thanks so much for the PR @yutannihilation!

I think you're right - I think this is the new wgpu validation pointing out an error with our existing use of the comparison function. From the wgpu docs:

Comparison function used for depth and stencil operations.

In our case, our pipeline doesn't even have a depth or stencil attachment as conrod is all 2D. Perhaps declaring a comparison function here was always meaningless?

If I remove the comparison function from the SamplerDescriptor, and set the associated comparison field to false in the bind group layout, it seems to work nicely!

I'll try updating nannou while testing this branch to make sure we're not missing anything before publishing. If all looks OK, I'll open a PR here based on your branch that removes the comparison function and rebases onto master.

@yutannihilation
Copy link
Contributor Author

Wow, thanks for investigating! I think it's best that you'll take this over as I have little knowledge about how conrod works (I just blindly tweaked code to satisfy the compiler). I'm happy to see nannou is getting updated to use wgpu 0.7 at last! 👍

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.

2 participants