mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
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@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16701>
This commit is contained in:
parent
5185c2d88e
commit
4896e136b6
2 changed files with 6 additions and 1 deletions
|
|
@ -156,7 +156,6 @@ spec@!opengl 1.1@linestipple@Factor 2x,Fail
|
|||
spec@!opengl 1.1@linestipple@Factor 3x,Fail
|
||||
spec@!opengl 1.1@linestipple@Line loop,Fail
|
||||
spec@!opengl 1.1@linestipple@Line strip,Fail
|
||||
spec@!opengl 1.1@polygon-offset,Fail
|
||||
spec@!opengl 1.1@polygon-mode,Fail
|
||||
spec@!opengl 1.1@polygon-mode-facing,Fail
|
||||
spec@!opengl 1.1@polygon-mode-offset,Fail
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue