diff options
Diffstat (limited to 'src/gallium/drivers/vc4')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_program.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 20f7a4489dc..fa598473aab 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -1270,8 +1270,11 @@ static void vc4_setup_shared_key(struct vc4_key *key, struct vc4_texture_stateobj *texstate) { for (int i = 0; i < texstate->num_textures; i++) { - struct pipe_resource *prsc = texstate->textures[i]->texture; - key->tex_format[i] = prsc->format; + struct pipe_sampler_view *sampler = texstate->textures[i]; + if (sampler) { + struct pipe_resource *prsc = sampler->texture; + key->tex_format[i] = prsc->format; + } } } |