From 089e14d4e99cb1f446dfeddb4e007dc117bdbc1a Mon Sep 17 00:00:00 2001 From: SoroushIMG Date: Thu, 16 Feb 2023 09:43:40 +0000 Subject: [PATCH] zink: fix incorrect line mode check for bresenham the line requirement check logic was assuming mode index 0 is bresenhamLines, but it is actually rectangularLines. cc: mesa-stable Part-of: (cherry picked from commit f6b5e128c13fe77199fb39f1b6e0a11504201352) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_pipeline.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index c3654d2cd56..9db8dd179ef 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -283,7 +283,7 @@ "description": "zink: fix incorrect line mode check for bresenham", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/zink/zink_pipeline.c b/src/gallium/drivers/zink/zink_pipeline.c index 68d8a64f5a4..0175cacbf22 100644 --- a/src/gallium/drivers/zink/zink_pipeline.c +++ b/src/gallium/drivers/zink/zink_pipeline.c @@ -307,9 +307,9 @@ zink_create_gfx_pipeline(struct zink_screen *screen, /* non-strictLine default lines are either parallelogram or bresenham which while not in GL spec, * in practice end up being within the two-pixel exception in the GL spec. */ - else if (mode_idx || screen->info.props.limits.strictLines) + else if ((mode_idx != 1) || screen->info.props.limits.strictLines) warn_missing_feature(warned[mode_idx], features[hw_rast_state->line_mode][0]); - } else if (mode_idx || screen->info.props.limits.strictLines) + } else if ((mode_idx != 1) || screen->info.props.limits.strictLines) warn_missing_feature(warned[mode_idx], features[hw_rast_state->line_mode][hw_rast_state->line_stipple_enable]); }