Mesa (master): panfrost: Identify glProvokingVertex flag
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Dec 30 22:25:45 UTC 2019
Module: Mesa
Branch: master
Commit: 71df7c69bc44a2daddf07efa03bf0526aea533ee
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=71df7c69bc44a2daddf07efa03bf0526aea533ee
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Fri Dec 27 15:33:21 2019 -0500
panfrost: Identify glProvokingVertex flag
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
src/gallium/drivers/panfrost/pan_context.c | 5 ++---
src/panfrost/include/panfrost-job.h | 6 ++++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 1446354ade0..14c6fcbd155 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -1476,9 +1476,8 @@ panfrost_draw_vbo(
draw_flags |= 0x3000;
- if (mode == PIPE_PRIM_LINE_STRIP) {
- draw_flags |= 0x800;
- }
+ if (ctx->rasterizer && ctx->rasterizer->base.flatshade_first)
+ draw_flags |= MALI_DRAW_FLATSHADE_FIRST;
panfrost_statistics_record(ctx, info);
diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h
index fa43f8c32a4..85dd2b40e1d 100644
--- a/src/panfrost/include/panfrost-job.h
+++ b/src/panfrost/include/panfrost-job.h
@@ -884,6 +884,12 @@ struct mali_uniform_buffer_meta {
#define MALI_DRAW_INDEXED_SHIFT (4)
#define MALI_DRAW_VARYING_SIZE (0x100)
+
+/* Set to use first vertex as the provoking vertex for flatshading. Clear to
+ * use the last vertex. This is the default in DX and VK, but not in GL. */
+
+#define MALI_DRAW_FLATSHADE_FIRST (0x800)
+
#define MALI_DRAW_PRIMITIVE_RESTART_FIXED_INDEX (0x10000)
struct mali_vertex_tiler_prefix {
More information about the mesa-commit
mailing list