diff options
author | Marek Olšák <[email protected]> | 2018-01-07 21:04:55 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-02-21 20:03:11 +0100 |
commit | 5f55f4c59fba483eb781da291f254c52845d8bc2 (patch) | |
tree | ffa88f898d5211b949d8fde7f8427d545995075b | |
parent | 81dd4a76373c7392aaff9fc3fa3a660fc01ed864 (diff) |
radeonsi: make texture_discard_cmask/eliminate functions non-static
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.h | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 20 |
2 files changed, 13 insertions, 11 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index 4f3aa1fe3ce..79419036665 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -599,6 +599,10 @@ void si_texture_get_fmask_info(struct si_screen *sscreen, void si_texture_get_cmask_info(struct si_screen *sscreen, struct r600_texture *rtex, struct r600_cmask_info *out); +void si_eliminate_fast_color_clear(struct r600_common_context *rctx, + struct r600_texture *rtex); +void si_texture_discard_cmask(struct si_screen *sscreen, + struct r600_texture *rtex); bool si_init_flushed_depth_texture(struct pipe_context *ctx, struct pipe_resource *texture, struct r600_texture **staging); diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 36eff40949f..a0e91292c3d 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -36,8 +36,6 @@ #include "state_tracker/drm_driver.h" #include "amd/common/sid.h" -static void r600_texture_discard_cmask(struct si_screen *sscreen, - struct r600_texture *rtex); static enum radeon_surf_mode r600_choose_tiling(struct si_screen *sscreen, const struct pipe_resource *templ); @@ -90,7 +88,7 @@ bool si_prepare_for_dma_blit(struct r600_common_context *rctx, src_box->height, src_box->depth)) return false; - r600_texture_discard_cmask(rctx->screen, rdst); + si_texture_discard_cmask(rctx->screen, rdst); } /* All requirements are met. Prepare textures for SDMA. */ @@ -382,8 +380,8 @@ static void r600_surface_import_metadata(struct si_screen *sscreen, } } -static void r600_eliminate_fast_color_clear(struct r600_common_context *rctx, - struct r600_texture *rtex) +void si_eliminate_fast_color_clear(struct r600_common_context *rctx, + struct r600_texture *rtex) { struct si_screen *sscreen = rctx->screen; struct pipe_context *ctx = &rctx->b; @@ -398,8 +396,8 @@ static void r600_eliminate_fast_color_clear(struct r600_common_context *rctx, mtx_unlock(&sscreen->aux_context_lock); } -static void r600_texture_discard_cmask(struct si_screen *sscreen, - struct r600_texture *rtex) +void si_texture_discard_cmask(struct si_screen *sscreen, + struct r600_texture *rtex) { if (!rtex->cmask.size) return; @@ -531,7 +529,7 @@ static void r600_reallocate_texture_inplace(struct r600_common_context *rctx, } if (new_bind_flag == PIPE_BIND_LINEAR) { - r600_texture_discard_cmask(rctx->screen, rtex); + si_texture_discard_cmask(rctx->screen, rtex); r600_texture_discard_dcc(rctx->screen, rtex); } @@ -725,7 +723,7 @@ static boolean r600_texture_get_handle(struct pipe_screen* screen, if (!(usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH) && (rtex->cmask.size || rtex->dcc_offset)) { /* Eliminate fast clear (both CMASK and DCC) */ - r600_eliminate_fast_color_clear(rctx, rtex); + si_eliminate_fast_color_clear(rctx, rtex); /* eliminate_fast_color_clear flushes the context */ flush = false; @@ -733,7 +731,7 @@ static boolean r600_texture_get_handle(struct pipe_screen* screen, * to be called. */ if (rtex->cmask.size) - r600_texture_discard_cmask(sscreen, rtex); + si_texture_discard_cmask(sscreen, rtex); } /* Set metadata. */ @@ -2270,7 +2268,7 @@ void vi_separate_dcc_try_enable(struct r600_common_context *rctx, assert(tex->surface.num_dcc_levels); assert(!tex->dcc_separate_buffer); - r600_texture_discard_cmask(rctx->screen, tex); + si_texture_discard_cmask(rctx->screen, tex); /* Get a DCC buffer. */ if (tex->last_dcc_separate_buffer) { |