mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 20:20:09 +01:00
panfrost: Allow NULL for some binding functions
Handle Clover passing NULL to bind_sampler_states and set_sampler_views when cleaning up after launching a job. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8264>
This commit is contained in:
parent
ab97517596
commit
f3a00c351d
1 changed files with 7 additions and 1 deletions
|
|
@ -728,7 +728,10 @@ panfrost_bind_sampler_states(
|
|||
|
||||
/* XXX: Should upload, not just copy? */
|
||||
ctx->sampler_count[shader] = num_sampler;
|
||||
memcpy(ctx->samplers[shader], sampler, num_sampler * sizeof (void *));
|
||||
if (sampler)
|
||||
memcpy(ctx->samplers[shader], sampler, num_sampler * sizeof (void *));
|
||||
else
|
||||
memset(ctx->samplers[shader], 0, num_sampler * sizeof (void *));
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
@ -1121,6 +1124,9 @@ panfrost_set_sampler_views(
|
|||
|
||||
assert(start_slot == 0);
|
||||
|
||||
if (!views)
|
||||
num_views = 0;
|
||||
|
||||
for (i = 0; i < num_views; ++i) {
|
||||
if (views[i])
|
||||
new_nr = i + 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue