Bug 46082 - piglit ext_texture_integer-api-teximage regression
Summary: piglit ext_texture_integer-api-teximage regression
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-14 22:43 UTC by Vinson Lee
Modified: 2012-02-17 07:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2012-02-14 22:43:12 UTC
mesa: 78734e375a0e3ea87abd6d5b2f85946e78e96015 (master)

Run piglit ext_texture_integer-api-teximage on softpipe.


$ ./bin/ext_texture_integer-api-teximage -auto
Mesa: User error: GL_INVALID_ENUM in glTexImage2D(incompatible format 0x8d99, type 0x1406)
Mesa: User error: GL_INVALID_OPERATION in glTexImage2D(integer/non-integer format mismatch)
Mesa: User error: GL_INVALID_ENUM in glTexSubImage2D(incompatible format 0x8d99, type 0x1406)
Unexpected GL error: GL_INVALID_ENUM 0x500
Expected GL error: GL_INVALID_OPERATION 0x502
PIGLIT: {'result': 'fail' }


commit 627b435dfe17698a1c69e9a259838fc6f2e6bd4e
Author: Brian Paul <brianp@vmware.com>
Date:   Tue Feb 7 07:42:33 2012 -0700

    mesa: new _mesa_error_check_format_and_type() function
    
    This replaces the _mesa_is_legal_format_and_type() function.
    
    According to the spec, some invalid format/type combinations to
    glDrawPixels, ReadPixels and glTexImage should generate
    GL_INVALID_ENUM but others should generate GL_INVALID_OPERATION.
    
    With the old function we didn't make that distinction and generated
    GL_INVALID_ENUM errors instead of GL_INVALID_OPERATION.  The new
    function returns one of those errors or GL_NO_ERROR.
    
    This will also let us remove some redundant format/type checks in
    follow-on commit.
    
    v2: add more checks for ARB_texture_rgb10_a2ui at the top of
    _mesa_error_check_format_and_type() per Ian.
    
    Signed-off-by: Brian Paul <brianp@vmware.com>


piglit/tests/util/glew.h:2108:#define GL_RGBA_INTEGER 0x8D99
piglit/tests/util/glew.h:615:#define GL_FLOAT 0x1406
Comment 1 Brian Paul 2012-02-15 14:18:47 UTC
I think this is actually a bug in the piglit test.

The glTexSubImage call in question can generate either GL_INVALID_ENUM or GL_INVALID_OPERATION depending on what order glTexSubImage() does its parameter error checking:

From the spec:
    INVALID_ENUM is generated by DrawPixels, TexImage* and
    SubTexImage* if <format> is one of the integer component formats
    described in table 3.6 and <type> is FLOAT.
and:
    INVALID_OPERATION is generated by TexImage* and SubTexImage* if
    the texture internalformat is an integer format as described in
    table 3.16 and <format> is not one of the integer component
    formats described in table 3.6, or if the internalformat is not an
    integer format and <format> is an integer format.

I can fix the piglit test, but after reviewing Mesa it looks like we're missing the later error check for glTexSubImage.  I'll work on that too...
Comment 2 Brian Paul 2012-02-17 07:07:24 UTC
Fixed w/ piglit 19f34bf1338cfc4a93d777564aedb0bf805140d5 and Mesa commit 6f3d91840945fbd9221a247e4f95b32c4051f202


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.