mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
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:
parent
67598775ad
commit
0c0c10a811
1 changed files with 2 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue