Skip to content

hal/vulkan: Only decrement counter for raw shaders #8066

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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions wgpu-hal/src/vulkan/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1954,11 +1954,11 @@ impl crate::Device for super::Device {
match module {
super::ShaderModule::Raw(raw) => {
unsafe { self.shared.raw.destroy_shader_module(raw, None) };

self.counters.shader_modules.sub(1);
Comment on lines +1957 to +1958
Copy link
Member

Choose a reason for hiding this comment

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

I think this is the wrong fix to the problem, we should always be incrementing the counter, no matter what kind of shader module.

}
super::ShaderModule::Intermediate { .. } => {}
}

self.counters.shader_modules.sub(1);
}

unsafe fn create_render_pipeline(
Expand Down
Loading