From: Erik Faye-Lund Date: Mon, 23 Sep 2019 20:13:50 +0000 (+0200) Subject: zink: do not set lineWidth to invalid value X-Git-Tag: upstream/19.3.0~354 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4ef088f241837d64ec7362acf24ca794de24102d;p=platform%2Fupstream%2Fmesa.git zink: do not set lineWidth to invalid value Some implementations don't support the lineWidth-feature, so let's avoid setting invalid state to them. But since we don't have a fallback for this, inform the user. Acked-by: Jordan Justen --- diff --git a/src/gallium/drivers/zink/zink_pipeline.c b/src/gallium/drivers/zink/zink_pipeline.c index 25806bb..b479673 100644 --- a/src/gallium/drivers/zink/zink_pipeline.c +++ b/src/gallium/drivers/zink/zink_pipeline.c @@ -85,7 +85,12 @@ zink_create_gfx_pipeline(struct zink_screen *screen, rast_state.depthBiasConstantFactor = 0.0; rast_state.depthBiasClamp = 0.0; rast_state.depthBiasSlopeFactor = 0.0; - rast_state.lineWidth = state->line_width; + if (screen->feats.wideLines) + rast_state.lineWidth = state->line_width; + else { + debug_printf("BUG: wide lines not supported, needs fallback!"); + rast_state.lineWidth = 1.0f; + } VkPipelineDepthStencilStateCreateInfo depth_stencil_state = {}; depth_stencil_state.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO;