[Mesa-dev] [PATCH 07/16] main: fix return GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL value

Ian Romanick idr at freedesktop.org
Fri Dec 12 10:19:58 PST 2014


On 12/12/2014 12:02 AM, Samuel Iglesias Gonsálvez wrote:
> On Thursday, December 11, 2014 06:12:47 PM Ian Romanick wrote:
>> On 12/11/2014 02:34 PM, Eduardo Lima Mitev wrote:
>>> From: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
>>>
>>> Return the proper value for two-dimensional array texture and
>>> three-dimensional textures.
>>>
>>> From OpenGL ES 3.0 spec, chapter 6.1.13 "Framebuffer Object Queries",
>>> page 234:
>>>
>>> "If pname is FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER and the texture
>>> object named FRAMEBUFFER_ATTACHMENT_OBJECT_NAME is a layer of a
>>> three-dimensional texture or a two-dimensional array texture, then params
>>> will contain the number of the texture layer which contains the attached
>>> im- age. Otherwise params will contain the value zero."
>>>
>>> Furthermore, FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER is an alias of
>>> FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT.
>>>
>>> This patch fixes dEQP test:
>>>
>>> dEQP-GLES3.functional.state_query.fbo.framebuffer_attachment_texture_layer
>>>
>>> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
>>> ---
>>>
>>>  src/mesa/main/fbobject.c | 5 ++++-
>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
>>> index db2f43e..c3f01c9 100644
>>> --- a/src/mesa/main/fbobject.c
>>> +++ b/src/mesa/main/fbobject.c
>>> @@ -2904,7 +2904,10 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum
>>> target, GLenum attachment,> 
>>>           _mesa_error(ctx, err,
>>>           
>>>                       "glGetFramebufferAttachmentParameteriv(pname)");
>>>        
>>>        } else if (att->Type == GL_TEXTURE) {
>>>
>>> -         if (att->Texture && att->Texture->Target == GL_TEXTURE_3D) {
>>> +         if (att->Texture && (att->Texture->Target == GL_TEXTURE_3D ||
>>> +             att->Texture->Target == GL_TEXTURE_3D_EXT ||
>>> +             att->Texture->Target == GL_TEXTURE_2D_ARRAY ||
>>> +             att->Texture->Target == GL_TEXTURE_2D_ARRAY_EXT)) {
>>
>> GL_TEXTURE_3D == GL_TEXTURE_3D_EXT, and GL_TEXTURE_2D_ARRAY ==
>> GL_TEXTURE_2D_ARRAY_EXT
>>
> 
> OK, I will remove those checks then. With that change in place... Does the 
> patch have your reviewed-by?

Yes.

> Sam 
> 
>>>              *params = att->Zoffset;
>>>           
>>>           }
>>>           else {
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


-------------- 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/20141212/54771cc1/attachment.sig>


More information about the mesa-dev mailing list