radeonsi: get rid of more compressed_colortex_mask names
authorMarek Olšák <marek.olsak@amd.com>
Wed, 7 Jun 2017 20:29:10 +0000 (22:29 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 12 Jun 2017 16:24:37 +0000 (18:24 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_blit.c
src/gallium/drivers/radeonsi/si_descriptors.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_state.h

index 74bc2e9a51af7a14b4c83f57844e6adc6aea1e2e..524b20a04b50cc04d872534eca1d8d1bcf6b4660 100644 (file)
@@ -655,11 +655,11 @@ static void si_decompress_textures(struct si_context *sctx, unsigned shader_mask
        compressed_colortex_counter = p_atomic_read(&sctx->screen->b.compressed_colortex_counter);
        if (compressed_colortex_counter != sctx->b.last_compressed_colortex_counter) {
                sctx->b.last_compressed_colortex_counter = compressed_colortex_counter;
-               si_update_compressed_colortex_masks(sctx);
+               si_update_needs_color_decompress_masks(sctx);
        }
 
        /* Decompress color & depth textures if needed. */
-       mask = sctx->compressed_tex_shader_mask & shader_mask;
+       mask = sctx->shader_needs_decompress_mask & shader_mask;
        while (mask) {
                unsigned i = u_bit_scan(&mask);
 
index 0e8606f2bb39cd32b0dab0eb91dfcea940dbc4cf..b04d108a5431afb0f80b2ef9671283fd55ae672e 100644 (file)
@@ -567,8 +567,8 @@ static bool depth_needs_decompression(struct r600_texture *rtex,
                !r600_can_sample_zs(rtex, sview->is_stencil_sampler));
 }
 
-static void si_update_compressed_tex_shader_mask(struct si_context *sctx,
-                                                unsigned shader)
+static void si_update_shader_needs_decompress_mask(struct si_context *sctx,
+                                                  unsigned shader)
 {
        struct si_textures_info *samplers = &sctx->samplers[shader];
        unsigned shader_bit = 1 << shader;
@@ -576,9 +576,9 @@ static void si_update_compressed_tex_shader_mask(struct si_context *sctx,
        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;
+               sctx->shader_needs_decompress_mask |= shader_bit;
        else
-               sctx->compressed_tex_shader_mask &= ~shader_bit;
+               sctx->shader_needs_decompress_mask &= ~shader_bit;
 }
 
 static void si_set_sampler_views(struct pipe_context *ctx,
@@ -630,11 +630,11 @@ static void si_set_sampler_views(struct pipe_context *ctx,
                }
        }
 
-       si_update_compressed_tex_shader_mask(sctx, shader);
+       si_update_shader_needs_decompress_mask(sctx, shader);
 }
 
 static void
-si_samplers_update_compressed_colortex_mask(struct si_textures_info *samplers)
+si_samplers_update_needs_color_decompress_mask(struct si_textures_info *samplers)
 {
        unsigned mask = samplers->views.enabled_mask;
 
@@ -854,11 +854,11 @@ si_set_shader_images(struct pipe_context *pipe,
                        si_set_shader_image(ctx, shader, slot, NULL, false);
        }
 
-       si_update_compressed_tex_shader_mask(ctx, shader);
+       si_update_shader_needs_decompress_mask(ctx, shader);
 }
 
 static void
-si_images_update_compressed_colortex_mask(struct si_images_info *images)
+si_images_update_needs_color_decompress_mask(struct si_images_info *images)
 {
        unsigned mask = images->enabled_mask;
 
@@ -1577,14 +1577,14 @@ static void si_set_polygon_stipple(struct pipe_context *ctx,
 
 /* CMASK can be enabled (for fast clear) and disabled (for texture export)
  * while the texture is bound, possibly by a different context. In that case,
- * call this function to update compressed_colortex_masks.
+ * call this function to update needs_*_decompress_masks.
  */
-void si_update_compressed_colortex_masks(struct si_context *sctx)
+void si_update_needs_color_decompress_masks(struct si_context *sctx)
 {
        for (int i = 0; i < SI_NUM_SHADERS; ++i) {
-               si_samplers_update_compressed_colortex_mask(&sctx->samplers[i]);
-               si_images_update_compressed_colortex_mask(&sctx->images[i]);
-               si_update_compressed_tex_shader_mask(sctx, i);
+               si_samplers_update_needs_color_decompress_mask(&sctx->samplers[i]);
+               si_images_update_needs_color_decompress_mask(&sctx->images[i]);
+               si_update_shader_needs_decompress_mask(sctx, i);
        }
 }
 
@@ -1823,7 +1823,7 @@ void si_update_all_texture_descriptors(struct si_context *sctx)
                                            samplers->views[i], true);
                }
 
-               si_update_compressed_tex_shader_mask(sctx, shader);
+               si_update_shader_needs_decompress_mask(sctx, shader);
        }
 }
 
index b5c77973cceb90797382380b76e8eb73434df718..0aaec797ac9c7cc72771d4dbe85ec13272c2a8df 100644 (file)
@@ -300,7 +300,7 @@ struct si_context {
        struct si_descriptors           descriptors[SI_NUM_DESCS];
        unsigned                        descriptors_dirty;
        unsigned                        shader_pointers_dirty;
-       unsigned                        compressed_tex_shader_mask;
+       unsigned                        shader_needs_decompress_mask;
        struct si_buffer_resources      rw_buffers;
        struct si_buffer_resources      const_and_shader_buffers[SI_NUM_SHADERS];
        struct si_textures_info         samplers[SI_NUM_SHADERS];
index 4da51be3eafa98974c892097e398d81434e9b559..390e16fa1eb96c23cb5933f9eca5c9b1311bb586 100644 (file)
@@ -326,7 +326,7 @@ void si_upload_const_buffer(struct si_context *sctx, struct r600_resource **rbuf
                            const uint8_t *ptr, unsigned size, uint32_t *const_offset);
 void si_update_all_texture_descriptors(struct si_context *sctx);
 void si_shader_change_notify(struct si_context *sctx);
-void si_update_compressed_colortex_masks(struct si_context *sctx);
+void si_update_needs_color_decompress_masks(struct si_context *sctx);
 void si_emit_graphics_shader_userdata(struct si_context *sctx,
                                       struct r600_atom *atom);
 void si_emit_compute_shader_userdata(struct si_context *sctx);