[Mesa-dev] [PATCH 05/25] mesa: Initialize image unit state to different defaults in GLES.

Ian Romanick idr at freedesktop.org
Tue Aug 18 17:07:08 PDT 2015


On 08/18/2015 01:45 AM, Francisco Jerez wrote:
> Ian Romanick <idr at freedesktop.org> writes:
> 
>> On 08/17/2015 09:45 AM, Francisco Jerez wrote:
>>> There is no GL_R8 image format in GLES, according to the state table
>>> 20.32 of the GLES 3.1 spec the default value should be GL_R32UI.
>>
>> Was any conformance test affected by this change?
> 
> Yeah, ES31-CTS.shader_image_load_store.basic-api-bind checks that the
> image unit state is initialized to the right values among other things.
> I can mention it in the commit message for the case anyone else wonders.

Yeah, that would be good.

Patches 1 through 7 are

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

I'm going to try and get through a bunch of the glsl: patches, but don't
block waiting for me.

>>> ---
>>>  src/mesa/main/shaderimage.c | 5 +++--
>>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c
>>> index 48e3e09..5a3c47a 100644
>>> --- a/src/mesa/main/shaderimage.c
>>> +++ b/src/mesa/main/shaderimage.c
>>> @@ -397,10 +397,11 @@ is_image_format_supported(const struct gl_context *ctx, GLenum format)
>>>  struct gl_image_unit
>>>  _mesa_default_image_unit(struct gl_context *ctx)
>>>  {
>>> +   const GLenum format = _mesa_is_desktop_gl(ctx) ? GL_R8 : GL_R32UI;
>>>     const struct gl_image_unit u = {
>>>        .Access = GL_READ_ONLY,
>>> -      .Format = GL_R8,
>>> -      ._ActualFormat = _mesa_get_shader_image_format(GL_R8)
>>> +      .Format = format,
>>> +      ._ActualFormat = _mesa_get_shader_image_format(format)
>>>     };
>>>     return u;
>>>  }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150818/13632a0c/attachment.sig>


More information about the mesa-dev mailing list