mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 23:40:10 +01:00
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:
parent
1cad339409
commit
0cfcd2ff83
1 changed files with 8 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue