rusticl/program: simplify active_kernels check
This removes one loop, also will allow us to cache the device builds in the queue to optimize binding compute states. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33775>
This commit is contained in:
@@ -550,9 +550,9 @@ impl Program {
|
||||
|
||||
pub fn active_kernels(&self) -> bool {
|
||||
self.build_info()
|
||||
.builds
|
||||
.kernel_info
|
||||
.values()
|
||||
.any(|b| b.kernels.values().any(|b| Arc::strong_count(b) > 1))
|
||||
.any(|k| Arc::strong_count(k) > 1)
|
||||
}
|
||||
|
||||
pub fn build(&self, devs: &[&'static Device], options: &str) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user