Mesa (staging/22.1): lavapipe: fix depth bias offset flag enables.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 26 16:40:23 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: 8c26aa8417b70d92f9ca048e1711c1d78602fd1d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8c26aa8417b70d92f9ca048e1711c1d78602fd1d

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed May 25 13:28:43 2022 +1000

lavapipe: fix depth bias offset flag enables.

When vulkan enables depth bias, enable it for all 3 prim types
in gallium.

This fixes:
dEQP-VK.draw.renderpass.depth_bias.depth_bias_*
and
one zink test in CI

Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16701>
(cherry picked from commit 4896e136b646c1af262942e695f66ba5615fe789)

---

 .pick_status.json                              | 2 +-
 src/gallium/drivers/zink/ci/zink-lvp-fails.txt | 1 -
 src/gallium/frontends/lavapipe/lvp_execute.c   | 6 ++++++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 24cb5077409..f5d88fbad4f 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -418,7 +418,7 @@
         "description": "lavapipe: fix depth bias offset flag enables.",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/zink/ci/zink-lvp-fails.txt b/src/gallium/drivers/zink/ci/zink-lvp-fails.txt
index c99024d6aae..d65b97c77c2 100644
--- a/src/gallium/drivers/zink/ci/zink-lvp-fails.txt
+++ b/src/gallium/drivers/zink/ci/zink-lvp-fails.txt
@@ -160,7 +160,6 @@ spec@!opengl 1.1 at linestipple@Factor 2x,Fail
 spec@!opengl 1.1 at linestipple@Factor 3x,Fail
 spec@!opengl 1.1 at linestipple@Line loop,Fail
 spec@!opengl 1.1 at linestipple@Line strip,Fail
-spec@!opengl 1.1 at polygon-offset,Fail
 spec@!opengl 1.1 at polygon-mode,Fail
 spec@!opengl 1.1 at polygon-mode-facing,Fail
 spec@!opengl 1.1 at polygon-mode-offset,Fail
diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c
index eb53253b45b..2a57bdad612 100644
--- a/src/gallium/frontends/lavapipe/lvp_execute.c
+++ b/src/gallium/frontends/lavapipe/lvp_execute.c
@@ -329,8 +329,14 @@ static void emit_state(struct rendering_state *state)
       assert(offsetof(struct pipe_rasterizer_state, offset_clamp) - offsetof(struct pipe_rasterizer_state, offset_units) == sizeof(float) * 2);
       if (state->depth_bias.enabled) {
          memcpy(&state->rs_state.offset_units, &state->depth_bias, sizeof(float) * 3);
+         state->rs_state.offset_tri = true;
+         state->rs_state.offset_line = true;
+         state->rs_state.offset_point = true;
       } else {
          memset(&state->rs_state.offset_units, 0, sizeof(float) * 3);
+         state->rs_state.offset_tri = false;
+         state->rs_state.offset_line = false;
+         state->rs_state.offset_point = false;
       }
       cso_set_rasterizer(state->cso, &state->rs_state);
       state->rs_dirty = false;



More information about the mesa-commit mailing list