[Mesa-stable] [Mesa-dev] [PATCH 1/3] mesa: GL_TEXTURE_BORDER_COLOR exists in OpenGL 1.0, so don't depend on GL_ARB_texture_border_clamp

Ian Romanick idr at freedesktop.org
Thu Sep 21 15:39:13 UTC 2017


On 09/20/2017 03:12 AM, Juan A. Suarez Romero wrote:
> On Sat, 2017-07-08 at 02:03 +0300, Andres Gomez wrote:
>> Ian, it looks like we could want this patch (and the others from the
>> series when they land) in -stable (?)
>>
> 
> As we are preparing a new stable 17.1 release, gently pinging.
> 

I completely forgot about this series... thanks for the reminder. :)

> 	J.A.
> 
>> On Tue, 2017-06-27 at 10:09 -0700, Ian Romanick wrote:
>>> From: Ian Romanick <ian.d.romanick at intel.com>
>>>
>>> On NV20 (and probably also on earlier NV GPUs that lack
>>> GL_ARB_texture_border_clamp) fixes the following piglit tests:
>>>
>>>     gl-1.0-beginend-coverage gltexparameter[if]{v,}
>>>     push-pop-texture-state
>>>     texwrap 1d
>>>     texwrap 1d proj
>>>     texwrap 2d proj
>>>     texwrap formats
>>>
>>> All told, 49 more tests pass on NV20 (10de:0201).
>>>
>>> No changes on Intel CI run or RV250 (1002:4c66).
>>>
>>> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
>>> ---
>>>  src/mesa/main/texparam.c | 10 +++++++++-
>>>  1 file changed, 9 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
>>> index 3c110de..857faf6 100644
>>> --- a/src/mesa/main/texparam.c
>>> +++ b/src/mesa/main/texparam.c
>>> @@ -736,8 +736,16 @@ set_tex_parameterf(struct gl_context *ctx,
>>>        break;
>>>  
>>>     case GL_TEXTURE_BORDER_COLOR:
>>> +      /* Border color exists in desktop OpenGL since 1.0 for GL_CLAMP.  In
>>> +       * OpenGL ES 2.0+, it only exists in when GL_OES_texture_border_clamp is
>>> +       * enabled.  It is never available in OpenGL ES 1.x.
>>> +       *
>>> +       * FIXME: Every driver that supports GLES2 has this extension.  Elide
>>> +       * the check?
>>> +       */
>>>        if (ctx->API == API_OPENGLES ||
>>> -          !ctx->Extensions.ARB_texture_border_clamp)
>>> +          (ctx->API == API_OPENGLES2 &&
>>> +           !ctx->Extensions.ARB_texture_border_clamp))
>>>           goto invalid_pname;
>>>  
>>>        if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target))
> 



More information about the mesa-stable mailing list