lavapipe: don't read line stipple info in pipeline creation if stipple is disabled
otherwise these values may be (harmlessly) garbage Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11933>
This commit is contained in:

committed by
Marge Bot

parent
11f9ad9238
commit
59e923e5a1
@@ -816,9 +816,14 @@ lvp_graphics_pipeline_init(struct lvp_pipeline *pipeline,
|
|||||||
pipeline->disable_multisample = line_state->lineRasterizationMode == VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT ||
|
pipeline->disable_multisample = line_state->lineRasterizationMode == VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT ||
|
||||||
line_state->lineRasterizationMode == VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT;
|
line_state->lineRasterizationMode == VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT;
|
||||||
pipeline->line_rectangular = line_state->lineRasterizationMode != VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT;
|
pipeline->line_rectangular = line_state->lineRasterizationMode != VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT;
|
||||||
if (!dynamic_state_contains(pipeline->graphics_create_info.pDynamicState, VK_DYNAMIC_STATE_LINE_STIPPLE_EXT)) {
|
if (pipeline->line_stipple_enable) {
|
||||||
pipeline->line_stipple_factor = line_state->lineStippleFactor - 1;
|
if (!dynamic_state_contains(pipeline->graphics_create_info.pDynamicState, VK_DYNAMIC_STATE_LINE_STIPPLE_EXT)) {
|
||||||
pipeline->line_stipple_pattern = line_state->lineStipplePattern;
|
pipeline->line_stipple_factor = line_state->lineStippleFactor - 1;
|
||||||
|
pipeline->line_stipple_pattern = line_state->lineStipplePattern;
|
||||||
|
} else {
|
||||||
|
pipeline->line_stipple_factor = 0;
|
||||||
|
pipeline->line_stipple_pattern = UINT16_MAX;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
pipeline->line_rectangular = true;
|
pipeline->line_rectangular = true;
|
||||||
|
Reference in New Issue
Block a user