diff options
author | Marek Olšák <[email protected]> | 2013-09-22 21:47:35 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-09-29 15:18:09 +0200 |
commit | 09fc5d6e262aeb1b21faf6d952c204588602ef97 (patch) | |
tree | 2b853597813c9e1acf6169823af5e58959f05fc4 /src/gallium/drivers/radeonsi/radeonsi_pipe.c | |
parent | 68f6dec32ed5eede361f76c8dbdf897652659baf (diff) |
radeonsi: implement clear_buffer using CP DMA, initialize CMASK with it
More work needs to be done for this to be entirely shared with r600g.
I'm just trying to share r600_texture.c now.
The reason I put the implementation to si_descriptors.c is that the emit
function had already been there.
Diffstat (limited to 'src/gallium/drivers/radeonsi/radeonsi_pipe.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/radeonsi_pipe.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.c b/src/gallium/drivers/radeonsi/radeonsi_pipe.c index 5528e1968a3..8ed5d26a0e9 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_pipe.c +++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.c @@ -653,6 +653,8 @@ static void r600_destroy_screen(struct pipe_screen* pscreen) if (!radeon_winsys_unref(rscreen->b.ws)) return; + r600_common_screen_cleanup(&rscreen->b); + if (rscreen->fences.bo) { struct r600_fence_block *entry, *tmp; @@ -823,18 +825,8 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws) return NULL; } - r600_common_screen_init(&rscreen->b, ws); - - if (debug_get_bool_option("RADEON_PRINT_TEXDEPTH", FALSE)) - rscreen->b.debug_flags |= DBG_TEX_DEPTH; - if (debug_get_bool_option("RADEON_DUMP_SHADERS", FALSE)) - rscreen->b.debug_flags |= DBG_FS | DBG_VS | DBG_GS | DBG_PS | DBG_CS; - - if (r600_init_tiling(rscreen)) { - FREE(rscreen); - 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; @@ -844,12 +836,9 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws) rscreen->b.b.get_compute_param = r600_get_compute_param; rscreen->b.b.get_timestamp = r600_get_timestamp; rscreen->b.b.is_format_supported = si_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; - r600_init_screen_resource_functions(&rscreen->b.b); - 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; @@ -857,6 +846,19 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws) 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); + + if (debug_get_bool_option("RADEON_PRINT_TEXDEPTH", FALSE)) + rscreen->b.debug_flags |= DBG_TEX_DEPTH; + if (debug_get_bool_option("RADEON_DUMP_SHADERS", FALSE)) + rscreen->b.debug_flags |= DBG_FS | DBG_VS | DBG_GS | DBG_PS | DBG_CS; + + if (r600_init_tiling(rscreen)) { + FREE(rscreen); + return NULL; + } util_format_s3tc_init(); |