Mesa (staging/20.3): zink: respect feature-cap for independent blending

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 25 18:50:21 UTC 2021


Module: Mesa
Branch: staging/20.3
Commit: 3efcf3b34f77339f388f1814767252eb05500ff1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3efcf3b34f77339f388f1814767252eb05500ff1

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Fri Jan 22 09:09:03 2021 +0100

zink: respect feature-cap for independent blending

Vulkan has a cap to enable this, we should check that one rather than
always claiming support.

Fixes: 8d46e35d16e ("zink: introduce opengl over vulkan")
Reviewed-by: Hoe Hao Cheng <haochengho12907 at gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>
(cherry picked from commit 612169859a3300879fa890a03a8693ab3c718d2c)

---

 .pick_status.json                      | 2 +-
 src/gallium/drivers/zink/zink_screen.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 488ec9aafa7..018a60f1ea5 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -67,7 +67,7 @@
         "description": "zink: respect feature-cap for independent blending",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "8d46e35d16e3936968958bcab86d61967a673305"
     },
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index ce6e15bdb9e..8ae880fcbe6 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -136,15 +136,15 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
       return 1 + util_logbase2(screen->info.props.limits.maxImageDimensionCube);
 
-   case PIPE_CAP_BLEND_EQUATION_SEPARATE:
    case PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD:
    case PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES:
    case PIPE_CAP_VERTEX_SHADER_SATURATE:
       return 1;
 
+   case PIPE_CAP_BLEND_EQUATION_SEPARATE:
    case PIPE_CAP_INDEP_BLEND_ENABLE:
    case PIPE_CAP_INDEP_BLEND_FUNC:
-      return 1;
+      return screen->info.feats.features.independentBlend;
 
    case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
       return screen->info.have_EXT_transform_feedback ? screen->info.tf_props.maxTransformFeedbackBuffers : 0;



More information about the mesa-commit mailing list