Bug 37154 - main/texstore.c:4187: _mesa_texstore_rgb9_e5: Assertion `baseInternalFormat == 0x1907' failed.
main/texstore.c:4187: _mesa_texstore_rgb9_e5: Assertion `baseInternalFormat =...
Status: CLOSED FIXED
Product: Mesa
Classification: Unclassified
Component: Mesa core
unspecified
x86 (IA32) Linux (All)
: medium critical
Assigned To: Marek Olšák
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-12 16:50 UTC by Vinson Lee
Modified: 2011-05-13 18:10 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
fix (1.98 KB, patch)
2011-05-13 16:12 UTC, Marek Olšák
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2011-05-12 16:50:52 UTC
mesa: 1ca3efe5485a5e3800c4bc637a65a733257fb89e (master)

Run piglit glean pixelFormats test on softpipe or llvmpipe.

$ ./bin/glean -r results -t pixelFormats --quick
glean: main/texstore.c:4187: _mesa_texstore_rgb9_e5: Assertion `baseInternalFormat == 0x1907' failed.

(gdb) bt
#0  0x0091c416 in __kernel_vsyscall ()
#1  0x00978941 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x0097be42 in abort () at abort.c:92
#3  0x009718e8 in __assert_fail (assertion=0x50daeb "baseInternalFormat == 0x1907", file=0x50c05d "main/texstore.c", line=4187, 
    function=0x50ddd6 "_mesa_texstore_rgb9_e5") at assert.c:81
#4  0x002ea8de in _mesa_texstore_rgb9_e5 (ctx=0x8659060, dims=2, baseInternalFormat=6408, dstFormat=MESA_FORMAT_RGB9_E5_FLOAT, dstAddr=0x883a9a0, 
    dstXoffset=0, dstYoffset=0, dstZoffset=0, dstRowStride=64, dstImageOffsets=0x5bb868, srcWidth=16, srcHeight=16, srcDepth=1, srcFormat=6407, 
    srcType=35902, srcAddr=0x8845f08, srcPacking=0x86679fc) at main/texstore.c:4187
#5  0x002eaecb in _mesa_texstore (ctx=0x8659060, dims=2, baseInternalFormat=6408, dstFormat=MESA_FORMAT_RGB9_E5_FLOAT, dstAddr=0x883a9a0, dstXoffset=0, 
    dstYoffset=0, dstZoffset=0, dstRowStride=64, dstImageOffsets=0x5bb868, srcWidth=16, srcHeight=16, srcDepth=1, srcFormat=6407, srcType=35902, 
    srcAddr=0x8845f08, srcPacking=0x86679fc) at main/texstore.c:4478
#6  0x00410525 in make_texture (st=0x869aca8, width=16, height=16, format=6407, type=35902, unpack=0x86679fc, pixels=0x8845f08)
    at state_tracker/st_cb_drawpixels.c:467
#7  0x00411d36 in st_DrawPixels (ctx=0x8659060, x=0, y=0, width=16, height=16, format=6407, type=35902, unpack=0x86679fc, pixels=0x8845f08)
    at state_tracker/st_cb_drawpixels.c:1041
#8  0x003a6248 in _mesa_DrawPixels (width=16, height=16, format=6407, type=35902, pixels=0x8845f08) at main/drawpix.c:109
#9  0x08107b59 in GLEAN::PixelFormatsTest::DrawImage(int, int, unsigned int, unsigned int, int, unsigned char const*) const ()
#10 0x081092c8 in GLEAN::PixelFormatsTest::TestCombination(unsigned int, unsigned int, int) ()
#11 0x081096b5 in GLEAN::PixelFormatsTest::runOne(GLEAN::MultiTestResult&, GLEAN::Window&) ()
#12 0x080c5a1e in GLEAN::BaseTest<GLEAN::MultiTestResult>::run(GLEAN::Environment&) ()
#13 0x080bdd46 in main ()

(gdb) frame 4
#4  0x002ea8de in _mesa_texstore_rgb9_e5 (ctx=0x8659060, dims=2, baseInternalFormat=6408, dstFormat=MESA_FORMAT_RGB9_E5_FLOAT, dstAddr=0x883a9a0, 
    dstXoffset=0, dstYoffset=0, dstZoffset=0, dstRowStride=64, dstImageOffsets=0x5bb868, srcWidth=16, srcHeight=16, srcDepth=1, srcFormat=6407, 
    srcType=35902, srcAddr=0x8845f08, srcPacking=0x86679fc) at main/texstore.c:4187
4187	   ASSERT(baseInternalFormat == GL_RGB);
(gdb) print baseInternalFormat
$1 = 6408
(gdb) print /x baseInternalFormat
$2 = 0x1908


mesa/include/GL/gl.h
   507  #define GL_RGB                                  0x1907
   508  #define GL_RGBA                                 0x1908
Comment 1 Vinson Lee 2011-05-12 17:24:14 UTC
1da44f5923c5715d78a48dc300bbc6cbd3f3ea99 is the first bad commit
commit 1da44f5923c5715d78a48dc300bbc6cbd3f3ea99
Author: Marek Olšák <maraeo@gmail.com>
Date:   Tue Apr 26 02:23:33 2011 +0200

    st/mesa: support EXT_texture_shared_exponent
    
    Reviewed-by: Brian Paul <brianp@vmware.com>

:040000 040000 84edd35308923bd706e301530b97106f7b13f6f2 e7869c8872ec67e6acf7c85eafc985e74f7eb750 M	src
bisect run success
Comment 2 Marek Olšák 2011-05-13 15:27:11 UTC
How do you enable asserts in mesa/main? The ASSERT macro doesn't do anything here. (with --enable-debug)
Comment 3 Vinson Lee 2011-05-13 15:41:31 UTC
I was using 'make linux-x86-debug' to test with softpipe.
Comment 4 Brian Paul 2011-05-13 15:56:34 UTC
(In reply to comment #2)
> How do you enable asserts in mesa/main? The ASSERT macro doesn't do anything
> here. (with --enable-debug)

We should be passing -DDEBUG when making debug builds.  Maybe autoconf isn't doing that.
Comment 5 Marek Olšák 2011-05-13 16:12:13 UTC
Created attachment 46697 [details] [review]
fix

The attached patch should fix this bug. Please review.
Comment 6 Brian Paul 2011-05-13 16:36:54 UTC
Reviewed-by: Brian Paul <brianp@vmware.com>
Comment 7 Marek Olšák 2011-05-13 16:57:17 UTC
Pushed, closing.
Comment 8 Vinson Lee 2011-05-13 18:10:27 UTC
mesa: ad2999d2113356d526b39774eb8114e974dac048 (master)

glean pixelFormats passes on softpipe.