Mesa (main): panfrost: Minor changes to draw_vbo
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 1 19:26:48 UTC 2021
Module: Mesa
Branch: main
Commit: ff3e54b4322cffd0bff55ef30914984996519c46
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff3e54b4322cffd0bff55ef30914984996519c46
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Thu May 20 18:29:14 2021 -0400
panfrost: Minor changes to draw_vbo
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
---
src/gallium/drivers/panfrost/pan_context.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index b1857047dda..c25802062aa 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -486,10 +486,8 @@ panfrost_direct_draw(struct panfrost_batch *batch,
struct panfrost_context *ctx = batch->ctx;
struct panfrost_device *device = pan_device(ctx->base.screen);
- int mode = info->mode;
-
/* Fallback for unsupported modes */
- if (!(ctx->draw_modes & (1 << mode))) {
+ if (!(ctx->draw_modes & BITFIELD_BIT(info->mode))) {
if (draw->count < 4) {
/* Degenerate case? */
return;
@@ -535,8 +533,6 @@ panfrost_direct_draw(struct panfrost_batch *batch,
ctx->offset_start = draw->start;
}
- /* Encode the padded vertex count */
-
if (info->instance_count > 1)
ctx->padded_count = panfrost_padded_vertex_count(vertex_count);
else
@@ -564,14 +560,12 @@ panfrost_direct_draw(struct panfrost_batch *batch,
/* Emit all sort of descriptors. */
mali_ptr varyings = 0, vs_vary = 0, fs_vary = 0, pos = 0, psiz = 0;
- bool point_coord_replace = (info->mode == PIPE_PRIM_POINTS);
-
panfrost_emit_varying_descriptor(batch,
ctx->padded_count *
ctx->instance_count,
&vs_vary, &fs_vary, &varyings,
NULL, &pos, &psiz,
- point_coord_replace);
+ info->mode == PIPE_PRIM_POINTS);
mali_ptr attribs, attrib_bufs;
attribs = panfrost_emit_vertex_data(batch, &attrib_bufs);
More information about the mesa-commit
mailing list