diff options
author | Marek Olšák <[email protected]> | 2016-06-11 17:28:52 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-06-24 12:24:40 +0200 |
commit | cbb5adb90893a7c03f96f72f0665766a4007affd (patch) | |
tree | 3391dfaf4e7929f214fa9a739c64f94abb9f5393 /src/gallium/winsys | |
parent | 4a06786efd42abfdb0babf65ed4ac59ae58fe4b5 (diff) |
gallium/u_queue: allow the execute function to differ per job
so that independent types of jobs can use the same queue.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 3 | ||||
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 2 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 3 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 3 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c index 5636f834de1..8c1e9fbb11f 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c @@ -1052,7 +1052,8 @@ static void amdgpu_cs_flush(struct radeon_winsys_cs *rcs, /* Submit. */ if ((flags & RADEON_FLUSH_ASYNC) && util_queue_is_initialized(&ws->cs_queue)) { - util_queue_add_job(&ws->cs_queue, cs, &cs->flush_completed); + util_queue_add_job(&ws->cs_queue, cs, &cs->flush_completed, + amdgpu_cs_submit_ib); } else { amdgpu_cs_submit_ib(cs, 0); } diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index 8782665cca9..2a0b66d8dda 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c @@ -493,7 +493,7 @@ amdgpu_winsys_create(int fd, radeon_screen_create_t screen_create) pipe_mutex_init(ws->bo_fence_lock); if (sysconf(_SC_NPROCESSORS_ONLN) > 1 && debug_get_option_thread()) - util_queue_init(&ws->cs_queue, "amdgpu_cs", 8, 1, amdgpu_cs_submit_ib); + util_queue_init(&ws->cs_queue, "amdgpu_cs", 8, 1); /* Create the screen at the end. The winsys must be initialized * completely. diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c index 9532a6a0f0f..efefd7517e7 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c @@ -586,7 +586,8 @@ static void radeon_drm_cs_flush(struct radeon_winsys_cs *rcs, } if (util_queue_is_initialized(&cs->ws->cs_queue)) { - util_queue_add_job(&cs->ws->cs_queue, cs, &cs->flush_completed); + util_queue_add_job(&cs->ws->cs_queue, cs, &cs->flush_completed, + radeon_drm_cs_emit_ioctl_oneshot); if (!(flags & RADEON_FLUSH_ASYNC)) radeon_drm_cs_sync_flush(rcs); } else { diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c index ea5d212803c..f5f9d420722 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c @@ -783,8 +783,7 @@ radeon_drm_winsys_create(int fd, radeon_screen_create_t screen_create) ws->info.gart_page_size = sysconf(_SC_PAGESIZE); if (ws->num_cpus > 1 && debug_get_option_thread()) - util_queue_init(&ws->cs_queue, "radeon_cs", 8, 1, - radeon_drm_cs_emit_ioctl_oneshot); + util_queue_init(&ws->cs_queue, "radeon_cs", 8, 1); /* Create the screen at the end. The winsys must be initialized * completely. |