mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 09:10:11 +01:00
gallium: don't enable stencil test if no stencil buffer.
Also, if not doing two-sided stencil, set back-face state = front-face state.
This commit is contained in:
parent
6579440ea9
commit
d453042bc6
1 changed files with 4 additions and 1 deletions
|
|
@ -105,7 +105,7 @@ update_depth_stencil_alpha(struct st_context *st)
|
|||
st->ctx->Query.CurrentOcclusionObject->Active)
|
||||
dsa->depth.occlusion_count = 1;
|
||||
|
||||
if (st->ctx->Stencil.Enabled) {
|
||||
if (st->ctx->Stencil.Enabled && st->ctx->Visual.stencilBits > 0) {
|
||||
dsa->stencil[0].enabled = 1;
|
||||
dsa->stencil[0].func = st_compare_func_to_pipe(st->ctx->Stencil.Function[0]);
|
||||
dsa->stencil[0].fail_op = gl_stencil_op_to_pipe(st->ctx->Stencil.FailFunc[0]);
|
||||
|
|
@ -125,6 +125,9 @@ update_depth_stencil_alpha(struct st_context *st)
|
|||
dsa->stencil[1].value_mask = st->ctx->Stencil.ValueMask[1] & 0xff;
|
||||
dsa->stencil[1].write_mask = st->ctx->Stencil.WriteMask[1] & 0xff;
|
||||
}
|
||||
else {
|
||||
dsa->stencil[1] = dsa->stencil[0];
|
||||
}
|
||||
}
|
||||
|
||||
if (st->ctx->Color.AlphaEnabled) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue