diff options
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_program.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_program.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index b7ed1bf60a0..963e6eb3b44 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -67,6 +67,7 @@ struct vc4_key { struct vc4_fs_key { struct vc4_key base; enum pipe_format color_format; + bool depth_enabled; }; struct vc4_vs_key { @@ -738,6 +739,11 @@ emit_frag_end(struct tgsi_to_qir *trans) trans->outputs[format_desc->swizzle[3]], }; + if (trans->fs_key->depth_enabled) { + qir_emit(c, qir_inst(QOP_TLB_PASSTHROUGH_Z_WRITE, c->undef, + c->undef, c->undef)); + } + qir_emit(c, qir_inst4(QOP_PACK_COLORS, t, swizzled_outputs[0], swizzled_outputs[1], @@ -1001,6 +1007,8 @@ vc4_update_compiled_fs(struct vc4_context *vc4) if (vc4->framebuffer.cbufs[0]) key->color_format = vc4->framebuffer.cbufs[0]->format; + key->depth_enabled = vc4->zsa->base.depth.enabled; + vc4->prog.fs = util_hash_table_get(vc4->fs_cache, key); if (vc4->prog.fs) return; |