Bug 44961 - [bisected i965] oglc sRGB(Mipmap.1D_textures) regressed
Summary: [bisected i965] oglc sRGB(Mipmap.1D_textures) regressed
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: 8.0
Hardware: All Linux (All)
: high major
Assignee: Ian Romanick
QA Contact:
: 47026 (view as bug list)
Depends on:
Blocks: 42993
  Show dependency treegraph
Reported: 2012-01-19 19:44 UTC by fangxun
Modified: 2012-10-26 06:50 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Description fangxun 2012-01-19 19:44:18 UTC
System Environment:
Arch:           i386
Platform:       Sugarbay
Libdrm:         (master)2.4.30-1-g66518ab5653cfdc840cd69e7b653ec05df060584
Mesa:           (8.0)c85402aba91755808729fadf57a9f92285f4e61a
Xserver:                (server-1.11-branch)xorg-server-1.11.3
Kernel:         (drm-intel-fixes) 8109021313c7a3d8947677391ce6ab9cd0bb1d28

Bug detailed description:
It failed on Ironlake and Sandybridge. oglc sRGB(Mipmap.2D_textures)also failed. Bisect shows 05ab8fc13461aa9d6612d75c899dac20de067da6 is the first bad commit.
commit 05ab8fc13461aa9d6612d75c899dac20de067da6
Author:     Eric Anholt <eric@anholt.net>
AuthorDate: Tue Nov 15 12:49:25 2011 -0800
Commit:     Eric Anholt <eric@anholt.net>
CommitDate: Tue Nov 22 13:58:38 2011 -0800

    intel: Remove duplicate test for texture attachment completeness.

    We are already testing this if appropriate in
    intel_validate_framebuffer (FBO completeness), so no need to avoid
    attaching the texture to the renderbuffer here.

    This causes MESA_FORMAT_R11_G11_B10_FLOAT to now be renderable as a texture
    attachment on i965.

    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

Reproduce steps:
1. start X
2. ./oglconform -z -s -suite all -v 2 -test sRGB Mipmap.1D_textures
Comment 1 Ian Romanick 2012-02-01 10:59:07 UTC
The cases that fail are GL_SRGB8_ALPHA8_EXT, which seems odd since this case used to pass.  The expectation was that a new format was renderable but non-functional.
Comment 2 Ian Romanick 2012-02-01 11:31:27 UTC
Patch sent to mesa-dev list:

Comment 3 Eric Anholt 2012-02-23 13:59:10 UTC
commit e2dce7f7ee3e7da9cbb0bb33307ecd79e824426d
Author: Eric Anholt <eric@anholt.net>
Date:   Fri Feb 10 12:54:25 2012 -0800

    intel: Fix rendering from textures after RenderTexture().
    There's a serious trap for drivers: RenderTexture() does not indicate
    that the texture is currently bound to the draw buffer, despite
    FinishRenderTexture() signaling that the texture is just now being
    unbound from the draw buffer.
    We were acting as if RenderTexture() *was* the start of rendering and
    that we could make texturing incoherent with the current contents of
    the renderbuffer.  This caused intel oglconform sRGB
    Mipmap.1D_textures to fail, because we got a call to TexImage() and
    thus RenderTexture() on a texture bound to a framebuffer that wasn't
    the draw buffer, so we skipped validating the new image into the
    texture object used for rendering.
    We can't (easily) make RenderTexture() indicate the start of drawing,
    because both our driver and gallium are using it as the moment to set
    up the renderbuffer wrapper used for things like MapRenderbuffer().
    Instead, postpone the setup of the workaround render target miptree
    until update_renderbuffer time, so that we no longer need to skip
    validation of miptrees used as render targets.  As a bonus, this
    should make GL_NV_texture_barrier possible.
    (This also fixes a regression in the gen4 small-mipmap rendering since
    3b38b33c1648b07e75dc4d8340758171e109c598, which switched
    set_draw_offset from image->mt to irb->mt but didn't move the irb->mt
    replacement up before set_draw_offset).
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44961
    NOTE: This is a candidate for the 8.0 branch.
Comment 4 fangxun 2012-03-14 21:17:38 UTC
Verified with mesa master branch. The fix was not cherry-picked to 8.0. Leave the bug open until it is fixed on 8.0.
Comment 5 Gordon Jin 2012-03-31 18:10:26 UTC
Ian, can you cherry pick it?
Comment 6 fangxun 2012-04-01 00:23:47 UTC
oglc float-texture(mipmap.automatic)fails on mesa 8.0 branch due to the same bisect commit.
Comment 7 Ian Romanick 2012-05-31 14:26:48 UTC
This was picked over to the 8.0 branch as commit 93e94cbb48a679b7bf67594adb6f858526b37935.  This is in the 8.0.3 release.
Comment 8 Gordon Jin 2012-07-01 20:36:16 UTC
*** Bug 47026 has been marked as a duplicate of this bug. ***
Comment 9 fangxun 2012-10-26 06:50:21 UTC
Verified with mesa 9.0 commit e5fdeef1e08b55acd48dc68f0cc8fe213f2820b8.

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.