summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.c')
-rw-r--r--src/gallium/drivers/r600/r600_pipe.c65
1 files changed, 29 insertions, 36 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 4527673172e..fd5c2a8e0ff 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -950,8 +950,7 @@ static void r600_destroy_screen(struct pipe_screen* pscreen)
if (!radeon_winsys_unref(rscreen->b.ws))
return;
- pipe_mutex_destroy(rscreen->aux_context_lock);
- rscreen->aux_context->destroy(rscreen->aux_context);
+ r600_common_screen_cleanup(&rscreen->b);
if (rscreen->global_pool) {
compute_memory_pool_delete(rscreen->global_pool);
@@ -1197,6 +1196,34 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
return NULL;
}
+ /* Set functions first. */
+ rscreen->b.b.context_create = r600_create_context;
+ rscreen->b.b.destroy = r600_destroy_screen;
+ rscreen->b.b.get_name = r600_get_name;
+ rscreen->b.b.get_vendor = r600_get_vendor;
+ rscreen->b.b.get_param = r600_get_param;
+ rscreen->b.b.get_shader_param = r600_get_shader_param;
+ rscreen->b.b.get_paramf = r600_get_paramf;
+ rscreen->b.b.get_compute_param = r600_get_compute_param;
+ rscreen->b.b.get_timestamp = r600_get_timestamp;
+ if (rscreen->b.chip_class >= EVERGREEN) {
+ rscreen->b.b.is_format_supported = evergreen_is_format_supported;
+ } else {
+ rscreen->b.b.is_format_supported = r600_is_format_supported;
+ }
+ rscreen->b.b.fence_reference = r600_fence_reference;
+ rscreen->b.b.fence_signalled = r600_fence_signalled;
+ rscreen->b.b.fence_finish = r600_fence_finish;
+ rscreen->b.b.get_driver_query_info = r600_get_driver_query_info;
+ if (rscreen->b.info.has_uvd) {
+ rscreen->b.b.get_video_param = ruvd_get_video_param;
+ rscreen->b.b.is_video_format_supported = ruvd_is_format_supported;
+ } else {
+ rscreen->b.b.get_video_param = r600_get_video_param;
+ rscreen->b.b.is_video_format_supported = vl_video_buffer_is_format_supported;
+ }
+ r600_init_screen_resource_functions(&rscreen->b.b);
+
r600_common_screen_init(&rscreen->b, ws);
rscreen->b.debug_flags |= debug_get_flags_option("R600_DEBUG", r600_debug_options, 0);
@@ -1266,36 +1293,6 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
return NULL;
}
- rscreen->b.b.destroy = r600_destroy_screen;
- rscreen->b.b.get_name = r600_get_name;
- rscreen->b.b.get_vendor = r600_get_vendor;
- rscreen->b.b.get_param = r600_get_param;
- rscreen->b.b.get_shader_param = r600_get_shader_param;
- rscreen->b.b.get_paramf = r600_get_paramf;
- rscreen->b.b.get_compute_param = r600_get_compute_param;
- rscreen->b.b.get_timestamp = r600_get_timestamp;
-
- if (rscreen->b.chip_class >= EVERGREEN) {
- rscreen->b.b.is_format_supported = evergreen_is_format_supported;
- } else {
- rscreen->b.b.is_format_supported = r600_is_format_supported;
- }
- rscreen->b.b.context_create = r600_create_context;
- rscreen->b.b.fence_reference = r600_fence_reference;
- rscreen->b.b.fence_signalled = r600_fence_signalled;
- rscreen->b.b.fence_finish = r600_fence_finish;
- rscreen->b.b.get_driver_query_info = r600_get_driver_query_info;
-
- if (rscreen->b.info.has_uvd) {
- rscreen->b.b.get_video_param = ruvd_get_video_param;
- rscreen->b.b.is_video_format_supported = ruvd_is_format_supported;
- } else {
- rscreen->b.b.get_video_param = r600_get_video_param;
- rscreen->b.b.is_video_format_supported = vl_video_buffer_is_format_supported;
- }
-
- r600_init_screen_resource_functions(&rscreen->b.b);
-
util_format_s3tc_init();
rscreen->fences.bo = NULL;
@@ -1319,10 +1316,6 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
}
}
- /* Create the auxiliary context. */
- pipe_mutex_init(rscreen->aux_context_lock);
- rscreen->aux_context = rscreen->b.b.context_create(&rscreen->b.b, NULL);
-
#if 0 /* This is for testing whether aux_context and buffer clearing work correctly. */
struct pipe_resource templ = {};