Bug 102125

Summary: [softpipe] piglit arb_texture_view-targets regression
Product: Mesa Reporter: Vinson Lee <vlee>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: brianp, maraeo, sroland
Version: gitKeywords: bisected, regression
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Vinson Lee 2017-08-09 01:15:58 UTC
mesa: c12c2e40a36f707f733c0d6ad90160472b7a3cf6 (master 17.3.0-devel)

$ ./bin/arb_texture_view-targets -auto
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_3D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_CUBE_MAP)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_RECTANGLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_CUBE_MAP_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
PIGLIT: {"subtest": {"1D tex target validity" : "pass"}}
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_1D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_3D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_CUBE_MAP)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_RECTANGLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_1D_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_CUBE_MAP_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
PIGLIT: {"subtest": {"2D tex target validity" : "pass"}}
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_1D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_CUBE_MAP)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_RECTANGLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_1D_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_CUBE_MAP_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
PIGLIT: {"subtest": {"3D tex target validity" : "pass"}}
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_1D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_3D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_RECTANGLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_1D_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
PIGLIT: {"subtest": {"Cubemap tex target validity" : "pass"}}
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_1D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_3D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_CUBE_MAP)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_1D_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_CUBE_MAP_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
PIGLIT: {"subtest": {"Rectangle tex target validity" : "pass"}}
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_3D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_CUBE_MAP)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_RECTANGLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_CUBE_MAP_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
PIGLIT: {"subtest": {"1D Array tex target validity" : "pass"}}
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_1D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_3D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_RECTANGLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_1D_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
PIGLIT: {"subtest": {"2D Array tex target validity" : "pass"}}
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_1D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_3D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_RECTANGLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_1D_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
PIGLIT: {"subtest": {"Cubemap Array tex target validity" : "pass"}}
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_1D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_3D)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_CUBE_MAP)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_RECTANGLE)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_1D_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_2D_ARRAY)
Mesa: User error: GL_INVALID_OPERATION in glTextureView(illegal target=GL_TEXTURE_CUBE_MAP_ARRAY)
PIGLIT: {"subtest": {"Multisample 2D tex target validity" : "pass"}}
Mesa: User error: GL_INVALID_VALUE in glTextureView(new minlayer (0) > orig minlayer (0) + orig numlayers (0))
Unexpected GL error: GL_INVALID_VALUE 0x501
(Error at piglit/tests/spec/arb_texture_view/targets.c:79)
PIGLIT: {"subtest": {"Multisample 2D array tex target validity" : "fail"}}
PIGLIT: {"result": "fail" }


6839d3369905eb02151334ea7b4cd39ddcfa6770 is the first bad commit
commit 6839d3369905eb02151334ea7b4cd39ddcfa6770
Author: Brian Paul <brianp@vmware.com>
Date:   Tue Aug 1 21:28:25 2017 -0600

    st/mesa: fix handling of NumSamples=1 (v2)
    
    In Mesa we use the convention that if gl_renderbuffer::NumSamples
    or gl_texture_image::NumSamples is zero, it's a non-MSAA surface.
    Otherwise, it's an MSAA surface.  But in gallium nr_samples=1 is a
    non-MSAA surface.
    
    Before, if the user called glRenderbufferStorageMultisample() or
    glTexImage2DMultisample() with samples=1 we skipped the search for the
    next higher number of supported samples and asked the gallium driver to
    create a surface with nr_samples=1.  So we got a non-MSAA surface.
    This failed to meet the expection of the user making those calls.
    
    This patch changes the sample count checks in st_AllocTextureStorage()
    and st_renderbuffer_alloc_storage() to test for samples > 0 instead of > 1.
    And we now start querying for MSAA support at samples=2 since gallium has
    no concept of a 1x MSAA surface.
    
    A specific example of this problem is the Piglit arb_framebuffer_srgb-blit
    test.  It calls glRenderbufferStorageMultisample() with samples=1 to
    request an MSAA renderbuffer with the minimum supported number of MSAA
    samples.  Instead of creating a 4x or 8x, etc. MSAA surface, we wound up
    creating a non-MSAA surface.
    
    Finally, add a comment on the gl_renderbuffer::NumSamples field.
    
    There is one piglit regression with the VMware driver:
    ext_framebuffer_multisample-blit-mismatched-formats fails because
    now we're actually creating 4x MSAA surfaces (the requested sample
    count is 1) and we're hitting some sort of bug in the blitter code.  That
    will have to be fixed separately.  Other drivers may find regressions
    too now that MSAA surfaces are really being created.
    
    v2: start quering for MSAA support with samples=2 instead of 1.
    
    Reviewed-by: Roland Scheidegger <sroland@vmware.com>
    Reviewed-by: Marek Olšák <marek.olsak@amd.com>

:040000 040000 ce8996d82890c153e42edd49df6c4d4a09a10241 2986ed81a0e5f36dfe70d4a3438613251583f4ce M	src
bisect run success
Comment 1 Brian Paul 2017-09-01 04:11:05 UTC
Fixed w/ commit 9eca7e0ddb58808af77c6f251f5d368ea328c894

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.