panfrost: Simplify panfrost_bind_sampler_states

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10869>
This commit is contained in:
Alyssa Rosenzweig 2021-03-12 01:20:52 +00:00 committed by Marge Bot
parent a9a3f55519
commit c2d571934d
1 changed files with 1 additions and 4 deletions

View File

@ -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