Mesa (master): v3d: Stop advertising support for PIPE_CAP_*_COLOR_CLAMPED.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Feb 10 04:52:00 UTC 2021
Module: Mesa
Branch: master
Commit: ff805f8ac7911b57bd4e1bf1839db942e3e2d176
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff805f8ac7911b57bd4e1bf1839db942e3e2d176
Author: Eric Anholt <eric at anholt.net>
Date: Wed Jan 20 13:05:59 2021 -0800
v3d: Stop advertising support for PIPE_CAP_*_COLOR_CLAMPED.
The GL frontend can lower away this deprecated GL feature for us.
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 | 3 ---
src/gallium/drivers/v3d/v3d_screen.c | 4 ++--
5 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h
index a8852f79d28..85f6e5a6310 100644
--- a/src/broadcom/compiler/v3d_compiler.h
+++ b/src/broadcom/compiler/v3d_compiler.h
@@ -389,7 +389,6 @@ struct v3d_fs_key {
bool sample_coverage;
bool sample_alpha_to_coverage;
bool sample_alpha_to_one;
- bool clamp_color;
bool shade_model_flat;
/* Mask of which color render targets are present. */
uint8_t cbufs;
diff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c
index aac56edba1e..c293ef6f1e4 100644
--- a/src/broadcom/compiler/vir.c
+++ b/src/broadcom/compiler/vir.c
@@ -960,9 +960,6 @@ v3d_nir_lower_gs_late(struct v3d_compile *c)
static void
v3d_nir_lower_vs_late(struct v3d_compile *c)
{
- if (c->vs_key->clamp_color)
- NIR_PASS_V(c->s, nir_lower_clamp_color_outputs);
-
if (c->key->ucp_enables) {
NIR_PASS_V(c->s, nir_lower_clip_vs, c->key->ucp_enables,
false, false, NULL);
@@ -977,9 +974,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->clamp_color)
- NIR_PASS_V(c->s, nir_lower_clamp_color_outputs);
-
/* In OpenGL the fragment shader can't read gl_ClipDistance[], but
* Vulkan allows it, in which case the SPIR-V compiler will declare
* VARING_SLOT_CLIP_DIST0 as compact array variable. Pass true as
diff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c
index 2063510ed6d..e06d9e32a95 100644
--- a/src/broadcom/vulkan/v3dv_pipeline.c
+++ b/src/broadcom/vulkan/v3dv_pipeline.c
@@ -1106,9 +1106,6 @@ pipeline_populate_v3d_fs_key(struct v3d_fs_key *key,
key->is_lines = (topology >= PIPE_PRIM_LINES &&
topology <= PIPE_PRIM_LINE_STRIP);
- /* Vulkan doesn't appear to specify (anv does the same) */
- key->clamp_color = false;
-
const VkPipelineColorBlendStateCreateInfo *cb_info =
pCreateInfo->pColorBlendState;
@@ -1206,9 +1203,6 @@ pipeline_populate_v3d_vs_key(struct v3d_vs_key *key,
const bool rba = p_stage->pipeline->device->features.robustBufferAccess;
pipeline_populate_v3d_key(&key->base, p_stage, 0, rba);
- /* Vulkan doesn't appear to specify (anv does the same) */
- key->clamp_color = false;
-
/* Vulkan specifies a point size per vertex, so true for if the prim are
* points, like on ES2)
*/
diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c
index ecd8fdc52d1..762a1549619 100644
--- a/src/gallium/drivers/v3d/v3d_program.c
+++ b/src/gallium/drivers/v3d/v3d_program.c
@@ -552,7 +552,6 @@ v3d_update_compiled_fs(struct v3d_context *v3d, uint8_t prim_mode)
prim_mode <= PIPE_PRIM_LINE_STRIP);
key->line_smoothing = (key->is_lines &&
v3d_line_smoothing_enabled(v3d));
- key->clamp_color = v3d->rasterizer->base.clamp_fragment_color;
if (v3d->blend->base.logicop_enable) {
key->logicop_func = v3d->blend->base.logicop_func;
} else {
@@ -757,8 +756,6 @@ v3d_update_compiled_vs(struct v3d_context *v3d, uint8_t prim_mode)
sizeof(key->used_outputs));
}
- key->clamp_color = v3d->rasterizer->base.clamp_vertex_color;
-
key->per_vertex_point_size =
(prim_mode == PIPE_PRIM_POINTS &&
v3d->rasterizer->base.point_size_per_vertex);
diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c
index 2c141e68853..e06f99d3a35 100644
--- a/src/gallium/drivers/v3d/v3d_screen.c
+++ b/src/gallium/drivers/v3d/v3d_screen.c
@@ -109,9 +109,7 @@ v3d_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
switch (param) {
/* Supported features (boolean caps). */
- case PIPE_CAP_VERTEX_COLOR_CLAMPED:
case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
- case PIPE_CAP_FRAGMENT_COLOR_CLAMPED:
case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
case PIPE_CAP_NPOT_TEXTURES:
case PIPE_CAP_SHAREABLE_SHADERS:
@@ -261,6 +259,8 @@ v3d_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_ALPHA_TEST:
case PIPE_CAP_TWO_SIDED_COLOR:
+ case PIPE_CAP_VERTEX_COLOR_CLAMPED:
+ case PIPE_CAP_FRAGMENT_COLOR_CLAMPED:
return 0;
/* Geometry shaders */
More information about the mesa-commit
mailing list