From f00e80e3f7d357d1540f4e743e44b199265d6f56 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 19 Jun 2017 17:34:45 +0200 Subject: [PATCH] radeonsi: keep track of the sampler state for texture handles MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Needed for updating all resident texture descriptors when dirty_tex_counter changes. Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_descriptors.c | 1 + src/gallium/drivers/radeonsi/si_pipe.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index cb9c47c0d83..e792cf63d50 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -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, diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index afe68a3d35d..0c77f933127 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -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 -- 2.30.2