radeonsi: keep track of the sampler state for texture handles
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 19 Jun 2017 15:34:45 +0000 (17:34 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 20 Jun 2017 08:14:52 +0000 (10:14 +0200)
Needed for updating all resident texture descriptors when
dirty_tex_counter changes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_descriptors.c
src/gallium/drivers/radeonsi/si_pipe.h

index cb9c47c0d8351392f4668f9e9395645191227555..e792cf63d509ea68aedd87c52633164839f58af9 100644 (file)
@@ -2297,6 +2297,7 @@ static uint64_t si_create_texture_handle(struct pipe_context *ctx,
        }
 
        si_set_sampler_view_desc(sctx, sview, sstate, &desc_list[0]);
+       memcpy(&tex_handle->sstate, sstate, sizeof(*sstate));
        ctx->delete_sampler_state(ctx, sstate);
 
        tex_handle->desc = si_create_bindless_descriptor(sctx, desc_list,
index afe68a3d35d26367dcf458367599c16b24f96726..0c77f933127016a7848e1532e8063779055837d7 100644 (file)
@@ -243,6 +243,7 @@ struct si_texture_handle
 {
        struct si_bindless_descriptor   *desc;
        struct pipe_sampler_view        *view;
+       struct si_sampler_state         sstate;
 };
 
 struct si_image_handle