nak: Initialize DEBUG on-demand
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
This commit is contained in:

committed by
Marge Bot

parent
3fed505eb0
commit
c4938619f3
@@ -82,7 +82,7 @@ pub static DEBUG: OnceLock<Debug> = OnceLock::new();
|
||||
|
||||
impl GetDebugFlags for OnceLock<Debug> {
|
||||
fn debug_flags(&self) -> u32 {
|
||||
self.get().unwrap().flags
|
||||
self.get_or_init(Debug::new).flags
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,8 +173,6 @@ pub extern "C" fn nak_compiler_create(
|
||||
assert!(!dev.is_null());
|
||||
let dev = unsafe { &*dev };
|
||||
|
||||
DEBUG.get_or_init(Debug::new);
|
||||
|
||||
let nak = Box::new(nak_compiler {
|
||||
sm: dev.sm,
|
||||
warps_per_sm: dev.max_warps_per_mp,
|
||||
|
Reference in New Issue
Block a user