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

Implement resolve query set (#3489 #3489

Merged

Conversation

JolifantoBambla
Copy link
Contributor

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Description
Describe what problem this is solving, and how it's solved.
I've added the missing BufferUsages::QUERY_RESOLVE (https://www.w3.org/TR/webgpu/#buffer-usage) and implemented command_encoder_resolve_query_set for the WebGPU backend.

Testing
Unfortunately, the WebGPU backend is broken in v0.15.1, so I only tested this with a personal project and my own patch for v0.14.2.

@cwfitzgerald
Copy link
Member

cwfitzgerald commented Feb 15, 2023

This is a good start, but I don't think I can merge this just yet - because this brings us in line with the upstream api, we also need the native api to behave the same. Once this merges, you'd need two different sets of flags to do query resolves.

This should also change the validation of the resolve query to check for the RESOLVE_QUERY usage. If anything is confusing about that transformation, please feel free to ask questions over on the matrix.

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

As this is a breaking change, could you add an entry in the "major changes" explaining what changed? After that, this looks g2g

@JolifantoBambla
Copy link
Contributor Author

done :)
I also fixed the mipmap example - missed that one before
I don't know why the shader test (shader::zero_init_workgroup_mem::zero_init_workgroup_mem) fails though

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Thanks!

@cwfitzgerald cwfitzgerald changed the title Implement resolve query set Implement resolve query set (#3489 Apr 5, 2023
@cwfitzgerald cwfitzgerald merged commit b6dbce7 into gfx-rs:trunk Apr 5, 2023
@valaphee valaphee mentioned this pull request Apr 25, 2023
3 tasks
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