summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state_draw.c
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-05-17 21:45:50 +0200
committerMarek Olšák <marek.olsak@amd.com>2016-06-01 17:35:30 +0200
commit30b2b860b0c691484f65a40b44c5175fb9fd9de0 (patch)
tree139cbaa0972e460d2165b4bd7f00df20fac08c85 /src/gallium/drivers/radeonsi/si_state_draw.c
parent28de7aec0ca98a407ba78fa28934588dec2a5a02 (diff)
downloadexternal_mesa3d-30b2b860b0c691484f65a40b44c5175fb9fd9de0.zip
external_mesa3d-30b2b860b0c691484f65a40b44c5175fb9fd9de0.tar.gz
external_mesa3d-30b2b860b0c691484f65a40b44c5175fb9fd9de0.tar.bz2
radeonsi: implement global resetting of texture descriptors
it will be used by texture reallocation Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state_draw.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_state_draw.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index 788869e..c7590cb 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -808,7 +808,7 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
struct si_context *sctx = (struct si_context *)ctx;
struct si_state_rasterizer *rs = sctx->queued.named.rasterizer;
struct pipe_index_buffer ib = {};
- unsigned mask, dirty_fb_counter;
+ unsigned mask, dirty_fb_counter, dirty_tex_counter;
if (!info->count && !info->indirect &&
(info->indexed || !info->count_from_stream_output))
@@ -837,6 +837,13 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
si_mark_atom_dirty(sctx, &sctx->framebuffer.atom);
}
+ /* Invalidate & recompute texture descriptors if needed. */
+ dirty_tex_counter = p_atomic_read(&sctx->b.screen->dirty_tex_descriptor_counter);
+ if (dirty_tex_counter != sctx->b.last_dirty_tex_descriptor_counter) {
+ sctx->b.last_dirty_tex_descriptor_counter = dirty_tex_counter;
+ si_update_all_texture_descriptors(sctx);
+ }
+
si_decompress_graphics_textures(sctx);
/* Set the rasterization primitive type.