mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 19:00:13 +01:00
rusticl/queue: fix error code for invalid queue properties part 1
Cc: mesa-stable
(cherry picked from commit e83400cab2)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38432>
This commit is contained in:
parent
5c3427b1fe
commit
2cd6bc199a
2 changed files with 3 additions and 3 deletions
|
|
@ -1554,7 +1554,7 @@
|
|||
"description": "rusticl/queue: fix error code for invalid queue properties part 1",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ fn create_command_queue_with_properties(
|
|||
let d = Device::ref_from_raw(device)?;
|
||||
|
||||
// SAFETY: properties is a 0 terminated array by spec.
|
||||
let properties = unsafe { Properties::new(properties) }.ok_or(CL_INVALID_PROPERTY)?;
|
||||
let properties = unsafe { Properties::new(properties) }.ok_or(CL_INVALID_VALUE)?;
|
||||
for (&key, &val) in properties.iter() {
|
||||
match u32::try_from(key).or(Err(CL_INVALID_PROPERTY))? {
|
||||
CL_QUEUE_PROPERTIES => queue_properties = val,
|
||||
|
|
@ -152,7 +152,7 @@ fn create_command_queue_with_properties(
|
|||
// CL_INVALID_QUEUE_PROPERTIES if values specified in properties are valid but are not
|
||||
// supported by the device.
|
||||
CL_QUEUE_SIZE => return Err(CL_INVALID_QUEUE_PROPERTIES),
|
||||
_ => return Err(CL_INVALID_PROPERTY),
|
||||
_ => return Err(CL_INVALID_VALUE),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue