nak: Make ShaderBin a public struct

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
This commit is contained in:
Faith Ekstrand
2024-07-19 00:16:55 -05:00
committed by Marge Bot
parent 758f7a440d
commit 61e502b25c

View File

@@ -204,7 +204,7 @@ pub extern "C" fn nak_nir_options(
}
#[repr(C)]
struct ShaderBin {
pub struct ShaderBin {
bin: nak_shader_bin,
code: Vec<u32>,
asm: CString,
@@ -337,6 +337,14 @@ impl ShaderBin {
}
}
impl std::ops::Deref for ShaderBin {
type Target = nak_shader_bin;
fn deref(&self) -> &nak_shader_bin {
&self.bin
}
}
#[no_mangle]
pub extern "C" fn nak_shader_bin_destroy(bin: *mut nak_shader_bin) {
unsafe {