rusticl/memory: fix sampler argument size check
Not entirely sure why this hasn't caused any problems... Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
This commit is contained in:
@@ -367,7 +367,14 @@ fn set_kernel_arg(
|
||||
return Err(CL_INVALID_ARG_SIZE);
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
|
||||
KernelArgType::Sampler => {
|
||||
if arg_size != std::mem::size_of::<cl_sampler>() {
|
||||
return Err(CL_INVALID_ARG_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
KernelArgType::Constant => {
|
||||
if arg.size != arg_size {
|
||||
return Err(CL_INVALID_ARG_SIZE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user