diff options
author | Marek Olšák <[email protected]> | 2017-06-07 00:51:23 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-08 23:29:07 +0200 |
commit | d8a577d96e91493fb281b460c31bac27bcce4599 (patch) | |
tree | 9576cd474b035a0baa01f8be39942ddc948521db | |
parent | da26de5ff744aeadb3fa9b56c64c412d50bbc94c (diff) |
radeonsi: rename shader resource decompress masks to their true meaning
Reviewed-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_blit.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_descriptors.c | 38 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 6 |
3 files changed, 28 insertions, 28 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index 46cb6469b66..20b08b6afb1 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -395,7 +395,7 @@ si_flush_depth_textures(struct si_context *sctx, struct si_textures_info *textures) { unsigned i; - unsigned mask = textures->depth_texture_mask; + unsigned mask = textures->needs_depth_decompress_mask; while (mask) { struct pipe_sampler_view *view; @@ -507,7 +507,7 @@ si_decompress_sampler_color_textures(struct si_context *sctx, struct si_textures_info *textures) { unsigned i; - unsigned mask = textures->compressed_colortex_mask; + unsigned mask = textures->needs_color_decompress_mask; while (mask) { struct pipe_sampler_view *view; @@ -530,7 +530,7 @@ si_decompress_image_color_textures(struct si_context *sctx, struct si_images_info *images) { unsigned i; - unsigned mask = images->compressed_colortex_mask; + unsigned mask = images->needs_color_decompress_mask; while (mask) { const struct pipe_image_view *view; @@ -664,13 +664,13 @@ static void si_decompress_textures(struct si_context *sctx, unsigned shader_mask while (mask) { unsigned i = u_bit_scan(&mask); - if (sctx->samplers[i].depth_texture_mask) { + if (sctx->samplers[i].needs_depth_decompress_mask) { si_flush_depth_textures(sctx, &sctx->samplers[i]); } - if (sctx->samplers[i].compressed_colortex_mask) { + if (sctx->samplers[i].needs_color_decompress_mask) { si_decompress_sampler_color_textures(sctx, &sctx->samplers[i]); } - if (sctx->images[i].compressed_colortex_mask) { + if (sctx->images[i].needs_color_decompress_mask) { si_decompress_image_color_textures(sctx, &sctx->images[i]); } } diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 6955b9daf69..3aa2b9d3fb1 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -580,9 +580,9 @@ static void si_update_compressed_tex_shader_mask(struct si_context *sctx, struct si_textures_info *samplers = &sctx->samplers[shader]; unsigned shader_bit = 1 << shader; - if (samplers->depth_texture_mask || - samplers->compressed_colortex_mask || - sctx->images[shader].compressed_colortex_mask) + if (samplers->needs_depth_decompress_mask || + samplers->needs_color_decompress_mask || + sctx->images[shader].needs_color_decompress_mask) sctx->compressed_tex_shader_mask |= shader_bit; else sctx->compressed_tex_shader_mask &= ~shader_bit; @@ -604,8 +604,8 @@ static void si_set_sampler_views(struct pipe_context *ctx, unsigned slot = start + i; if (!views || !views[i]) { - samplers->depth_texture_mask &= ~(1u << slot); - samplers->compressed_colortex_mask &= ~(1u << slot); + samplers->needs_depth_decompress_mask &= ~(1u << slot); + samplers->needs_color_decompress_mask &= ~(1u << slot); si_set_sampler_view(sctx, shader, slot, NULL, false); continue; } @@ -618,22 +618,22 @@ static void si_set_sampler_views(struct pipe_context *ctx, struct si_sampler_view *rview = (struct si_sampler_view *)views[i]; if (depth_needs_decompression(rtex, rview)) { - samplers->depth_texture_mask |= 1u << slot; + samplers->needs_depth_decompress_mask |= 1u << slot; } else { - samplers->depth_texture_mask &= ~(1u << slot); + samplers->needs_depth_decompress_mask &= ~(1u << slot); } if (color_needs_decompression(rtex)) { - samplers->compressed_colortex_mask |= 1u << slot; + samplers->needs_color_decompress_mask |= 1u << slot; } else { - samplers->compressed_colortex_mask &= ~(1u << slot); + samplers->needs_color_decompress_mask &= ~(1u << slot); } if (rtex->dcc_offset && p_atomic_read(&rtex->framebuffers_bound)) sctx->need_check_render_feedback = true; } else { - samplers->depth_texture_mask &= ~(1u << slot); - samplers->compressed_colortex_mask &= ~(1u << slot); + samplers->needs_depth_decompress_mask &= ~(1u << slot); + samplers->needs_color_decompress_mask &= ~(1u << slot); } } @@ -653,9 +653,9 @@ si_samplers_update_compressed_colortex_mask(struct si_textures_info *samplers) struct r600_texture *rtex = (struct r600_texture *)res; if (color_needs_decompression(rtex)) { - samplers->compressed_colortex_mask |= 1u << i; + samplers->needs_color_decompress_mask |= 1u << i; } else { - samplers->compressed_colortex_mask &= ~(1u << i); + samplers->needs_color_decompress_mask &= ~(1u << i); } } } @@ -702,7 +702,7 @@ si_disable_shader_image(struct si_context *ctx, unsigned shader, unsigned slot) unsigned desc_slot = si_get_image_slot(slot); pipe_resource_reference(&images->views[slot].resource, NULL); - images->compressed_colortex_mask &= ~(1 << slot); + images->needs_color_decompress_mask &= ~(1 << slot); memcpy(descs->list + desc_slot*8, null_image_descriptor, 8*4); images->enabled_mask &= ~(1u << slot); @@ -756,7 +756,7 @@ static void si_set_shader_image(struct si_context *ctx, view->u.buf.size, desc); si_set_buf_desc_address(res, view->u.buf.offset, desc + 4); - images->compressed_colortex_mask &= ~(1 << slot); + images->needs_color_decompress_mask &= ~(1 << slot); res->bind_history |= PIPE_BIND_SHADER_IMAGE; } else { static const unsigned char swizzle[4] = { 0, 1, 2, 3 }; @@ -782,9 +782,9 @@ static void si_set_shader_image(struct si_context *ctx, } if (color_needs_decompression(tex)) { - images->compressed_colortex_mask |= 1 << slot; + images->needs_color_decompress_mask |= 1 << slot; } else { - images->compressed_colortex_mask &= ~(1 << slot); + images->needs_color_decompress_mask &= ~(1 << slot); } if (uses_dcc && @@ -877,9 +877,9 @@ si_images_update_compressed_colortex_mask(struct si_images_info *images) struct r600_texture *rtex = (struct r600_texture *)res; if (color_needs_decompression(rtex)) { - images->compressed_colortex_mask |= 1 << i; + images->needs_color_decompress_mask |= 1 << i; } else { - images->compressed_colortex_mask &= ~(1 << i); + images->needs_color_decompress_mask &= ~(1 << i); } } } diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index 55599464843..b5c77973cce 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -153,13 +153,13 @@ struct si_cs_shader_state { struct si_textures_info { struct si_sampler_views views; - uint32_t depth_texture_mask; /* which textures are depth */ - uint32_t compressed_colortex_mask; + uint32_t needs_depth_decompress_mask; + uint32_t needs_color_decompress_mask; }; struct si_images_info { struct pipe_image_view views[SI_NUM_IMAGES]; - uint32_t compressed_colortex_mask; + uint32_t needs_color_decompress_mask; unsigned enabled_mask; }; |