mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
rusticl/kernel: take no kernel_info reference inside the launch closure
Otherwise patterns like this wouldn't work:
clCreateKernel(prog)
clEnqueueNDRangeKernel
clReleaseKernel
clBuildProgram(prog)
Fixes: bb2453c649 ("rusticl/kernel: move most of the code in launch inside the closure")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38327>
This commit is contained in:
parent
115998231d
commit
e53e1c101d
2 changed files with 6 additions and 6 deletions
|
|
@ -694,7 +694,7 @@
|
|||
"description": "rusticl/kernel: take no kernel_info reference inside the launch closure",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "bb2453c6495cf5ab58aa1f4f350b83f8d8d8c5c8",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1324,7 +1324,8 @@ impl Kernel {
|
|||
offsets: &[usize],
|
||||
) -> CLResult<EventSig> {
|
||||
// Clone all the data we need to execute this kernel
|
||||
let kernel_info = Arc::clone(&self.kernel_info);
|
||||
let work_group_size_hint = self.kernel_info.work_group_size_hint;
|
||||
let args = self.kernel_info.args.clone();
|
||||
let arg_values = self.arg_values().clone();
|
||||
let nir_kernel_builds = Arc::clone(&self.builds[q.device]);
|
||||
let mut bdas = self.bdas.lock().unwrap().clone();
|
||||
|
|
@ -1371,8 +1372,7 @@ impl Kernel {
|
|||
&& grid[0] <= hw_max_grid[0]
|
||||
&& grid[1] <= hw_max_grid[1]
|
||||
&& grid[2] <= hw_max_grid[2]
|
||||
&& (kernel_info.work_group_size_hint == [0; 3]
|
||||
|| block == kernel_info.work_group_size_hint)
|
||||
&& (work_group_size_hint == [0; 3] || block == work_group_size_hint)
|
||||
{
|
||||
NirKernelVariant::Optimized
|
||||
} else {
|
||||
|
|
@ -1456,7 +1456,7 @@ impl Kernel {
|
|||
|
||||
for arg in &nir_kernel_build.compiled_args {
|
||||
let is_opaque = if let CompiledKernelArgType::APIArg(idx) = arg.kind {
|
||||
kernel_info.args[idx].kind.is_opaque()
|
||||
args[idx].kind.is_opaque()
|
||||
} else {
|
||||
false
|
||||
};
|
||||
|
|
@ -1467,7 +1467,7 @@ impl Kernel {
|
|||
|
||||
match arg.kind {
|
||||
CompiledKernelArgType::APIArg(idx) => {
|
||||
let api_arg = &kernel_info.args[idx];
|
||||
let api_arg = &args[idx];
|
||||
let Some(value) = &arg_values[idx] else {
|
||||
continue;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue