mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
gallium: add async flag to pipe_debug_callback
v2: fix typo db -> cb Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
5bcfbf91e5
commit
2909e292fc
3 changed files with 14 additions and 2 deletions
|
|
@ -809,6 +809,12 @@ struct pipe_compute_state
|
|||
*/
|
||||
struct pipe_debug_callback
|
||||
{
|
||||
/**
|
||||
* When set to \c true, the callback may be called asynchronously from a
|
||||
* driver-created thread.
|
||||
*/
|
||||
bool async;
|
||||
|
||||
/**
|
||||
* Callback for the driver to report debug/performance/etc information back
|
||||
* to the state tracker.
|
||||
|
|
|
|||
|
|
@ -50,7 +50,10 @@ command_queue::command_queue(clover::context &ctx, clover::device &dev,
|
|||
throw error(CL_INVALID_DEVICE);
|
||||
|
||||
if (ctx.notify) {
|
||||
struct pipe_debug_callback cb = { &debug_notify_callback, this };
|
||||
struct pipe_debug_callback cb;
|
||||
memset(&cb, 0, sizeof(cb));
|
||||
cb.debug_message = &debug_notify_callback;
|
||||
cb.data = this;
|
||||
if (pipe->set_debug_callback)
|
||||
pipe->set_debug_callback(pipe, &cb);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,7 +172,10 @@ st_enable_debug_output(struct st_context *st, boolean enable)
|
|||
return;
|
||||
|
||||
if (enable) {
|
||||
struct pipe_debug_callback cb = { st_debug_message, st };
|
||||
struct pipe_debug_callback cb;
|
||||
memset(&cb, 0, sizeof(cb));
|
||||
cb.debug_message = st_debug_message;
|
||||
cb.data = st;
|
||||
pipe->set_debug_callback(pipe, &cb);
|
||||
} else {
|
||||
pipe->set_debug_callback(pipe, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue