From 215613ba35f2d19097583682a3f740bcb03d25c5 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Wed, 16 Nov 2022 16:24:54 +0100 Subject: [PATCH] etnaviv: drop useless ts_for_sampler_view pointer check Both state and desc texture implementations set this function pointer, so there is no point in guarding against its absence. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/drivers/etnaviv/etnaviv_texture.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture.c b/src/gallium/drivers/etnaviv/etnaviv_texture.c index 27557bc6270..e5857f37f85 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_texture.c +++ b/src/gallium/drivers/etnaviv/etnaviv_texture.c @@ -176,7 +176,7 @@ etna_update_sampler_source(struct pipe_sampler_view *view, int num) to->seqno = from->seqno; ctx->dirty |= ETNA_DIRTY_TEXTURE_CACHES; } else if ((to == from) && etna_resource_needs_flush(to)) { - if (ctx->ts_for_sampler_view && etna_can_use_sampler_ts(view, num)) { + if (etna_can_use_sampler_ts(view, num)) { enable_sampler_ts = true; /* Do not set flush_seqno because the resolve-to-self was bypassed */ } else { @@ -190,8 +190,7 @@ etna_update_sampler_source(struct pipe_sampler_view *view, int num) to->flush_seqno = from->seqno; ctx->dirty |= ETNA_DIRTY_TEXTURE_CACHES; } - if (ctx->ts_for_sampler_view && - etna_configure_sampler_ts(ctx->ts_for_sampler_view(view), view, enable_sampler_ts)) { + if (etna_configure_sampler_ts(ctx->ts_for_sampler_view(view), view, enable_sampler_ts)) { ctx->dirty |= ETNA_DIRTY_SAMPLER_VIEWS | ETNA_DIRTY_TEXTURE_CACHES; ctx->dirty_sampler_views |= (1 << num); }