Module: Mesa Branch: staging/23.0 Commit: 98fda79ad906c491164ef521b235fd0ff7640bb3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=98fda79ad906c491164ef521b235fd0ff7640bb3
Author: SoroushIMG <[email protected]> Date: Mon Apr 3 14:29:01 2023 +0100 zink: do not emit line stipple dynamic state when emulating cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22575> (cherry picked from commit 657fc39b0997d78d98974b458888fbbba0a2cf29) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_draw.cpp | 2 +- src/gallium/drivers/zink/zink_pipeline.c | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 191acbb68db..d3a1fb24a45 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1704,7 +1704,7 @@ "description": "zink: do not emit line stipple dynamic state when emulating", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp index 7f2196f42a9..a4224bcf377 100644 --- a/src/gallium/drivers/zink/zink_draw.cpp +++ b/src/gallium/drivers/zink/zink_draw.cpp @@ -679,7 +679,7 @@ zink_draw(struct pipe_context *pctx, VKCTX(CmdSetCullModeEXT)(batch->state->cmdbuf, ctx->gfx_pipeline_state.dyn_state1.cull_mode); } if ((BATCH_CHANGED || rast_state_changed) && - (DYNAMIC_STATE >= ZINK_DYNAMIC_STATE3 || (!screen->driver_workarounds.no_linestipple && rast_state->base.line_stipple_enable))) + !screen->driver_workarounds.no_linestipple && (DYNAMIC_STATE >= ZINK_DYNAMIC_STATE3 || rast_state->base.line_stipple_enable)) VKCTX(CmdSetLineStippleEXT)(batch->state->cmdbuf, rast_state->base.line_stipple_factor, rast_state->base.line_stipple_pattern); if ((BATCH_CHANGED || rast_state_changed) && DYNAMIC_STATE >= ZINK_DYNAMIC_STATE3) { diff --git a/src/gallium/drivers/zink/zink_pipeline.c b/src/gallium/drivers/zink/zink_pipeline.c index 50995708968..906ce150d60 100644 --- a/src/gallium/drivers/zink/zink_pipeline.c +++ b/src/gallium/drivers/zink/zink_pipeline.c @@ -244,9 +244,11 @@ zink_create_gfx_pipeline(struct zink_screen *screen, dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT; dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT; dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT; - if (screen->info.dynamic_state3_feats.extendedDynamicState3LineStippleEnable) - dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT; - dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_LINE_STIPPLE_EXT; + if (!screen->driver_workarounds.no_linestipple) { + if (screen->info.dynamic_state3_feats.extendedDynamicState3LineStippleEnable) + dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT; + dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_LINE_STIPPLE_EXT; + } if (screen->have_full_ds3) { dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_SAMPLE_MASK_EXT; dynamicStateEnables[state_count++] = VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT;
