Module: Mesa
Branch: master
Commit: cc0841c82aec18cb93f4f1d52ea193c70cb846a8
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cc0841c82aec18cb93f4f1d52ea193c70cb846a8

Author: Eric Anholt <[email protected]>
Date:   Wed Jan 20 12:07:54 2021 -0800

vc4: Remove vestiges of alpha test lowering.

We stopped reporting the alpha test screen cap, and stopped using the
value in the key, so now shrink the key.  This gets another switch case
out of the hot uniforms upload path.

Fixes: 1404b8b1e5b6 ("vc4: do not report alpha-test as supported")
Reviewed-by: Iago Toral Quiroga <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601>

---

 src/gallium/drivers/vc4/vc4_program.c  | 4 ----
 src/gallium/drivers/vc4/vc4_qir.h      | 2 --
 src/gallium/drivers/vc4/vc4_uniforms.c | 6 ------
 3 files changed, 12 deletions(-)

diff --git a/src/gallium/drivers/vc4/vc4_program.c 
b/src/gallium/drivers/vc4/vc4_program.c
index 58cbf4dd7a7..30a93770060 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -2742,10 +2742,6 @@ vc4_update_compiled_fs(struct vc4_context *vc4, uint8_t 
prim_mode)
         key->stencil_full_writemasks = vc4->zsa->stencil_uniforms[2] != 0;
         key->depth_enabled = (vc4->zsa->base.depth_enabled ||
                               key->stencil_enabled);
-        if (vc4->zsa->base.alpha_enabled)
-                key->alpha_test_func = vc4->zsa->base.alpha_func;
-        else
-                key->alpha_test_func = COMPARE_FUNC_ALWAYS;
 
         if (key->is_points) {
                 key->point_sprite_mask =
diff --git a/src/gallium/drivers/vc4/vc4_qir.h 
b/src/gallium/drivers/vc4/vc4_qir.h
index 4d8bf60cf44..3b1a844f3f5 100644
--- a/src/gallium/drivers/vc4/vc4_qir.h
+++ b/src/gallium/drivers/vc4/vc4_qir.h
@@ -286,7 +286,6 @@ enum quniform_contents {
 
         QUNIFORM_STENCIL,
 
-        QUNIFORM_ALPHA_REF,
         QUNIFORM_SAMPLE_MASK,
 
         /* Placeholder uniform that will be updated by the kernel when used by
@@ -336,7 +335,6 @@ struct vc4_fs_key {
         bool sample_coverage;
         bool sample_alpha_to_coverage;
         bool sample_alpha_to_one;
-        uint8_t alpha_test_func;
         uint8_t logicop_func;
         uint32_t point_sprite_mask;
         uint32_t ubo_1_size;
diff --git a/src/gallium/drivers/vc4/vc4_uniforms.c 
b/src/gallium/drivers/vc4/vc4_uniforms.c
index e456105c427..045feb216ef 100644
--- a/src/gallium/drivers/vc4/vc4_uniforms.c
+++ b/src/gallium/drivers/vc4/vc4_uniforms.c
@@ -340,11 +340,6 @@ vc4_write_uniforms(struct vc4_context *vc4, struct 
vc4_compiled_shader *shader,
                                         0));
                         break;
 
-                case QUNIFORM_ALPHA_REF:
-                        cl_aligned_f(&uniforms,
-                                     vc4->zsa->base.alpha_ref_value);
-                        break;
-
                 case QUNIFORM_SAMPLE_MASK:
                         cl_aligned_u32(&uniforms, vc4->sample_mask);
                         break;
@@ -422,7 +417,6 @@ vc4_set_shader_uniform_dirty_flags(struct 
vc4_compiled_shader *shader)
                         break;
 
                 case QUNIFORM_STENCIL:
-                case QUNIFORM_ALPHA_REF:
                         dirty |= VC4_DIRTY_ZSA;
                         break;
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to