From: Samuel Pitoiset Date: Mon, 19 Jun 2017 15:34:45 +0000 (+0200) Subject: radeonsi: keep track of the sampler state for texture handles X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f00e80e3f7d357d1540f4e743e44b199265d6f56;p=mesa.git radeonsi: keep track of the sampler state for texture handles Needed for updating all resident texture descriptors when dirty_tex_counter changes. Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- 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