st/nine: Add new function to know if we are the worker
This will be useful in a later patch Signed-off-by: Axel Davy <davyaxel0@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9377>
This commit is contained in:
parent
fd017458bc
commit
6087ff44ae
|
@ -317,6 +317,17 @@ nine_context_get_pipe_release( struct NineDevice9 *device )
|
|||
nine_csmt_resume(device);
|
||||
}
|
||||
|
||||
bool
|
||||
nine_context_is_worker( struct NineDevice9 *device )
|
||||
{
|
||||
struct csmt_context *ctx = device->csmt_ctx;
|
||||
|
||||
if (!device->csmt_active)
|
||||
return false;
|
||||
|
||||
return u_thread_is_self(ctx->worker);
|
||||
}
|
||||
|
||||
/* Nine state functions */
|
||||
|
||||
/* Check if some states need to be set dirty */
|
||||
|
|
|
@ -672,4 +672,7 @@ nine_context_get_pipe_acquire( struct NineDevice9 *device );
|
|||
void
|
||||
nine_context_get_pipe_release( struct NineDevice9 *device );
|
||||
|
||||
bool
|
||||
nine_context_is_worker( struct NineDevice9 *device );
|
||||
|
||||
#endif /* _NINE_STATE_H_ */
|
||||
|
|
Loading…
Reference in New Issue