[Mesa-dev] [PATCH 2/4] mesa: Don't allow glSamplerParameteriv(GL_TEXTURE_CUBE_MAP_SEAMLESS) in ES

Ian Romanick idr at freedesktop.org
Thu Sep 5 16:58:54 PDT 2013


On 09/05/2013 11:32 AM, Paul Berry wrote:
> On 4 September 2013 11:29, Ian Romanick <idr at freedesktop.org
> <mailto:idr at freedesktop.org>> wrote:
> 
>     From: Ian Romanick <ian.d.romanick at intel.com
>     <mailto:ian.d.romanick at intel.com>>
> 
>     There is no GL_TEXTURE_CUBE_MAP_SEAMLESS in any version of OpenGL ES or
>     in any extension that applies to OpenGL ES.  The same error check
>     already occurs for glTexParameteri.
> 
>     Signed-off-by: Ian Romanick <ian.d.romanick at intel.com
>     <mailto:ian.d.romanick at intel.com>>
>     Cc: Maxence Le Dore <maxence.ledore at gmail.com
>     <mailto:maxence.ledore at gmail.com>>
>     ---
>      src/mesa/main/samplerobj.c | 3 ++-
>      1 file changed, 2 insertions(+), 1 deletion(-)
> 
>     diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
>     index 39cfcd0..c3b612c 100644
>     --- a/src/mesa/main/samplerobj.c
>     +++ b/src/mesa/main/samplerobj.c
>     @@ -569,7 +569,8 @@ static GLuint
>      set_sampler_cube_map_seamless(struct gl_context *ctx,
>                                    struct gl_sampler_object *samp,
>     GLboolean param)
>      {
>     -   if (!ctx->Extensions.AMD_seamless_cubemap_per_texture)
>     +   if (!_mesa_is_desktop_gl(ctx)
>     +       || !ctx->Extensions.AMD_seamless_cubemap_per_texture)
>            return INVALID_PNAME;
> 
>         if (samp->CubeMapSeamless == param)
>     --
>     1.8.1.4
> 
> 
> Should we add a similar check to these functions too?
> 
> - _mesa_GetSamplerParameteriv()
> - _mesa_GetSamplerParameterfv()
> - _mesa_GetSamplerParameterIiv()
> - _mesa_GetSamplerParameterIuiv()

Yes.  I forgot about the getters.



More information about the mesa-dev mailing list