mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 14:20:11 +01:00
rusticl/queue: fix error code for invalid sampler kernel arg
Fixes:5795ee0e08("rusticl: translate spirv to nir and first steps to kernel arg handling") (cherry picked from commitc0f0baeaca) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
This commit is contained in:
parent
efd2f1d61c
commit
3bb77d6906
2 changed files with 9 additions and 4 deletions
|
|
@ -1534,7 +1534,7 @@
|
|||
"description": "rusticl/queue: fix error code for invalid sampler kernel arg",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "5795ee0e08355ea2445ec9d4b2235a3a35ceda83",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -416,13 +416,18 @@ fn set_kernel_arg(
|
|||
return Err(CL_INVALID_ARG_VALUE);
|
||||
}
|
||||
}
|
||||
// If the argument is of type sampler_t, the arg_value entry must be a pointer to the
|
||||
// sampler object.
|
||||
KernelArgType::Constant(_) | KernelArgType::Sampler => {
|
||||
KernelArgType::Constant(_) => {
|
||||
if arg_value.is_null() {
|
||||
return Err(CL_INVALID_ARG_VALUE);
|
||||
}
|
||||
}
|
||||
KernelArgType::Sampler => {
|
||||
// CL_INVALID_SAMPLER for an argument declared to be of type sampler_t when the
|
||||
// specified arg_value is not a valid sampler object.
|
||||
if arg_value.is_null() {
|
||||
return Err(CL_INVALID_SAMPLER);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue