[Mesa-dev] [PATCH 5/5] mesa/es: Validate glRenderbufferStorage internalFormat in Mesa code rather than the ES wrapper

Ian Romanick idr at freedesktop.org
Mon Aug 27 11:33:51 PDT 2012


On 08/25/2012 11:00 AM, Eric Anholt wrote:
> Ian Romanick <idr at freedesktop.org> writes:
>
>> On 08/24/2012 02:46 PM, Eric Anholt wrote:
>>> Ian Romanick <idr at freedesktop.org> writes:
>>>>       case GL_RED:
>>>>       case GL_R8:
>>>> +      return ctx->API != API_OPENGLES && ctx->Extensions.ARB_texture_rg
>>>> +         ? GL_RED : 0;
>>>
>>> R8 should have the gles3 support case here.
>>>
>>>>       case GL_R16:
>>>> -      return ctx->Extensions.ARB_texture_rg ? GL_RED : 0;
>>>> +      return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_rg
>>>> +         ? GL_RED : 0;
>>>>       case GL_RG:
>>>>       case GL_RG8:
>>>> +      return ctx->API != API_OPENGLES && ctx->Extensions.ARB_texture_rg
>>>> +         ? GL_RG : 0;
>>>
>>> RG8 should have the gles3 support case here.
>>
>> We get RG and friends in API_OPEGNES2 because of GL_EXT_texture_rg.
>> Only API_OPENGLES loses.
>
> Oops, I was reading the return logic flipped.  The unsized formats
> should get banned for gles, right?

Gak.  The quirks of ES frustrate the crap out of me.  You are, of 
course, correct.

     Accepted by the <internalformat> parameter of RenderbufferStorage
     and RenderbufferStorageMultisampleAPPLE:

         R8_EXT                  0x8229
         RG8_EXT                 0x822B


More information about the mesa-dev mailing list