mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
nv50: fix stencil state
It's the front stencil methods that have contiguous offsets, not the back ones. Unfortunately the names in the header still have FRONT/BACK reversed, so I'm using hex values until it gets updated.
This commit is contained in:
parent
743c4af5cd
commit
0204c7d8d7
1 changed files with 6 additions and 6 deletions
|
|
@ -409,35 +409,35 @@ nv50_depth_stencil_alpha_state_create(struct pipe_context *pipe,
|
|||
so_data (so, 0);
|
||||
}
|
||||
|
||||
/*XXX: yes, I know they're backwards.. header needs fixing */
|
||||
/* XXX: keep hex values until header is updated (names reversed) */
|
||||
if (cso->stencil[0].enabled) {
|
||||
so_method(so, tesla, NV50TCL_STENCIL_BACK_ENABLE, 5);
|
||||
so_method(so, tesla, 0x1380, 8);
|
||||
so_data (so, 1);
|
||||
so_data (so, nvgl_stencil_op(cso->stencil[0].fail_op));
|
||||
so_data (so, nvgl_stencil_op(cso->stencil[0].zfail_op));
|
||||
so_data (so, nvgl_stencil_op(cso->stencil[0].zpass_op));
|
||||
so_data (so, nvgl_comparison_op(cso->stencil[0].func));
|
||||
so_method(so, tesla, NV50TCL_STENCIL_BACK_FUNC_REF, 3);
|
||||
so_data (so, cso->stencil[0].ref_value);
|
||||
so_data (so, cso->stencil[0].writemask);
|
||||
so_data (so, cso->stencil[0].valuemask);
|
||||
} else {
|
||||
so_method(so, tesla, NV50TCL_STENCIL_BACK_ENABLE, 1);
|
||||
so_method(so, tesla, 0x1380, 1);
|
||||
so_data (so, 0);
|
||||
}
|
||||
|
||||
if (cso->stencil[1].enabled) {
|
||||
so_method(so, tesla, NV50TCL_STENCIL_FRONT_ENABLE, 8);
|
||||
so_method(so, tesla, 0x1594, 5);
|
||||
so_data (so, 1);
|
||||
so_data (so, nvgl_stencil_op(cso->stencil[1].fail_op));
|
||||
so_data (so, nvgl_stencil_op(cso->stencil[1].zfail_op));
|
||||
so_data (so, nvgl_stencil_op(cso->stencil[1].zpass_op));
|
||||
so_data (so, nvgl_comparison_op(cso->stencil[1].func));
|
||||
so_method(so, tesla, 0x0f54, 3);
|
||||
so_data (so, cso->stencil[1].ref_value);
|
||||
so_data (so, cso->stencil[1].writemask);
|
||||
so_data (so, cso->stencil[1].valuemask);
|
||||
} else {
|
||||
so_method(so, tesla, NV50TCL_STENCIL_FRONT_ENABLE, 1);
|
||||
so_method(so, tesla, 0x1594, 1);
|
||||
so_data (so, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue