panfrost: Use u_reduced_prim() to do the is_line check

Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26249>
This commit is contained in:
Boris Brezillon 2023-11-20 09:41:29 +01:00 committed by Marge Bot
parent a183b8c495
commit e81f99134e

View file

@ -3010,9 +3010,7 @@ panfrost_emit_primitive(struct panfrost_batch *batch,
struct panfrost_context *ctx = batch->ctx;
UNUSED struct pipe_rasterizer_state *rast = &ctx->rasterizer->base;
bool lines =
(info->mode == MESA_PRIM_LINES || info->mode == MESA_PRIM_LINE_LOOP ||
info->mode == MESA_PRIM_LINE_STRIP);
bool lines = u_reduced_prim(info->mode) == MESA_PRIM_LINES;
pan_pack(out, PRIMITIVE, cfg) {
cfg.draw_mode = pan_draw_mode(info->mode);