mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-30 09:20:23 +01:00
radeonsi/winsys: add cs_get_ip_type function
Will be used in the next commit. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26774>
This commit is contained in:
parent
c1f08608b8
commit
a2cfd4186f
3 changed files with 20 additions and 0 deletions
|
|
@ -676,6 +676,11 @@ struct radeon_winsys {
|
|||
*/
|
||||
void (*cs_add_syncobj_signal)(struct radeon_cmdbuf *cs, struct pipe_fence_handle *fence);
|
||||
|
||||
/**
|
||||
* Returns the amd_ip_type type of a CS.
|
||||
*/
|
||||
enum amd_ip_type (*cs_get_ip_type)(struct radeon_cmdbuf *cs);
|
||||
|
||||
/**
|
||||
* Wait for the fence and return true if the fence has been signalled.
|
||||
* The timeout of 0 will only return the status.
|
||||
|
|
|
|||
|
|
@ -940,6 +940,13 @@ static void amdgpu_destroy_cs_context(struct amdgpu_winsys *ws, struct amdgpu_cs
|
|||
}
|
||||
|
||||
|
||||
static enum amd_ip_type amdgpu_cs_get_ip_type(struct radeon_cmdbuf *rcs)
|
||||
{
|
||||
struct amdgpu_cs *cs = amdgpu_cs(rcs);
|
||||
return cs->ip_type;
|
||||
}
|
||||
|
||||
|
||||
static bool
|
||||
amdgpu_cs_create(struct radeon_cmdbuf *rcs,
|
||||
struct radeon_winsys_ctx *rwctx,
|
||||
|
|
@ -1815,6 +1822,7 @@ void amdgpu_cs_init_functions(struct amdgpu_screen_winsys *ws)
|
|||
ws->base.cs_sync_flush = amdgpu_cs_sync_flush;
|
||||
ws->base.cs_add_fence_dependency = amdgpu_cs_add_fence_dependency;
|
||||
ws->base.cs_add_syncobj_signal = amdgpu_cs_add_syncobj_signal;
|
||||
ws->base.cs_get_ip_type = amdgpu_cs_get_ip_type;
|
||||
ws->base.fence_wait = amdgpu_fence_wait_rel_timeout;
|
||||
ws->base.fence_reference = amdgpu_fence_reference;
|
||||
ws->base.fence_import_syncobj = amdgpu_fence_import_syncobj;
|
||||
|
|
|
|||
|
|
@ -167,6 +167,13 @@ static void radeon_destroy_cs_context(struct radeon_cs_context *csc)
|
|||
}
|
||||
|
||||
|
||||
static enum amd_ip_type radeon_drm_cs_get_ip_type(struct radeon_cmdbuf *rcs)
|
||||
{
|
||||
struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
|
||||
return cs->ip_type;
|
||||
}
|
||||
|
||||
|
||||
static bool
|
||||
radeon_drm_cs_create(struct radeon_cmdbuf *rcs,
|
||||
struct radeon_winsys_ctx *ctx,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue