This commit is contained in:
Violet 2025-09-19 00:40:19 +00:00
commit c9cc62de33
3 changed files with 10 additions and 8 deletions

View file

@ -123,10 +123,9 @@ impl<'a, 'input> ModuleEmitContext<'a, 'input> {
let fn_type = get_function_type( let fn_type = get_function_type(
self.context, self.context,
method.return_arguments.iter().map(|v| &v.info.v_type), method.return_arguments.iter().map(|v| &v.info.v_type),
method method.input_arguments.iter().map(|v| {
.input_arguments get_input_argument_type(self.context, &v.info.v_type, v.info.state_space)
.iter() }),
.map(|v| get_input_argument_type(self.context, &v.info.v_type, v.info.state_space)),
)?; )?;
fn_ = unsafe { LLVMAddFunction(self.module, name.as_ptr(), fn_type) }; fn_ = unsafe { LLVMAddFunction(self.module, name.as_ptr(), fn_type) };
self.emit_fn_attribute(fn_, "amdgpu-unsafe-fp-atomics", "true"); self.emit_fn_attribute(fn_, "amdgpu-unsafe-fp-atomics", "true");

View file

@ -1004,7 +1004,10 @@ pub enum MultiVariable<ID> {
name: ID, name: ID,
count: u32, count: u32,
}, },
Names { info: VariableInfo<ID>, names: Vec<ID> }, Names {
info: VariableInfo<ID>,
names: Vec<ID>,
},
} }
#[derive(Clone)] #[derive(Clone)]

View file

@ -993,7 +993,7 @@ fn multi_variable<'a, 'input: 'a>(
state_space, state_space,
array_init: Vec::new(), array_init: Vec::new(),
}, },
name: name, name,
count, count,
}); });
} }
@ -1019,9 +1019,9 @@ fn multi_variable<'a, 'input: 'a>(
Ok(MultiVariable::Names { Ok(MultiVariable::Names {
info: VariableInfo { info: VariableInfo {
align, align,
v_type: Type::maybe_array(vector, type_, array_dimensions.clone()), v_type: Type::maybe_array(vector, type_, array_dimensions),
state_space, state_space,
array_init: initializer.clone().unwrap_or(Vec::new()), array_init: initializer.unwrap_or(Vec::new()),
}, },
names, names,
}) })