Mesa (staging/20.3): zink: respect feature-cap for sample-shading
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jan 25 18:50:21 UTC 2021
Module: Mesa
Branch: staging/20.3
Commit: 199fb00815f2cf87fd18b539192e5ce0e81fc28c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=199fb00815f2cf87fd18b539192e5ce0e81fc28c
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Fri Jan 22 09:11:51 2021 +0100
zink: respect feature-cap for sample-shading
Vulkan has a cap to enable this, we should check that one rather than
always claiming support.
Fixes: 0c70268ff73 ("zink: mark ARB_sample_shading as supported")
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 6f6941e2dd8f1d1d1d6e52276485d41c7dd0b029)
---
.pick_status.json | 2 +-
src/gallium/drivers/zink/zink_screen.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 018a60f1ea5..8cccfd5d4b8 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -58,7 +58,7 @@
"description": "zink: respect feature-cap for sample-shading",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "0c70268ff73adfc9d588fa5a10c500ed9f66bab6"
},
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index 8ae880fcbe6..001da294c89 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -123,9 +123,11 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return screen->timestamp_valid_bits > 0;
case PIPE_CAP_TEXTURE_MULTISAMPLE:
- case PIPE_CAP_SAMPLE_SHADING:
return 1;
+ case PIPE_CAP_SAMPLE_SHADING:
+ return screen->info.feats.features.sampleRateShading;
+
case PIPE_CAP_TEXTURE_SWIZZLE:
return 1;
More information about the mesa-commit
mailing list