mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
gallium: in clear_stencil_buffer() check surface format to determine stencil clear value
... as we do for the Z and Z+stencil cases
This commit is contained in:
parent
2109ba4c5d
commit
d91e62e9c6
1 changed files with 9 additions and 0 deletions
|
|
@ -544,6 +544,15 @@ clear_stencil_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
|
|||
|
||||
/* simple clear of whole buffer */
|
||||
GLuint clearValue = ctx->Stencil.Clear;
|
||||
|
||||
switch (strb->surface->format) {
|
||||
case PIPE_FORMAT_S8Z24_UNORM:
|
||||
clearValue <<= 24;
|
||||
break;
|
||||
default:
|
||||
; /* no-op, stencil value is in least significant bits */
|
||||
}
|
||||
|
||||
ctx->st->pipe->clear(ctx->st->pipe, strb->surface, clearValue);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue