mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
rusticl/queue: fix clReleaseCommandQueue
we have to flush the queue on every call Signed-off-by: Karol Herbst <kherbst@redhat.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15439>
This commit is contained in:
parent
a4c0f59b5f
commit
883b218eff
2 changed files with 9 additions and 1 deletions
|
|
@ -534,7 +534,7 @@ extern "C" fn cl_retain_command_queue(command_queue: cl_command_queue) -> cl_int
|
|||
}
|
||||
|
||||
extern "C" fn cl_release_command_queue(command_queue: cl_command_queue) -> cl_int {
|
||||
match_err!(command_queue.release())
|
||||
match_err!(release_command_queue(command_queue))
|
||||
}
|
||||
|
||||
extern "C" fn cl_get_command_queue_info(
|
||||
|
|
|
|||
|
|
@ -79,3 +79,11 @@ pub fn finish_queue(command_queue: cl_command_queue) -> CLResult<()> {
|
|||
// CL_INVALID_COMMAND_QUEUE if command_queue is not a valid host command-queue.
|
||||
command_queue.get_ref()?.flush(true)
|
||||
}
|
||||
|
||||
pub fn release_command_queue(command_queue: cl_command_queue) -> CLResult<()> {
|
||||
// clReleaseCommandQueue performs an implicit flush to issue any previously queued OpenCL
|
||||
// commands in command_queue.
|
||||
flush_queue(command_queue)?;
|
||||
command_queue.release()?;
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue