From c2d571934d67a1a652626eb11f9bafb2cd14e2f5 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 12 Mar 2021 01:20:52 +0000 Subject: [PATCH] panfrost: Simplify panfrost_bind_sampler_states Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_context.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 78e5a325014..0d15f3487f1 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -938,12 +938,9 @@ panfrost_bind_sampler_states( struct panfrost_context *ctx = pan_context(pctx); - /* XXX: Should upload, not just copy? */ - ctx->sampler_count[shader] = num_sampler; + ctx->sampler_count[shader] = sampler ? num_sampler : 0; if (sampler) memcpy(ctx->samplers[shader], sampler, num_sampler * sizeof (void *)); - else - memset(ctx->samplers[shader], 0, num_sampler * sizeof (void *)); } static bool