v3d: do not report alpha-test as supported
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 7 Oct 2019 10:18:09 +0000 (12:18 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 17 Oct 2019 08:41:36 +0000 (10:41 +0200)
This triggers lowering in the state-tracker, which makes things a bit
simpler.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/broadcom/compiler/nir_to_vir.c
src/broadcom/compiler/vir.c
src/gallium/drivers/v3d/v3d_screen.c

index a982778f8b15e51e9c9240136a62bb6b4b8cda22..1ca7c2fc646f2ed45b8ec283c6607c3c4ba211dd 100644 (file)
@@ -2027,11 +2027,6 @@ ntq_emit_intrinsic(struct v3d_compile *c, nir_intrinsic_instr *instr)
                                vir_uniform(c, QUNIFORM_VIEWPORT_Z_OFFSET, 0));
                 break;
 
-        case nir_intrinsic_load_alpha_ref_float:
-                ntq_store_dest(c, &instr->dest, 0,
-                               vir_uniform(c, QUNIFORM_ALPHA_REF, 0));
-                break;
-
         case nir_intrinsic_load_sample_mask_in:
                 ntq_store_dest(c, &instr->dest, 0, vir_MSF(c));
                 break;
index 8cbcc001d18b0550806785693d7791f61bc25484..b86ffc82ea39f7e769eb313f86525138cab71d37 100644 (file)
@@ -843,12 +843,6 @@ v3d_nir_lower_fs_late(struct v3d_compile *c)
         if (c->fs_key->clamp_color)
                 NIR_PASS_V(c->s, nir_lower_clamp_color_outputs);
 
-        if (c->fs_key->alpha_test) {
-                NIR_PASS_V(c->s, nir_lower_alpha_test,
-                           c->fs_key->alpha_test_func,
-                           false, NULL);
-        }
-
         if (c->key->ucp_enables)
                 NIR_PASS_V(c->s, nir_lower_clip_fs, c->key->ucp_enables,
                            false);
index 563a0108e97dd8c55b47a1118c06391a066417e3..9e30268e858010f782c00ec3fc76729d9c39708d 100644 (file)
@@ -245,6 +245,9 @@ v3d_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
         case PIPE_CAP_UMA:
                 return 1;
 
+        case PIPE_CAP_ALPHA_TEST:
+                return 0;
+
         default:
                 return u_pipe_screen_get_param_defaults(pscreen, param);
         }