rusticl/context: use write_iter for CL_DEVICES_FOR_GL_CONTEXT_KHR
Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
This commit is contained in:
@@ -53,11 +53,11 @@ unsafe impl CLInfo<cl_gl_context_info> for GLCtxManager {
|
||||
}
|
||||
CL_DEVICES_FOR_GL_CONTEXT_KHR => {
|
||||
// TODO: support multiple devices
|
||||
let devs = get_dev_for_uuid(info.device_uuid)
|
||||
.iter()
|
||||
.map(|&d| cl_device_id::from_ptr(d))
|
||||
.collect();
|
||||
v.write::<Vec<cl_device_id>>(devs)
|
||||
v.write_iter::<cl_device_id>(
|
||||
get_dev_for_uuid(info.device_uuid)
|
||||
.iter()
|
||||
.map(|&d| cl_device_id::from_ptr(d)),
|
||||
)
|
||||
}
|
||||
_ => Err(CL_INVALID_VALUE),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user