mesa: Use new pf_is_depth_and_stencil inline.
This commit is contained in:
@@ -103,20 +103,6 @@ st_destroy_clear(struct st_context *st)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static GLboolean
|
|
||||||
is_depth_stencil_format(enum pipe_format pipeFormat)
|
|
||||||
{
|
|
||||||
switch (pipeFormat) {
|
|
||||||
case PIPE_FORMAT_S8Z24_UNORM:
|
|
||||||
case PIPE_FORMAT_Z24S8_UNORM:
|
|
||||||
return GL_TRUE;
|
|
||||||
default:
|
|
||||||
return GL_FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draw a screen-aligned quadrilateral.
|
* Draw a screen-aligned quadrilateral.
|
||||||
* Coords are window coords with y=0=bottom. These will be passed
|
* Coords are window coords with y=0=bottom. These will be passed
|
||||||
@@ -331,7 +317,7 @@ static INLINE GLboolean
|
|||||||
check_clear_depth_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
|
check_clear_depth_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
|
||||||
{
|
{
|
||||||
const struct st_renderbuffer *strb = st_renderbuffer(rb);
|
const struct st_renderbuffer *strb = st_renderbuffer(rb);
|
||||||
const GLboolean isDS = is_depth_stencil_format(strb->surface->format);
|
const GLboolean isDS = pf_is_depth_and_stencil(strb->surface->format);
|
||||||
|
|
||||||
if (ctx->Scissor.Enabled)
|
if (ctx->Scissor.Enabled)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -351,7 +337,7 @@ static INLINE GLboolean
|
|||||||
check_clear_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
|
check_clear_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
|
||||||
{
|
{
|
||||||
const struct st_renderbuffer *strb = st_renderbuffer(rb);
|
const struct st_renderbuffer *strb = st_renderbuffer(rb);
|
||||||
const GLboolean isDS = is_depth_stencil_format(strb->surface->format);
|
const GLboolean isDS = pf_is_depth_and_stencil(strb->surface->format);
|
||||||
const GLuint stencilMax = (1 << rb->StencilBits) - 1;
|
const GLuint stencilMax = (1 << rb->StencilBits) - 1;
|
||||||
const GLboolean maskStencil
|
const GLboolean maskStencil
|
||||||
= (ctx->Stencil.WriteMask[0] & stencilMax) != stencilMax;
|
= (ctx->Stencil.WriteMask[0] & stencilMax) != stencilMax;
|
||||||
|
Reference in New Issue
Block a user