Module: Mesa Branch: staging/20.3 Commit: 092a65b0d133d2baaff45536987fe707f147371f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=092a65b0d133d2baaff45536987fe707f147371f
Author: Dave Airlie <[email protected]> Date: Tue Nov 10 13:52:05 2020 +1000 llvmpipe: fix multisample lines. This also needs another lines fix, but at least align the code with tri and points Cc: "20.3" <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705> (cherry picked from commit 2c0a078fdb4b856ecc29d5cf9b0478afc2309aa8) --- .gitlab-ci/deqp-virgl-gl-fails.txt | 2 -- .pick_status.json | 2 +- src/gallium/drivers/llvmpipe/lp_setup_line.c | 36 ++++++++++++++-------------- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/.gitlab-ci/deqp-virgl-gl-fails.txt b/.gitlab-ci/deqp-virgl-gl-fails.txt index d0c81dd8f04..eeebd7eca15 100644 --- a/.gitlab-ci/deqp-virgl-gl-fails.txt +++ b/.gitlab-ci/deqp-virgl-gl-fails.txt @@ -71,10 +71,8 @@ dEQP-GLES3.functional.polygon_offset.fixed16_render_with_units,Fail dEQP-GLES3.functional.polygon_offset.fixed24_displacement_with_units,Fail dEQP-GLES3.functional.polygon_offset.fixed24_render_with_units,Fail dEQP-GLES3.functional.polygon_offset.float32_displacement_with_units,Fail -dEQP-GLES3.functional.rasterization.fbo.rbo_multisample_4.interpolation.lines,Fail dEQP-GLES3.functional.rasterization.fbo.rbo_multisample_4.primitives.lines,Fail dEQP-GLES3.functional.rasterization.fbo.rbo_multisample_4.primitives.points,Fail -dEQP-GLES3.functional.rasterization.fbo.rbo_multisample_max.interpolation.lines,Fail dEQP-GLES3.functional.rasterization.fbo.rbo_multisample_max.primitives.lines,Fail dEQP-GLES3.functional.rasterization.fbo.rbo_multisample_max.primitives.points,Fail dEQP-GLES3.functional.rasterization.fbo.rbo_singlesample.interpolation.lines_wide,Fail diff --git a/.pick_status.json b/.pick_status.json index a0bc9de00c4..c65afbc0538 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -607,7 +607,7 @@ "description": "llvmpipe: fix multisample lines.", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/llvmpipe/lp_setup_line.c b/src/gallium/drivers/llvmpipe/lp_setup_line.c index d552e9519ce..675e5198517 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_line.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_line.c @@ -298,7 +298,7 @@ try_setup_line( struct lp_setup_context *setup, int nr_planes = 4; unsigned viewport_index = 0; unsigned layer = 0; - + float pixel_offset = setup->multisample ? 0.0 : setup->pixel_offset; /* linewidth should be interpreted as integer */ int fixed_width = util_iround(width) * FIXED_ONE; @@ -444,15 +444,15 @@ try_setup_line( struct lp_setup_context *setup, } /* x/y positions in fixed point */ - x[0] = subpixel_snap(v1[0][0] + x_offset - setup->pixel_offset); - x[1] = subpixel_snap(v2[0][0] + x_offset_end - setup->pixel_offset); - x[2] = subpixel_snap(v2[0][0] + x_offset_end - setup->pixel_offset); - x[3] = subpixel_snap(v1[0][0] + x_offset - setup->pixel_offset); + x[0] = subpixel_snap(v1[0][0] + x_offset - pixel_offset); + x[1] = subpixel_snap(v2[0][0] + x_offset_end - pixel_offset); + x[2] = subpixel_snap(v2[0][0] + x_offset_end - pixel_offset); + x[3] = subpixel_snap(v1[0][0] + x_offset - pixel_offset); - y[0] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset) - fixed_width/2; - y[1] = subpixel_snap(v2[0][1] + y_offset_end - setup->pixel_offset) - fixed_width/2; - y[2] = subpixel_snap(v2[0][1] + y_offset_end - setup->pixel_offset) + fixed_width/2; - y[3] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset) + fixed_width/2; + y[0] = subpixel_snap(v1[0][1] + y_offset - pixel_offset) - fixed_width/2; + y[1] = subpixel_snap(v2[0][1] + y_offset_end - pixel_offset) - fixed_width/2; + y[2] = subpixel_snap(v2[0][1] + y_offset_end - pixel_offset) + fixed_width/2; + y[3] = subpixel_snap(v1[0][1] + y_offset - pixel_offset) + fixed_width/2; } else { @@ -541,15 +541,15 @@ try_setup_line( struct lp_setup_context *setup, } /* x/y positions in fixed point */ - x[0] = subpixel_snap(v1[0][0] + x_offset - setup->pixel_offset) - fixed_width/2; - x[1] = subpixel_snap(v2[0][0] + x_offset_end - setup->pixel_offset) - fixed_width/2; - x[2] = subpixel_snap(v2[0][0] + x_offset_end - setup->pixel_offset) + fixed_width/2; - x[3] = subpixel_snap(v1[0][0] + x_offset - setup->pixel_offset) + fixed_width/2; + x[0] = subpixel_snap(v1[0][0] + x_offset - pixel_offset) - fixed_width/2; + x[1] = subpixel_snap(v2[0][0] + x_offset_end - pixel_offset) - fixed_width/2; + x[2] = subpixel_snap(v2[0][0] + x_offset_end - pixel_offset) + fixed_width/2; + x[3] = subpixel_snap(v1[0][0] + x_offset - pixel_offset) + fixed_width/2; - y[0] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset); - y[1] = subpixel_snap(v2[0][1] + y_offset_end - setup->pixel_offset); - y[2] = subpixel_snap(v2[0][1] + y_offset_end - setup->pixel_offset); - y[3] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset); + y[0] = subpixel_snap(v1[0][1] + y_offset - pixel_offset); + y[1] = subpixel_snap(v2[0][1] + y_offset_end - pixel_offset); + y[2] = subpixel_snap(v2[0][1] + y_offset_end - pixel_offset); + y[3] = subpixel_snap(v1[0][1] + y_offset - pixel_offset); } /* Bounding rectangle (in pixels) */ @@ -670,7 +670,7 @@ try_setup_line( struct lp_setup_context *setup, plane[i].c++; } else if (plane[i].dcdx == 0) { - if (setup->pixel_offset == 0) { + if (pixel_offset == 0) { /* correct for top-left fill convention: */ if (plane[i].dcdy > 0) plane[i].c++; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
