Mesa (main): util/vbuf: always claim support for PATCHES in restart modes
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 28 17:39:28 UTC 2021
Module: Mesa
Branch: main
Commit: 00272aa4a1bc190b0b8ede6a241f2bd74a856a8e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=00272aa4a1bc190b0b8ede6a241f2bd74a856a8e
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Fri Jun 25 10:44:25 2021 -0400
util/vbuf: always claim support for PATCHES in restart modes
this avoids forcing rewrites for patch mode which break tessellation
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11608>
---
docs/gallium/screen.rst | 2 +-
src/gallium/auxiliary/util/u_vbuf.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/docs/gallium/screen.rst b/docs/gallium/screen.rst
index 96914e5fcc7..879714fd403 100644
--- a/docs/gallium/screen.rst
+++ b/docs/gallium/screen.rst
@@ -617,7 +617,7 @@ The integer capabilities:
* ``PIPE_CAP_SAMPLER_REDUCTION_MINMAX_ARB``: Driver supports ARB min/max sampler reduction with format queries.
* ``PIPE_CAP_EMULATE_NONFIXED_PRIMITIVE_RESTART``: Driver requests all draws using a non-fixed restart index to be rewritten to use a fixed restart index.
* ``PIPE_CAP_SUPPORTED_PRIM_MODES``: A bitmask of the ``pipe_prim_type`` enum values that the driver can natively support.
-* ``PIPE_CAP_SUPPORTED_PRIM_MODES_WITH_RESTART``: A bitmask of the ``pipe_prim_type`` enum values that the driver can natively support for primitive restart. Only useful if ``PIPE_CAP_PRIMITIVE_RESTART`` is also exported. ``PIPE_PRIM_PATCHES`` must be supported to prevent incorrect lowering of primitive restart.
+* ``PIPE_CAP_SUPPORTED_PRIM_MODES_WITH_RESTART``: A bitmask of the ``pipe_prim_type`` enum values that the driver can natively support for primitive restart. Only useful if ``PIPE_CAP_PRIMITIVE_RESTART`` is also exported.
.. _pipe_capf:
diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c
index 513b79ba38f..b1307f6db8f 100644
--- a/src/gallium/auxiliary/util/u_vbuf.c
+++ b/src/gallium/auxiliary/util/u_vbuf.c
@@ -309,6 +309,7 @@ void u_vbuf_get_caps(struct pipe_screen *screen, struct u_vbuf_caps *caps,
screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX)) {
caps->rewrite_restart_index = screen->get_param(screen, PIPE_CAP_EMULATE_NONFIXED_PRIMITIVE_RESTART);
caps->supported_restart_modes = screen->get_param(screen, PIPE_CAP_SUPPORTED_PRIM_MODES_WITH_RESTART);
+ caps->supported_restart_modes |= BITFIELD_BIT(PIPE_PRIM_PATCHES);
caps->fallback_always |= caps->rewrite_restart_index;
}
caps->supported_prim_modes = screen->get_param(screen, PIPE_CAP_SUPPORTED_PRIM_MODES);
More information about the mesa-commit
mailing list