diff options
author | Samuel Pitoiset <[email protected]> | 2017-05-16 22:31:30 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-06-14 10:04:36 +0200 |
commit | 48fe8a6210c808669bf003b62a735c6fb4bd8742 (patch) | |
tree | aa7907257116d9cee93c92dbc989256cf5f517a3 /src/gallium | |
parent | 2c3a7d584095bacb129a3fbbd6ccd5eac34d1451 (diff) |
radeonsi: only decompress resident textures/images when used
When the current bound shaders don't use any bindless textures
or images, it's useless to decompress the resident resources.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_blit.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index 8fdc3f268b1..9c38ae9edc8 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -792,8 +792,17 @@ static void si_decompress_textures(struct si_context *sctx, unsigned shader_mask } } - si_decompress_resident_textures(sctx); - si_decompress_resident_images(sctx); + if (shader_mask & u_bit_consecutive(0, SI_NUM_GRAPHICS_SHADERS)) { + if (sctx->uses_bindless_samplers) + si_decompress_resident_textures(sctx); + if (sctx->uses_bindless_images) + si_decompress_resident_images(sctx); + } else if (shader_mask & (1 << PIPE_SHADER_COMPUTE)) { + if (sctx->cs_shader_state.program->uses_bindless_samplers) + si_decompress_resident_textures(sctx); + if (sctx->cs_shader_state.program->uses_bindless_images) + si_decompress_resident_images(sctx); + } si_check_render_feedback(sctx); } |