diff options
author | Marek Olšák <marek.olsak@amd.com> | 2022-05-14 20:51:47 -0400 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-05-17 10:27:04 +0000 |
commit | 1fdc3b0fdec84893618e59187b58da92311b8d28 (patch) | |
tree | 94603b2aaefd994cbcb2ddb3e754b189109cebaf /src/gallium/winsys/radeon/drm | |
parent | 32c7805ccca331f726da684a4e74f7d1138daa3d (diff) |
radeonsi: move CS preamble emission into the winsys
The preamble will be skipped by the kernel if there is no context switch.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16509>
Diffstat (limited to 'src/gallium/winsys/radeon/drm')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c index 9199654ef00..2e3991aa076 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c @@ -215,6 +215,13 @@ radeon_drm_cs_create(struct radeon_cmdbuf *rcs, return true; } +static void radeon_drm_cs_set_preamble(struct radeon_cmdbuf *cs, const uint32_t *preamble_ib, + unsigned preamble_num_dw, bool preamble_changed) +{ + /* The radeon kernel driver doesn't support preambles. */ + radeon_emit_array(cs, preamble_ib, preamble_num_dw); +} + int radeon_lookup_buffer(struct radeon_cs_context *csc, struct radeon_bo *bo) { unsigned hash = bo->hash & (ARRAY_SIZE(csc->reloc_indices_hashlist)-1); @@ -853,6 +860,7 @@ void radeon_drm_cs_init_functions(struct radeon_drm_winsys *ws) ws->base.ctx_destroy = radeon_drm_ctx_destroy; ws->base.ctx_query_reset_status = radeon_drm_ctx_query_reset_status; ws->base.cs_create = radeon_drm_cs_create; + ws->base.cs_set_preamble = radeon_drm_cs_set_preamble; ws->base.cs_destroy = radeon_drm_cs_destroy; ws->base.cs_add_buffer = radeon_drm_cs_add_buffer; ws->base.cs_lookup_buffer = radeon_drm_cs_lookup_buffer; |