diff options
author | Erik Faye-Lund <[email protected]> | 2019-10-23 13:02:55 +0200 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-10-23 13:03:59 +0200 |
commit | 8ae024d029ee23ae59a41cb066e2ad2fb2476f1f (patch) | |
tree | 1a6e9172d514036c28de768067947fe27ffdfb55 /src/gallium/drivers/vc4/vc4_program.c | |
parent | 65328bd32d58f84c3fd6b319c92148e3372a609f (diff) |
Revert "vc4: do not report alpha-test as supported"
This reverts commit a79b93269cf340ce4d23b5b34100039bcaafc841.
Reviewed-by: Jose Maria Casanova <[email protected]>
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_program.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_program.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 8ec181bc8fa..6ea1667ca28 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -1806,6 +1806,11 @@ ntq_emit_intrinsic(struct vc4_compile *c, nir_intrinsic_instr *instr) 0)); break; + case nir_intrinsic_load_alpha_ref_float: + ntq_store_dest(c, &instr->dest, 0, + qir_uniform(c, QUNIFORM_ALPHA_REF, 0)); + break; + case nir_intrinsic_load_sample_mask_in: ntq_store_dest(c, &instr->dest, 0, qir_uniform(c, QUNIFORM_SAMPLE_MASK, 0)); @@ -2248,8 +2253,16 @@ vc4_shader_ntq(struct vc4_context *vc4, enum qstage stage, c->s = nir_shader_clone(c, key->shader_state->base.ir.nir); - if (stage == QSTAGE_FRAG) + if (stage == QSTAGE_FRAG) { + if (c->fs_key->alpha_test_func != COMPARE_FUNC_ALWAYS) { + NIR_PASS_V(c->s, nir_lower_alpha_test, + c->fs_key->alpha_test_func, + c->fs_key->sample_alpha_to_one && + c->fs_key->msaa, + NULL); + } NIR_PASS_V(c->s, vc4_nir_lower_blend, c); + } struct nir_lower_tex_options tex_options = { /* We would need to implement txs, but we don't want the |