Bug 41609 - [SNB]oglc float-texture(shader.texture1d) failed on SandyBridge
[SNB]oglc float-texture(shader.texture1d) failed on SandyBridge
Status: VERIFIED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965
git
All Linux (All)
: medium normal
Assigned To: Eric Anholt
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-09 04:41 UTC by fangxun
Modified: 2012-08-06 08:24 UTC (History)
0 users

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 fangxun 2011-10-09 04:41:16 UTC
System Environment:
--------------------------
Arch:           i386
Platform:       huronriver
Libdrm:  (master)2.4.26-11-gc82ef03e4c92017bf5644f294ea04e30500f8d4c
Mesa:    (master)b861479f83ea140bfe24357d09f18a6d026d97b5
Xserver:(master)xorg-server-1.11.0-176-gfae7ed62ad476114bd37b566202cf6b6546c0a1f
Xf86_video_intel: (master)2.16.0-115-gc5414ec992d935e10156a2b513d5ec2dded2f689
Kernel: (drm-intel-next)64a742fac3a22f57303d8f1b7e347350a1c48254

Bug detailed description:
------------------------- 
It happens on Sandybridge and Ironlake. There are many other cases segfault due to same causes. Below is backtrace.
#0  brw_fs_precompile (ctx=0x99f16a0, prog=0x9c518a8) at brw_fs.cpp:1841
#1  0xb7b144dc in brw_shader_precompile (ctx=0x99f16a0, prog=0x9c518a8) at brw_shader.cpp:68
#2  0xb7c6af71 in _mesa_glsl_link_shader (ctx=0x99f16a0, prog=0x9c518a8) at program/ir_to_mesa.cpp:3424
#3  0xb7b91099 in link_program (ctx=0x99f16a0, program=<value optimized out>) at main/shaderapi.c:764
#4  0x081b22a4 in float_textures::createProgram(char const*, char const*) ()
#5  0x081c00f0 in float_textures::validateShader(unsigned int, unsigned int, unsigned int, std::vector<oglConf::Color, std::allocator<oglConf::Color> > const&) ()
#6  0x081c6b52 in float_textures::subcases::Shader1DTest() ()
#7  0x081d3843 in float_texturesExec(testParameters*) ()
#8  0x08c16898 in callFunctionHandleExceptionsInner(long (*)(testParameters*), testParameters*, char*) ()
#9  0x08c169e7 in callFunctionHandleExceptions(long (*)(testParameters*), testParameters*) ()
#10 0x08c15499 in DriverExec(long (*)(testParameters*), testParameters*) ()
#11 0x08bfcbf5 in (anonymous namespace)::MyMessagePump::idle() ()
#12 0x08bd205a in MessagePump::process_messages() ()
#13 0x08bfda92 in ExecutionManager::execute_schedules() ()
#14 0x08b8f196 in tkShellExecute(std::vector<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::vector<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&) ()
#15 0x08b97d1c in main ()

Bisect is blocked because some mesa commit build failed.
e2bdef53807d0f23c2a1ff326ea8190cb57aa90a bad
77d67a44cc9788072090e3f1000cfe1cec0a6807 skip 5a4279f80d80fd30452ee6cc7cdfaffb12b1d605 skip de772c402215b956ab3aa0875330fc1bf7cdf95b skip
39348bf79fb247eec895c93e52f23afe138be46a skip
010cc547ca8c1fb2107106b0ad0de560780ce9aa skip
2fae55666e298525fe3b5550aa2a2ebeea437710 good 

The first bad commit could be any of:
e2bdef53807d0f23c2a1ff326ea8190cb57aa90a 77d67a44cc9788072090e3f1000cfe1cec0a6807  5a4279f80d80fd30452ee6cc7cdfaffb12b1d605  de772c402215b956ab3aa0875330fc1bf7cdf95b 39348bf79fb247eec895c93e52f23afe138be46a 010cc547ca8c1fb2107106b0ad0de560780ce9aa 


Reproduce steps:
----------------
1. start X
2. ./oglconform -z -s -suite all -v 2 -D 115 -test float-texture shader.texture1d
Comment 1 Eric Anholt 2011-10-21 13:30:20 UTC
Potential fix at http://cgit.freedesktop.org/~anholt/mesa/commit/?id=6f2b337a4a3509bfe2447b3e0e035131448d82c9

Note that the float-texture testcase is broken, because it tries to use a vertex shader with texturing even though the number of units available is 0, and fails when the shader doesn't link.  (The minimum maximum increases from 0 in GL 3.1, not 3.0)
Comment 2 Eric Anholt 2011-10-24 10:21:08 UTC
Update: Apparently we had our plans wrong, and 3.0 does require vertex textures.  Ouch.
Comment 3 Ian Romanick 2011-10-28 13:40:46 UTC
The crash should be fixed by the following commit on master.  However, the test will still fail.  I am decreasing the priority and the severity to match.

commit 276000472abbc34d86fcb628bc3a1990e9581af3
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Tue Oct 11 16:27:41 2011 -0700

    ir_to_mesa: Let check_resources halt compilation
    
    Previously check_resources could fail, but we'd still try to optimize
    the shader, do device-specific code generation, etc.  In some cases,
    this could explode (especially in the device-specific code
    generation).  I haven't found that I could trigger this with the
    current code.  When too many samplers were used with the new uniform
    handling code, I observed several crashes deep down in the driver.
    
    NOTE: This is candidate for the 7.11 branch.
    
    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41609
    Cc: Eric Anholt <eric@anholt.net>
    Reviewed-and-tested-by: Kenneth Graunke <kenneth@whitecape.org>
Comment 4 Ian Romanick 2011-12-23 17:39:26 UTC

*** This bug has been marked as a duplicate of bug 29522 ***
Comment 5 fangxun 2011-12-25 23:43:14 UTC
Against commit 37d24a70daa41bb(bug 29522), it passed on Ironlake, but still failed on SandyBridge.
Comment 6 Kenneth Graunke 2012-08-06 07:55:37 UTC
This test seems to be working with Mesa master.  Presumably this got fixed when I added VS texturing support...but it might've been something else that changed in the last 7 months.
Comment 7 fangxun 2012-08-06 08:24:01 UTC
Verified with mesa master commit 61b62c007a7941e9b45e83440e932160a597e0e1.