Bug 54296 - [Bisected i965]Oglc fbo(mipmap.manualCubeMap) fails
Summary: [Bisected i965]Oglc fbo(mipmap.manualCubeMap) fails
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: All Linux (All)
: high major
Assignee: Anuj Phogat
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-31 02:17 UTC by lu hua
Modified: 2012-10-12 02:42 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description lu hua 2012-08-31 02:17:23 UTC
System Environment:
--------------------------
Arch:             x86_64
Platform:         Ivybridge
Libdrm:    (master)libdrm-2.4.39-1-g7080bfdfd9b6c5f003daaef37ae9c329f2d46a6c
Mesa:    (master)83933606596a0197e6cd1740cb439eaf055e544d
Xserver:(master)xorg-server-1.12.99.905-12-g148583d62b84832369e9df39b3e527b99ca96761
Xf86_video_intel:(master)2.20.5-23-gdeaa1cac269be03f4ec44092f70349ff466d59de
Libva:    (staging)3c9f3d7dbd0e1b53cd47ac42984e7a563853f194
Libva_intel_driver:(staging)658ba48f5586dacd051a2d99504beedea9f7a792
Kernel:    (drm-intel-next-queued) 0e0428baf7c156bc2ba8a3fd311399c1afd88f54

Bug detailed description:
-------------------------
It fails on sandybridge and ivybridge with mesa master branch.It doesn't happen
on 8.0 branch.
'max_values(advanced.textureSize.thin-1d)' and 'float-texture(mipmap.manual)' also fail and have same bisect commit.

Bisect shows: 0fc11a24c85413a335b87bc34659d2381fd6670c is the first bad commit.

commit 0fc11a24c85413a335b87bc34659d2381fd6670c
Author:     Anuj Phogat <anuj.phogat@gmail.com>
AuthorDate: Wed Aug 29 11:13:55 2012 -0700
Commit:     Anuj Phogat <anuj.phogat@gmail.com>
CommitDate: Wed Aug 29 11:43:52 2012 -0700

    meta: Add GLSL variant of _mesa_meta_GenerateMipmap() function

    This reduces the overhead of using the fixed function internally
    in the driver.

    V2: Use setup_glsl_generate_mipmap() and setup_ff_generate_mipmap()
        functions to avoid code duplication.
        Use glsl version when ARB_{vertex, fragmet}_shader are present.
        Remove redundant code.

    V3: Remove redundant border related code leaving the assertion.

    Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
    Reviewed-by: Ian Romanick <idr@freedesktop.org>
    Reviewed-by: Brian Paul <brianp@vmware.com>

Visual Report:
ID      |ACCELERA|DB      |REND_T  |SURF_T  |C_BUF_T |BUF_S   |RED_S   |
     138|       1|       0|      gl|  wipbpx|    rgba|      24|       8|

GREEN_S |BLUE_S  |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES |
       8|       8|       0|      24|       8|       0|       0|       0|

SRGB    |TEX_RGB |TEX_RGBA|CAVEAT  |SWAP    |M_PBUF_W|M_PBUF_H|M_PBUF_P
      -1|       0|       0|    none|   undef|       0|       0|       0

Reproduce steps:
----------------------------
1. xinit
2. ./oglconform -z -suite all -v 2 -D 138 -test fbo mipmap.manualCubeMap
Comment 1 Anuj Phogat 2012-08-31 19:44:36 UTC
Cubemap textures would require separate fragment shader program while using glsl version of _mesa_meta_GenerateMipmap(). I clearly missed to take care of this in my patch on mesa (0fc11a2). I'll soon send out a patch to fix this issue.
Comment 2 lu hua 2012-09-04 07:10:47 UTC
It also fails on Ironlake.
It also happens on mesa 9.0 branch(commit:6886da783ac2fc549b4)
Comment 3 lu hua 2012-09-06 02:37:10 UTC
fbo(mipmap.manualCubeMap) fails on Pineview with mesa master branch. 
Bisect shows:0fc11a24c85413a335b87bc34659d2381fd6670c is the first bad commit.
Comment 4 Anuj Phogat 2012-09-07 23:03:22 UTC
This patch fixes the cause of failing test: http://www.mail-archive.com/mesa-dev@lists.freedesktop.org/msg26374.html
Patch is still under review on mailing list. Please feel free to test the patch.
Comment 5 Anuj Phogat 2012-09-14 18:30:26 UTC
commit 299acac on mesa master fixes this issue.
Comment 6 lu hua 2012-09-17 01:59:12 UTC
float-texture(mipmap.manual) still fails on master branch.

fbo(mipmap.manualCubeMap) and max_values(advanced.textureSize.thin-1d) fixed on master branch by commit:299acac849eb8506de9760c94c6e8e8b1046d909.
commit 299acac849eb8506de9760c94c6e8e8b1046d909
Author: Anuj Phogat 
Date: Fri Aug 31 13:51:39 2012 -0700

_mesa_meta_GenerateMipmap: Support all texture targets by generating shaders at runtime
Comment 7 Anuj Phogat 2012-09-22 00:16:54 UTC
float-texture(mipmap.manual) failure is resolved by following commit on mesa master.

commit eb1d87fb945783448cc40ad43c9cd4d98002d424
Author: Anuj Phogat <anuj.phogat@gmail.com>
Date:   Thu Sep 20 13:17:19 2012 -0700

    meta: Add on demand compilation of per target shader programs
    
    A call to glGenerateMipmap() follows the generation of a relevant
    shader program in setup_glsl_generate_mipmap().
    
    To support all texture targets and to avoid compiling shaders
    everytime, per target shader programs are compiled on demand
    and saved for the next call.
    
    Fixes float-texture(mipmap.manual):
    See Comment 6: https://bugs.freedesktop.org/show_bug.cgi?id=54296
    
    NOTE: This is a candidate for stable branches.
    
    Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
    Reviewed-by: Brian Paul <brianp@vmware.com>
Comment 8 lu hua 2012-09-25 01:40:33 UTC
float-texture(mipmap.manual) still fails on ironlake with master branch (commit: 60e610e0426d79fc9080df1a9ae0a6be39af1380).
It fixed by commit eb1d87fb945783448 on Ivybridge and Sandybridge.
commit eb1d87fb945783448cc40ad43c9cd4d98002d424
Author: Anuj Phogat <anuj.phogat@gmail.com>
Date:   Thu Sep 20 13:17:19 2012 -0700

    meta: Add on demand compilation of per target shader programs
Comment 9 Anuj Phogat 2012-09-29 07:24:31 UTC
I tested float-texture mipmap.manual on ironlake and it fails with same logs on mesa master at 174d44a which is before my changes for GenerateMipmap(). So, this doesn't seem to be a regression caused by commit 0fc11a2. Could you please raise a separate bug for this failure and close this one?
Comment 10 lu hua 2012-10-12 02:41:21 UTC
Yes,float-texture mipmap.manual doesn't caused by commit 0fc11a24c854 on ironlake.
Close this bug.
Comment 11 lu hua 2012-10-12 02:42:59 UTC
Veridied.Fixed by commit eb1d87fb945783448cc40ad43c9cd4d98002d424.


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.