Bug 56211

Summary: src/mesa/state_tracker/st_cb_texture.c:1123:copy_image_data_to_texture: Assertion `u_minify(stImage->pt->height0, src_level) == stImage->base.Height' failed.
Product: Mesa Reporter: Vinson Lee <vlee>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: medium CC: michel
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Vinson Lee 2012-10-19 23:08:02 UTC
src/mesa/state_tracker/st_cb_texture.c:1123:copy_image_data_to_texture: Assertion `u_minify(stImage->pt->height0, src_level) == stImage->base.Height' failed.

mesa: d2b0338e3354fadc90a3751520f4aa44ba01954f (master)

Run piglit fs-textureSize-sampler1DArrayShadow on softpipe.

$ ./bin/textureSize fs sampler1DArrayShadow -auto
Mesa warning: failed to remap index 173
../../src/mesa/state_tracker/st_cb_texture.c:1123:copy_image_data_to_texture: Assertion `u_minify(stImage->pt->height0, src_level) == stImage->base.Height' failed.
Trace/breakpoint trap (core dumped)


(gdb) bt
#0  _debug_assert_fail (expr=<optimized out>, file=<optimized out>, line=<optimized out>, function=<optimized out>) at util/u_debug.c:281
#1  0x00007f708cacb6dd in copy_image_data_to_texture (stImage=0x10becd0, dstLevel=0, stObj=0xfd4130, st=0xf5b170) at ../../src/mesa/state_tracker/st_cb_texture.c:1123
#2  st_finalize_texture (ctx=<optimized out>, pipe=<optimized out>, tObj=0xfd4130) at ../../src/mesa/state_tracker/st_cb_texture.c:1279
#3  0x00007f708cbb1fc8 in finalize_textures (st=0xf5b170) at ../../src/mesa/state_tracker/st_atom_texture.c:408
#4  0x00007f708cbad7f3 in st_validate_state (st=0xf5b170) at ../../src/mesa/state_tracker/st_atom.c:203
#5  0x00007f708cbb5abc in st_Clear (ctx=0xee8e00, mask=2) at ../../src/mesa/state_tracker/st_cb_clear.c:462
#6  0x00007f70904fb06a in stub_glClear (mask=16384) at piglit/tests/util/generated_dispatch.c:1696
#7  0x0000000000401a80 in piglit_display () at piglit/tests/texturing/shaders/textureSize.c:103
#8  0x00007f70904f74c8 in display () at piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:60
#9  0x00007f708f9a3137 in fghRedrawWindow (window=0xdbde60) at freeglut_main.c:210
#10 fghcbDisplayWindow (window=0xdbde60, enumerator=0x7fff55f9c4e0) at freeglut_main.c:227
#11 0x00007f708f9a6889 in fgEnumWindows (enumCallback=0x7f708f9a30d0 <fghcbDisplayWindow>, enumerator=0x7fff55f9c4e0) at freeglut_structure.c:394
#12 0x00007f708f9a35fa in fghDisplayAll () at freeglut_main.c:249
#13 glutMainLoopEvent () at freeglut_main.c:1450
#14 0x00007f708f9a3f05 in glutMainLoop () at freeglut_main.c:1498
#15 0x00007f70904f76a0 in run_test (gl_fw=0x7f70907b07c0, argc=3, argv=0x7fff55f9c8a8) at piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:127
#16 0x00007f70904f57e6 in piglit_gl_test_run (argc=3, argv=0x7fff55f9c8a8, config=0x7fff55f9c790) at piglit/tests/util/piglit-framework-gl.c:127
#17 0x0000000000401980 in main (argc=4, argv=0x7fff55f9c8a8) at piglit/tests/texturing/shaders/textureSize.c:57
(gdb) frame 1
#1  0x00007f708cacb6dd in copy_image_data_to_texture (stImage=0x10becd0, dstLevel=0, stObj=0xfd4130, st=0xf5b170) at ../../src/mesa/state_tracker/st_cb_texture.c:1123
1123	      assert(u_minify(stImage->pt->height0, src_level) == stImage->base.Height);
(gdb) print stImage->pt->height0
$1 = 1
(gdb) print src_level
$2 = <optimized out>
(gdb) print stImage->base.Height
$3 = 40


c2e37b1d2e1b8014475c7d2698fba317c9082d70 is the first bad commit
commit c2e37b1d2e1b8014475c7d2698fba317c9082d70
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Oct 19 11:59:35 2012 +0200

    st/mesa: Fix source miptree level for copying data to finalized miptree.
    
    Fixes WebGL texture mips conformance test, no piglit regressions.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44912
    
    NOTE: This is a candidate for the stable branches.
    
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Brian Paul <brianp@vmware.com>
    Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>

:040000 040000 0994a7e3a4b65b75dd97410cb7892a95d52088e8 a260c1a1cce88a1e30799bd50c71edaa65ae81e3 M	src
bisect run success
Comment 1 Andreas Boll 2012-10-20 11:10:06 UTC
Reproducable with --enable-debug configure option on r600g (rv770)
and softpipe.
Without debug option the piglit test passes on softpipe and r600g.

@ Michel:
Do we need this assertion?
Comment 2 Andreas Boll 2012-10-24 20:05:48 UTC
Fixed with eee1ff423c6a0c9c776b4e76b79bb5ed5480d83c

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.