mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02: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>
(cherry picked from commit 0cfcd2ff83)
This commit is contained in:
parent
34b1102390
commit
2fcae878de
2 changed files with 9 additions and 2 deletions
|
|
@ -914,7 +914,7 @@
|
|||
"description": "rusticl/memory: fix sampler argument size check",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -365,7 +365,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