Mesa (master): iris: Enable PIPE_CAP_SHAREABLE_SHADERS.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 29 06:33:34 UTC 2021


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Nov 17 14:36:29 2020 -0800

iris: Enable PIPE_CAP_SHAREABLE_SHADERS.

Now that we store shader variants in the objects themselves rather
than a per-context hash table, they are actually global across
contexts.  We can enable this feature.

This makes shaders shared across contexts, so apps can compile in
one and use it in another.  This has always been allowed by GL,
but in the past we've simply recompiled the shaders in every context,
which is slow and painful.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7668>

---

 src/gallium/drivers/iris/iris_screen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c
index 19ee81f1680..df7faf340ef 100644
--- a/src/gallium/drivers/iris/iris_screen.c
+++ b/src/gallium/drivers/iris/iris_screen.c
@@ -260,6 +260,7 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_NATIVE_FENCE_FD:
    case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
    case PIPE_CAP_FENCE_SIGNAL:
+   case PIPE_CAP_SHAREABLE_SHADERS:
       return true;
    case PIPE_CAP_FBFETCH:
       return BRW_MAX_DRAW_BUFFERS;



More information about the mesa-commit mailing list