Bug 49124 - swrast/s_texfetch.c:1156: set_fetch_functions: Assertion `texImage->FetchTexel' failed.
Summary: swrast/s_texfetch.c:1156: set_fetch_functions: Assertion `texImage->FetchTexe...
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: mesa-dev
QA Contact:
Depends on:
Reported: 2012-04-24 21:49 UTC by Vinson Lee
Modified: 2012-05-01 14:16 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Vinson Lee 2012-04-24 21:49:17 UTC
mesa: 1781d26faa6bf13950b95be97b6510e8f13290d6 (master)

Run piglit copyteximage test on swrast.

$ ./bin/copyteximage -auto
Mesa: User error: GL_INVALID_VALUE in glCopyTexImage1D(internalFormat)
Unexpected GL error: GL_INVALID_VALUE 0x501
Mesa: User error: GL_INVALID_VALUE in glCopyTexImage1D(internalFormat)
Unexpected GL error: GL_INVALID_VALUE 0x501
copyteximage: swrast/s_texfetch.c:1156: set_fetch_functions: Assertion `texImage->FetchTexel' failed.
Aborted (core dumped)

(gdb) bt
#0  0x00007f35f1d1a445 in __GI_raise (sig=<optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007f35f1d1dbab in __GI_abort () at abort.c:91
#2  0x00007f35f1d1310e in __assert_fail_base (fmt=<optimized out>, 
    assertion=0x7f35efaf27ad "texImage->FetchTexel", 
    file=0x7f35efaf277e "swrast/s_texfetch.c", line=<optimized out>, 
    function=<optimized out>) at assert.c:94
#3  0x00007f35f1d131b2 in __GI___assert_fail (
    assertion=0x7f35efaf27ad "texImage->FetchTexel", 
    file=0x7f35efaf277e "swrast/s_texfetch.c", line=1156, 
    function=0x7f35efaf29f0 "set_fetch_functions") at assert.c:103
#4  0x00007f35efa65208 in set_fetch_functions (dims=1, texImage=0x1413cb0)
    at swrast/s_texfetch.c:1156
#5  _mesa_update_fetch_functions (texObj=<optimized out>)
    at swrast/s_texfetch.c:1170
#6  0x00007f35efa4aafe in _swrast_update_texture_samplers (ctx=0x1433570)
    at swrast/s_context.c:484
#7  0x00007f35efa4b099 in _swrast_validate_derived (ctx=0x1433570)
    at swrast/s_context.c:576
#8  0x00007f35efa4b3ed in _swrast_validate_line (ctx=0x1433570, 
    v0=0x7f35f2939040, v1=0x7f35f2939248) at swrast/s_context.c:377
#9  0x00007f35efa00035 in _tnl_render_lines_verts (ctx=0x1433570, 
    start=<optimized out>, count=2, flags=<optimized out>)
    at tnl/t_vb_rendertmp.h:86
#10 0x00007f35efa086c0 in run_render (ctx=0x1433570, stage=<optimized out>)
    at tnl/t_vb_render.c:321
#11 0x00007f35ef9fc4a9 in _tnl_run_pipeline (ctx=0x1433570)
    at tnl/t_pipeline.c:163
#12 0x00007f35ef9fd1fc in _tnl_draw_prims (ctx=<optimized out>, 
    arrays=0x14b0c90, prim=0x7fff51fc31e0, nr_prims=1, ib=0x0, 
    min_index=<optimized out>, max_index=1) at tnl/t_draw.c:523
#13 0x00007f35ef9fd627 in _tnl_vbo_draw_prims (ctx=0x1433570, 
    arrays=0x14b0c90, prim=0x7fff51fc31e0, nr_prims=1, ib=0x0, 
    index_bounds_valid=<optimized out>, min_index=0, max_index=1, 
    tfb_vertcount=0x0) at tnl/t_draw.c:423
#14 0x00007f35ef9ea707 in vbo_draw_arrays (ctx=0x1433570, 
    mode=<optimized out>, start=0, count=<optimized out>, numInstances=1)
    at vbo/vbo_exec_array.c:613
#15 0x0000000000425812 in piglit_display ()
    at piglit/tests/texturing/copyteximage.c:223
#16 0x00000000004355dd in display ()
    at piglit/tests/util/piglit-framework.c:56
#17 0x00007f35f23f5220 in fghRedrawWindow (window=0x1411460)
    at freeglut_main.c:210
#18 fghcbDisplayWindow (window=0x1411460, enumerator=0x7fff51fc4350)
    at freeglut_main.c:227
#19 0x00007f35f23f8939 in fgEnumWindows (
    enumCallback=0x7f35f23f5120 <fghcbDisplayWindow>, 
    enumerator=0x7fff51fc4350) at freeglut_structure.c:394
#20 0x00007f35f23f565a in fghDisplayAll () at freeglut_main.c:249
#21 glutMainLoopEvent () at freeglut_main.c:1450
#22 0x00007f35f23f5f0e in glutMainLoop () at freeglut_main.c:1498
#23 0x0000000000435d7a in main (argc=1, argv=0x7fff51fc46a8)
    at piglit/tests/util/piglit-framework.c:304
(gdb) frame 4
#4  0x00007f35efa65208 in set_fetch_functions (dims=1, texImage=0x1413cb0)
    at swrast/s_texfetch.c:1156
1156	   ASSERT(texImage->FetchTexel);
(gdb) print texImage->FetchTexel
$1 = (FetchTexelFunc) 0
Comment 1 Brian Paul 2012-05-01 08:13:38 UTC
It looks like the piglit test has a few bugs.  I'll post a patch to fix them.
Comment 2 Brian Paul 2012-05-01 13:15:31 UTC
Fixed w/ piglit commit a50bc91c44f21214569d2c567f803d3a92af6ab5
Comment 3 nobled 2012-05-01 13:29:35 UTC
Test failure aside, shouldn't the assert still be fixed? A buggy client shouldn't be able to cause that.
Comment 4 Brian Paul 2012-05-01 14:16:28 UTC
Yes, I already posted a Mesa patch to fix that side of it.

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.