diff options
-rw-r--r-- | src/gallium/drivers/vc5/vc5_emit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc5/vc5_emit.c b/src/gallium/drivers/vc5/vc5_emit.c index 094d5482954..de4737eeec8 100644 --- a/src/gallium/drivers/vc5/vc5_emit.c +++ b/src/gallium/drivers/vc5/vc5_emit.c @@ -201,8 +201,10 @@ emit_one_texture(struct vc5_context *vc5, struct vc5_texture_stateobj *stage_tex static void emit_textures(struct vc5_context *vc5, struct vc5_texture_stateobj *stage_tex) { - for (int i = 0; i < stage_tex->num_textures; i++) - emit_one_texture(vc5, stage_tex, i); + for (int i = 0; i < stage_tex->num_textures; i++) { + if (stage_tex->textures[i]) + emit_one_texture(vc5, stage_tex, i); + } } void |