lavapipe: expose strict-lines feature

The strictLines-feature requires lines to be rasterized as rectangles
by default instead of using the parallelograms you get from extending
bresenham lines along their minor axis.

Now that we can specify the line mode fully we can actually express
this, so let's do so.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11782>
This commit is contained in:
Erik Faye-Lund
2021-07-07 11:54:32 +02:00
committed by Marge Bot
parent 29ceb80834
commit 1ac29863a9
3 changed files with 5 additions and 5 deletions

View File

@@ -31,7 +31,8 @@ dEQP-VK.glsl.texture_functions.query.texturequerylod.usampler1darray_fragment,Fa
dEQP-VK.image.mismatched_formats.image_write.a8b8g8r8_srgb_pack32_with_rgb10a2,Crash
dEQP-VK.image.mismatched_formats.image_write.b8g8r8a8_srgb_with_rgba8,Crash
dEQP-VK.image.mismatched_formats.image_write.r8g8b8a8_srgb_with_rgb10a2,Crash
dEQP-VK.rasterization.interpolation.projected.non_strict_lines,Fail
dEQP-VK.rasterization.primitives.static_stipple.rectangular_line_strip_wide,Fail
dEQP-VK.rasterization.primitives_multisample_4_bit.dynamic_stipple.line_strip_wide,Fail
dEQP-VK.texture.filtering.2d.combinations.linear_mipmap_linear.linear.clamp_to_edge.repeat,Fail
dEQP-VK.texture.filtering.2d.combinations.linear_mipmap_linear.linear.mirror_clamp_to_edge.repeat,Fail
dEQP-VK.texture.filtering.2d.combinations.linear_mipmap_linear.linear.mirrored_repeat.mirror_clamp_to_edge,Fail

View File

@@ -788,7 +788,7 @@ VKAPI_ATTR void VKAPI_CALL lvp_GetPhysicalDeviceProperties(VkPhysicalDevice phys
.lineWidthRange = { 1.0, pdevice->pscreen->get_paramf(pdevice->pscreen, PIPE_CAPF_MAX_LINE_WIDTH) },
.pointSizeGranularity = (1.0 / 8.0),
.lineWidthGranularity = 1.0 / 128.0,
.strictLines = false, /* FINISHME */
.strictLines = true,
.standardSampleLocations = true,
.optimalBufferCopyOffsetAlignment = 128,
.optimalBufferCopyRowPitchAlignment = 128,

View File

@@ -815,14 +815,13 @@ lvp_graphics_pipeline_init(struct lvp_pipeline *pipeline,
pipeline->line_smooth = line_state->lineRasterizationMode == VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT;
pipeline->disable_multisample = line_state->lineRasterizationMode == VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT ||
line_state->lineRasterizationMode == VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT;
pipeline->line_rectangular = line_state->lineRasterizationMode != VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT &&
line_state->lineRasterizationMode != VK_LINE_RASTERIZATION_MODE_DEFAULT_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)) {
pipeline->line_stipple_factor = line_state->lineStippleFactor - 1;
pipeline->line_stipple_pattern = line_state->lineStipplePattern;
}
} else
pipeline->line_rectangular = false;
pipeline->line_rectangular = true;
for (uint32_t i = 0; i < pCreateInfo->stageCount; i++) {