rusticl/kernel: move CompiledKernelArg decleration above the impl block

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
This commit is contained in:
Karol Herbst 2024-08-11 23:09:06 +02:00 committed by Marge Bot
parent 24ea5a756c
commit d72cc037f2

View file

@ -122,14 +122,6 @@ pub struct KernelArg {
pub dead: bool,
}
#[derive(Hash, PartialEq, Eq, Clone)]
struct CompiledKernelArg {
kind: CompiledKernelArgType,
/// The binding for image/sampler args, the offset into the input buffer
/// for anything else.
offset: u32,
}
impl KernelArg {
fn from_spirv_nir(spirv: &[spirv::SPIRVKernelArg], nir: &mut NirShader) -> Vec<Self> {
let nir_arg_map: HashMap<_, _> = nir
@ -242,6 +234,14 @@ impl KernelArg {
}
}
#[derive(Hash, PartialEq, Eq, Clone)]
struct CompiledKernelArg {
kind: CompiledKernelArgType,
/// The binding for image/sampler args, the offset into the input buffer
/// for anything else.
offset: u32,
}
impl CompiledKernelArg {
fn serialize(args: &[Self], blob: &mut blob) {
unsafe {