From: Marek Olšák <marek.ol...@amd.com> --- src/gallium/drivers/radeonsi/si_blit.c | 4 ++-- src/gallium/drivers/radeonsi/si_descriptors.c | 28 +++++++++++++-------------- src/gallium/drivers/radeonsi/si_pipe.h | 2 +- src/gallium/drivers/radeonsi/si_state.h | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index 74bc2e9..524b20a 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -648,25 +648,25 @@ static void si_decompress_textures(struct si_context *sctx, unsigned shader_mask { unsigned compressed_colortex_counter, mask; if (sctx->blitter->running) return; /* Update the compressed_colortex_mask if necessary. */ 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); if (sctx->samplers[i].needs_depth_decompress_mask) { si_decompress_sampler_depth_textures(sctx, &sctx->samplers[i]); } if (sctx->samplers[i].needs_color_decompress_mask) { si_decompress_sampler_color_textures(sctx, &sctx->samplers[i]); } if (sctx->images[i].needs_color_decompress_mask) { diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 0e8606f..b04d108 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -560,32 +560,32 @@ static bool color_needs_decompression(struct r600_texture *rtex) } static bool depth_needs_decompression(struct r600_texture *rtex, struct si_sampler_view *sview) { return rtex->db_compatible && (!rtex->tc_compatible_htile || !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; 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, enum pipe_shader_type shader, unsigned start, unsigned count, struct pipe_sampler_view **views) { struct si_context *sctx = (struct si_context *)ctx; struct si_textures_info *samplers = &sctx->samplers[shader]; int i; @@ -623,25 +623,25 @@ static void si_set_sampler_views(struct pipe_context *ctx, if (rtex->dcc_offset && p_atomic_read(&rtex->framebuffers_bound)) sctx->need_check_render_feedback = true; } else { samplers->needs_depth_decompress_mask &= ~(1u << slot); samplers->needs_color_decompress_mask &= ~(1u << slot); } } - 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; while (mask) { int i = u_bit_scan(&mask); struct pipe_resource *res = samplers->views.views[i]->texture; if (res && res->target != PIPE_BUFFER) { struct r600_texture *rtex = (struct r600_texture *)res; @@ -847,25 +847,25 @@ si_set_shader_images(struct pipe_context *pipe, assert(start_slot + count <= SI_NUM_IMAGES); if (views) { for (i = 0, slot = start_slot; i < count; ++i, ++slot) si_set_shader_image(ctx, shader, slot, &views[i], false); } else { for (i = 0, slot = start_slot; i < count; ++i, ++slot) 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; while (mask) { int i = u_bit_scan(&mask); struct pipe_resource *res = images->views[i].resource; if (res && res->target != PIPE_BUFFER) { struct r600_texture *rtex = (struct r600_texture *)res; @@ -1570,28 +1570,28 @@ static void si_set_polygon_stipple(struct pipe_context *ctx, cb.user_buffer = stipple; cb.buffer_size = sizeof(stipple); si_set_rw_buffer(sctx, SI_PS_CONST_POLY_STIPPLE, &cb); } /* TEXTURE METADATA ENABLE/DISABLE */ /* 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); } } /* BUFFER DISCARD/INVALIDATION */ /** Reset descriptors of buffer resources after \p buf has been invalidated. */ static void si_reset_buffer_resources(struct si_context *sctx, struct si_buffer_resources *buffers, unsigned descriptors_idx, unsigned slot_mask, @@ -1816,21 +1816,21 @@ void si_update_all_texture_descriptors(struct si_context *sctx) if (!view || !view->texture || view->texture->target == PIPE_BUFFER) continue; si_set_sampler_view(sctx, shader, i, samplers->views[i], true); } - si_update_compressed_tex_shader_mask(sctx, shader); + si_update_shader_needs_decompress_mask(sctx, shader); } } /* SHADER USER DATA */ static void si_mark_shader_pointers_dirty(struct si_context *sctx, unsigned shader) { sctx->shader_pointers_dirty |= u_bit_consecutive(SI_DESCS_FIRST_SHADER + shader * SI_NUM_SHADER_DESCS, diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index b5c7797..0aaec79 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -293,21 +293,21 @@ struct si_context { struct si_vertex_element *vertex_elements; unsigned sprite_coord_enable; bool flatshade; bool do_update_shaders; /* shader descriptors */ struct si_descriptors vertex_buffers; 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]; struct si_images_info images[SI_NUM_SHADERS]; /* other shader resources */ struct pipe_constant_buffer null_const_buf; /* used for set_constant_buffer(NULL) on CIK */ struct pipe_resource *esgs_ring; struct pipe_resource *gsvs_ring; struct pipe_resource *tf_ring; diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h index 4da51be..390e16f 100644 --- a/src/gallium/drivers/radeonsi/si_state.h +++ b/src/gallium/drivers/radeonsi/si_state.h @@ -319,21 +319,21 @@ void si_set_ring_buffer(struct pipe_context *ctx, uint slot, void si_init_all_descriptors(struct si_context *sctx); bool si_upload_vertex_buffer_descriptors(struct si_context *sctx); bool si_upload_graphics_shader_descriptors(struct si_context *sctx); bool si_upload_compute_shader_descriptors(struct si_context *sctx); void si_release_all_descriptors(struct si_context *sctx); void si_all_descriptors_begin_new_cs(struct si_context *sctx); void si_upload_const_buffer(struct si_context *sctx, struct r600_resource **rbuffer, 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); void si_set_rw_buffer(struct si_context *sctx, uint slot, const struct pipe_constant_buffer *input); void si_set_active_descriptors(struct si_context *sctx, unsigned desc_idx, uint64_t new_active_mask); void si_set_active_descriptors_for_shader(struct si_context *sctx, struct si_shader_selector *sel); -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev