-
Notifications
You must be signed in to change notification settings - Fork 28
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
wgpu alignment validation errror on GpuProfiler::resolve_queries #79
Comments
in encoder.resolve_query_set(
&query_pool.query_set,
num_resolved_queries..num_used_queries,
&query_pool.resolve_buffer,
(num_resolved_queries * wgpu::QUERY_SIZE) as u64,
); This offset is, to my understsanding, not guaranteed to be aligned to It seems that the resolve_buffer's size has to include some padding and this offset calculation needs to round to the nearest larger multiple of I solved this in a fork by a) allocating a larger resolve_buffer and b) making sure this alignment is calculated accordingly here: https://github.com/bitwise-git/wgpu-profiler It might be incorrect though |
very surprising that this didn't come up before! Thank you so much for reporting I had a bit of a look at your commit. This should generally work but I'd solve it a little bit differently - adjust |
actually I think this approach doesn't quite work because of how the resolve buffer fills up, but looking at this again I think this isn't done all that well to begin with - the resolve buffer is right away copied to a read buffer, so why even bother offsetting 💡 |
Good idea :) will check it out once it lands. Great work overall btw! When I implemented it in a few more compute and renderpasses the alignment issue seemed to go away for that specific set of inputs at least so got it working in our engine as is, but a real solution would be good! |
Thank you! |
Ah, I was hoping you could try the PR branch already? 🥺 |
Great! I will give it a try today if I find time in the afternoon :) |
all I can say is that this PR seems to work with our latest version of the engine! Made a little egui widget for it but looking forward to potential puffin integration #59! |
awesome, thanks for having a look! |
We have also had this reported at linebender/vello#678, and would ideally like to see this be in a release. |
Thanks! Unfortunately, this seems to still be broken.
|
@DJMcNab can you create an new bug for this, ideally with a way to repro it if possible? |
sounds like something super silly is still in there that isn't caught by the unit tests :/ |
have not had this issue before but happened now when I was integrating the profiler into our company's much larger renderer
The text was updated successfully, but these errors were encountered: