rusticl/queue: fix error code for invalid queue properties part 1
Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38327>
This commit is contained in:
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user