Mesa (master): v3d: Stop advertising support for PIPE_CAP_TWO_SIDED_COLOR.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 10 04:52:00 UTC 2021


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

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jan 20 12:55:44 2021 -0800

v3d: Stop advertising support for PIPE_CAP_TWO_SIDED_COLOR.

The GL frontend can lower away this deprecated GL feature for us.

Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601>

---

 src/broadcom/compiler/v3d_compiler.h  | 1 -
 src/broadcom/compiler/vir.c           | 6 ------
 src/broadcom/vulkan/v3dv_pipeline.c   | 6 ------
 src/gallium/drivers/v3d/v3d_program.c | 1 -
 src/gallium/drivers/v3d/v3d_screen.c  | 1 +
 5 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h
index 27e73ea4c3b..a8852f79d28 100644
--- a/src/broadcom/compiler/v3d_compiler.h
+++ b/src/broadcom/compiler/v3d_compiler.h
@@ -385,7 +385,6 @@ struct v3d_fs_key {
         bool is_lines;
         bool line_smoothing;
         bool point_coord_upper_left;
-        bool light_twoside;
         bool msaa;
         bool sample_coverage;
         bool sample_alpha_to_coverage;
diff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c
index b2b62ecd436..aac56edba1e 100644
--- a/src/broadcom/compiler/vir.c
+++ b/src/broadcom/compiler/vir.c
@@ -977,9 +977,6 @@ v3d_nir_lower_vs_late(struct v3d_compile *c)
 static void
 v3d_nir_lower_fs_late(struct v3d_compile *c)
 {
-        if (c->fs_key->light_twoside)
-                NIR_PASS_V(c->s, nir_lower_two_sided_color, true);
-
         if (c->fs_key->clamp_color)
                 NIR_PASS_V(c->s, nir_lower_clamp_color_outputs);
 
@@ -993,9 +990,6 @@ v3d_nir_lower_fs_late(struct v3d_compile *c)
         if (c->key->ucp_enables)
                 NIR_PASS_V(c->s, nir_lower_clip_fs, c->key->ucp_enables, true);
 
-        /* Note: FS input scalarizing must happen after
-         * nir_lower_two_sided_color, which only handles a vec4 at a time.
-         */
         NIR_PASS_V(c->s, nir_lower_io_to_scalar, nir_var_shader_in);
 }
 
diff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c
index a12321dee97..2063510ed6d 100644
--- a/src/broadcom/vulkan/v3dv_pipeline.c
+++ b/src/broadcom/vulkan/v3dv_pipeline.c
@@ -1192,12 +1192,6 @@ pipeline_populate_v3d_fs_key(struct v3d_fs_key *key,
       }
    }
 
-   /* FIXME: we understand that this is used on GL to configure fixed-function
-    * two side lighting support, and not make sense for Vulkan. Need to
-    * confirm though.
-    */
-   key->light_twoside = false;
-
    /* FIXME: ditto, although for flat lighting. Again, neet to confirm.*/
    key->shade_model_flat = false;
 }
diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c
index bf148ee3aba..ecd8fdc52d1 100644
--- a/src/gallium/drivers/v3d/v3d_program.c
+++ b/src/gallium/drivers/v3d/v3d_program.c
@@ -614,7 +614,6 @@ v3d_update_compiled_fs(struct v3d_context *v3d, uint8_t prim_mode)
                          PIPE_SPRITE_COORD_UPPER_LEFT);
         }
 
-        key->light_twoside = v3d->rasterizer->base.light_twoside;
         key->shade_model_flat = v3d->rasterizer->base.flatshade;
 
         struct v3d_compiled_shader *old_fs = v3d->prog.fs;
diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c
index 4f69c2089d9..2c141e68853 100644
--- a/src/gallium/drivers/v3d/v3d_screen.c
+++ b/src/gallium/drivers/v3d/v3d_screen.c
@@ -260,6 +260,7 @@ v3d_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
                 return 1;
 
         case PIPE_CAP_ALPHA_TEST:
+        case PIPE_CAP_TWO_SIDED_COLOR:
                 return 0;
 
         /* Geometry shaders */



More information about the mesa-commit mailing list