-
Notifications
You must be signed in to change notification settings - Fork 948
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
CI Flakes on VK discarding_either_depth_or_stencil_aspect_test #4740
Comments
If we revert the changes to the test (#4739), it seems to be broken on MoltenVK as well and even D3D12 #4739 (comment). Looking at the errors thrown by Vulkan & D3D12, I suspect part of the texture tracking code is not working properly. |
Yeah, something weird is going on here. When the resource is finally uses as copy_src after initialization, the device tracker thinks it hasn't seen it and just inserts the state without inserting a barrier at all. |
We end up in https://github.com/gfx-rs/wgpu/blob/trunk/wgpu-core/src/track/texture.rs#L404-L436 during triage_suspected for the texture. |
This part of the tracking and maintenance code is new after arcinization, so is new to me, still getting up to speed. cc @gents83 |
The difference is which submission each submission is determined done at. If the submission is determined finished in the same submit call the texture will be removed. The order of operations is:
If the maintain call finds that the submission they just kicked off is done, you'll get
If a submission lasts until the next submit call, you'll get:
Also go our logging! |
Yep! The situation is exactly as you described. In some situations the texture is not referenced and so can be released at the end of the frame. When I was investigating this anyway I had the impression that when submitting right every operations the barrier transition operation doesn't work as intended. So I think that our best option is to add some logging to barriers and transitions to check what is going on in that sense probably |
The only reason it's not working as intended is that the trackers are removing the textures every frame from the trackers. If that didn't happen the barriers would be correct.
It already does :) |
Ok so I'll have to dig a bit into barriers to find out why they are not referencing the resource needed and allow it to be destroyed 👍🏼 hopefully will be on this in a couple of days |
@teoxoy & @cwfitzgerald I need your input here. [2023-11-26T15:57:41Z DEBUG wgpu_core::device::resource] Create view for texture Id(0,3,d3d12) filters usages to TextureUses(DEPTH_STENCIL_READ | DEPTH_STENCIL_WRITE) If I understood correctly you were suggesting that the cause could be that the texture is not tracked anymore, after previous submit, even if the resource is still alive, but it seems that everything is consistent to what I was expecting, because the resource has been submitted and we cannot know that it'll be required again in next submit. Any input on this? |
Digging a bit:
|
I think that probably we should keep the resource alive in the device tracker IF it's alive in the user land - I'll test a possible fix (and cleanup also) |
Created PR #4782 to fix the issue 👍 |
https://github.com/gfx-rs/wgpu/actions/runs/6947331918/job/18900887783?pr=4723
The text was updated successfully, but these errors were encountered: