mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
swrast: use stencil packing function in s_stencil.c
(cherry picked from commit c45771905f)
This commit is contained in:
parent
143999bdd8
commit
d980b8350f
1 changed files with 3 additions and 1 deletions
|
|
@ -326,12 +326,14 @@ put_s8_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
|
|||
const GLubyte stencil[])
|
||||
{
|
||||
const GLint w = rb->Width, h = rb->Height;
|
||||
gl_pack_ubyte_stencil_func pack_stencil =
|
||||
_mesa_get_pack_ubyte_stencil_func(rb->Format);
|
||||
GLuint i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
|
||||
GLubyte *dst = _swrast_pixel_address(rb, x[i], y[i]);
|
||||
_mesa_pack_ubyte_stencil_row(rb->Format, 1, &stencil[i], dst);
|
||||
pack_stencil(&stencil[i], dst);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue