From 1ac29863a94d589199e6b44cf52211d002ba84d1 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 7 Jul 2021 11:54:32 +0200 Subject: [PATCH] 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 Part-of: --- src/gallium/frontends/lavapipe/ci/deqp-lvp-fails.txt | 3 ++- src/gallium/frontends/lavapipe/lvp_device.c | 2 +- src/gallium/frontends/lavapipe/lvp_pipeline.c | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/frontends/lavapipe/ci/deqp-lvp-fails.txt b/src/gallium/frontends/lavapipe/ci/deqp-lvp-fails.txt index 4137463..94f8870 100644 --- a/src/gallium/frontends/lavapipe/ci/deqp-lvp-fails.txt +++ b/src/gallium/frontends/lavapipe/ci/deqp-lvp-fails.txt @@ -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 diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index 6d5dd04..064b2f9 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -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, diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c index a2a54bd..11747ab 100644 --- a/src/gallium/frontends/lavapipe/lvp_pipeline.c +++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c @@ -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++) { -- 2.7.4