From: Brian Date: Tue, 30 Oct 2007 16:23:58 +0000 (-0600) Subject: test glStencilFuncSeparateATI() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b8a970593cd13cd4d0fc5c27e3fd7182f631a0e;p=mesa.git test glStencilFuncSeparateATI() --- diff --git a/progs/tests/getprocaddress.c b/progs/tests/getprocaddress.c index 8b000d234a3..ca66025d2dc 100644 --- a/progs/tests/getprocaddress.c +++ b/progs/tests/getprocaddress.c @@ -268,6 +268,32 @@ test_VertexAttrib4dvNV(generic_func func) } +static GLboolean +test_StencilFuncSeparateATI(generic_func func) +{ +#ifdef GL_ATI_separate_stencil + PFNGLSTENCILFUNCSEPARATEATIPROC stencilFuncSeparateATI = (PFNGLSTENCILFUNCSEPARATEATIPROC) func; + GLint frontFunc, backFunc; + GLint frontRef, backRef; + GLint frontMask, backMask; + (*stencilFuncSeparateATI)(GL_LESS, GL_GREATER, 2, 0xa); + glGetIntegerv(GL_STENCIL_FUNC, &frontFunc); + glGetIntegerv(GL_STENCIL_BACK_FUNC, &backFunc); + glGetIntegerv(GL_STENCIL_REF, &frontRef); + glGetIntegerv(GL_STENCIL_BACK_REF, &backRef); + glGetIntegerv(GL_STENCIL_VALUE_MASK, &frontMask); + glGetIntegerv(GL_STENCIL_BACK_VALUE_MASK, &backMask); + if (frontFunc != GL_LESS || + backFunc != GL_GREATER || + frontRef != 2 || + backRef != 2 || + frontMask != 0xa || + backMask != 0xa) + return GL_FALSE; +#endif + return GL_TRUE; +} + static GLboolean test_StencilFuncSeparate(generic_func func) {