Bug 61647 - [llvmpipe] lp_texture.c:580:llvmpipe_create_surface: Assertion `pt->bind & ((1 << 0) | (1 << 1))' failed.
Summary: [llvmpipe] lp_texture.c:580:llvmpipe_create_surface: Assertion `pt->bind & ((...
Status: RESOLVED FIXED
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:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-03-01 02:41 UTC by Vinson Lee
Modified: 2013-03-02 02:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2013-03-01 02:41:35 UTC
mesa: 4154ac066f2cdeddfe934884b59c8f1ff393545d (master)

Run piglit test getteximage-formats init-by-rendering.

$ ./bin/getteximage-formats init-by-rendering -auto
Using test set: Core formats
The textures will be initialized by rendering to them using glDrawPixels.
getteximage-formats failure: format: GL_ALPHA, level 1 at pixel(369, 103)
 Expected (0.203922, 0.203922, 0.203922, 0.240292)
	 Found (0.400000, 0.400000, 0.400000, 0.000000)
Tolerance (0.250000, 0.250000, 0.250000, 0.031250)
getteximage-formats failure: format: GL_ALPHA, level 2 at pixel(421, 71)
 Expected (0.203922, 0.203922, 0.203922, 0.240292)
	 Found (0.400000, 0.400000, 0.400000, 0.000000)
Tolerance (0.250000, 0.250000, 0.250000, 0.031250)
getteximage-formats failure: format: GL_LUMINANCE, level 1 at pixel(369, 103)
 Expected (0.992157, 0.000000, 0.000000, 1.000000)
	 Found (0.000000, 0.000000, 0.000000, 1.000000)
Tolerance (0.031250, 0.250000, 0.250000, 0.250000)
getteximage-formats failure: format: GL_LUMINANCE, level 2 at pixel(421, 71)
 Expected (0.992157, 0.000000, 0.000000, 1.000000)
	 Found (0.000000, 0.000000, 0.000000, 1.000000)
Tolerance (0.031250, 0.250000, 0.250000, 0.250000)
getteximage-formats failure: format: GL_INTENSITY, level 1 at pixel(369, 103)
 Expected (0.987512, 0.003137, 0.003137, 0.984375)
	 Found (0.000000, 0.000000, 0.000000, 1.000000)
Tolerance (0.031250, 0.250000, 0.250000, 0.031250)
getteximage-formats failure: format: GL_INTENSITY, level 2 at pixel(421, 71)
 Expected (0.987512, 0.003137, 0.003137, 0.984375)
	 Found (0.000000, 0.000000, 0.000000, 1.000000)
Tolerance (0.031250, 0.250000, 0.250000, 0.031250)
getteximage-formats failure: format: GL_ALPHA4, level 1 at pixel(369, 103)
 Expected (0.203922, 0.203922, 0.203922, 0.240292)
	 Found (0.400000, 0.400000, 0.400000, 0.000000)
Tolerance (0.250000, 0.250000, 0.250000, 0.031250)
getteximage-formats failure: format: GL_ALPHA4, level 2 at pixel(421, 71)
 Expected (0.203922, 0.203922, 0.203922, 0.240292)
	 Found (0.400000, 0.400000, 0.400000, 0.000000)
Tolerance (0.250000, 0.250000, 0.250000, 0.031250)
getteximage-formats failure: format: GL_ALPHA8, level 1 at pixel(369, 103)
 Expected (0.203922, 0.203922, 0.203922, 0.240292)
	 Found (0.400000, 0.400000, 0.400000, 0.000000)
Tolerance (0.250000, 0.250000, 0.250000, 0.031250)
getteximage-formats failure: format: GL_ALPHA8, level 2 at pixel(421, 71)
 Expected (0.203922, 0.203922, 0.203922, 0.240292)
	 Found (0.400000, 0.400000, 0.400000, 0.000000)
Tolerance (0.250000, 0.250000, 0.250000, 0.031250)
getteximage-formats failure: format: GL_LUMINANCE4, level 1 at pixel(369, 103)
 Expected (0.992157, 0.000000, 0.000000, 1.000000)
	 Found (0.000000, 0.000000, 0.000000, 1.000000)
Tolerance (0.031250, 0.250000, 0.250000, 0.250000)
getteximage-formats failure: format: GL_LUMINANCE4, level 2 at pixel(421, 71)
 Expected (0.992157, 0.000000, 0.000000, 1.000000)
	 Found (0.000000, 0.000000, 0.000000, 1.000000)
Tolerance (0.031250, 0.250000, 0.250000, 0.250000)
getteximage-formats failure: format: GL_LUMINANCE8, level 1 at pixel(369, 103)
 Expected (0.992157, 0.000000, 0.000000, 1.000000)
	 Found (0.000000, 0.000000, 0.000000, 1.000000)
Tolerance (0.031250, 0.250000, 0.250000, 0.250000)
getteximage-formats failure: format: GL_LUMINANCE8, level 2 at pixel(421, 71)
 Expected (0.992157, 0.000000, 0.000000, 1.000000)
	 Found (0.000000, 0.000000, 0.000000, 1.000000)
Tolerance (0.031250, 0.250000, 0.250000, 0.250000)
getteximage-formats failure: format: GL_INTENSITY4, level 1 at pixel(369, 103)
 Expected (0.987512, 0.003137, 0.003137, 0.984375)
	 Found (0.000000, 0.000000, 0.000000, 1.000000)
Tolerance (0.031250, 0.250000, 0.250000, 0.031250)
getteximage-formats failure: format: GL_INTENSITY4, level 2 at pixel(421, 71)
 Expected (0.987512, 0.003137, 0.003137, 0.984375)
	 Found (0.000000, 0.000000, 0.000000, 1.000000)
Tolerance (0.031250, 0.250000, 0.250000, 0.031250)
getteximage-formats failure: format: GL_INTENSITY8, level 1 at pixel(369, 103)
 Expected (0.987512, 0.003137, 0.003137, 0.984375)
	 Found (0.000000, 0.000000, 0.000000, 1.000000)
Tolerance (0.031250, 0.250000, 0.250000, 0.031250)
getteximage-formats failure: format: GL_INTENSITY8, level 2 at pixel(421, 71)
 Expected (0.987512, 0.003137, 0.003137, 0.984375)
	 Found (0.000000, 0.000000, 0.000000, 1.000000)
Tolerance (0.031250, 0.250000, 0.250000, 0.031250)
getteximage-formats failure: format: GL_COMPRESSED_ALPHA, level 1 at pixel(369, 103)
 Expected (0.203922, 0.203922, 0.203922, 0.240292)
	 Found (0.400000, 0.400000, 0.400000, 0.000000)
Tolerance (0.250000, 0.250000, 0.250000, 0.031250)
getteximage-formats failure: format: GL_COMPRESSED_ALPHA, level 2 at pixel(421, 71)
 Expected (0.203922, 0.203922, 0.203922, 0.240292)
	 Found (0.400000, 0.400000, 0.400000, 0.000000)
Tolerance (0.250000, 0.250000, 0.250000, 0.031250)
src/gallium/drivers/llvmpipe/lp_texture.c:580:llvmpipe_create_surface: Assertion `pt->bind & ((1 << 0) | (1 << 1))' failed.
Trace/breakpoint trap (core dumped)

(gdb) bt
#0  0x00007f7687e6145e in _debug_assert_fail (expr=0x7f7688640ce0 "pt->bind & ((1 << 0) | (1 << 1))", file=0x7f7688640a30 "src/gallium/drivers/llvmpipe/lp_texture.c", line=580, 
    function=0x7f7688641350 "llvmpipe_create_surface") at src/gallium/auxiliary/util/u_debug.c:278
#1  0x00007f7687b0c464 in llvmpipe_create_surface (pipe=0x2019c40, pt=0x2122090, surf_tmpl=0x7fffaeb8ee40) at src/gallium/drivers/llvmpipe/lp_texture.c:580
#2  0x00007f7687c69f10 in st_render_texture (ctx=0x20886d0, fb=0x88c81f0, att=0x88c8440) at src/mesa/state_tracker/st_cb_fbo.c:452
#3  0x00007f7687bcd9e2 in _mesa_set_texture_attachment (ctx=0x20886d0, fb=0x88c81f0, att=0x88c8440, texObj=0x20e07e0, texTarget=3553, level=0, zoffset=0) at src/mesa/main/fbobject.c:378
#4  0x00007f7687bd19c5 in framebuffer_texture (ctx=0x20886d0, caller=0x7f7688678f58 "2D", target=36160, attachment=36064, textarget=3553, texture=1, level=0, zoffset=0)
    at src/mesa/main/fbobject.c:2158
#5  0x00007f7687bd1d05 in _mesa_FramebufferTexture2D (target=36160, attachment=36064, textarget=3553, texture=1, level=0) at src/mesa/main/fbobject.c:2270
#6  0x000000000040200f in make_texture_image (intFormat=34026, upperRightTexel=0x7fffaebdf090 "\375\375\200}") at piglit/tests/texturing/getteximage-formats.c:96
#7  0x0000000000402bea in test_format (test=0x405638, fmt=0x403eb8) at piglit/tests/texturing/getteximage-formats.c:375
#8  0x0000000000403082 in test_all_formats () at piglit/tests/texturing/getteximage-formats.c:480
#9  0x00000000004030e3 in piglit_display () at piglit/tests/texturing/getteximage-formats.c:499
#10 0x00007f768a25d418 in display () at piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:60
#11 0x00007f7689a0f137 in fghRedrawWindow (window=0x2017780) at freeglut_main.c:210
#12 fghcbDisplayWindow (window=0x2017780, enumerator=0x7fffaebdf1b0) at freeglut_main.c:227
#13 0x00007f7689a12889 in fgEnumWindows (enumCallback=0x7f7689a0f0d0 <fghcbDisplayWindow>, enumerator=0x7fffaebdf1b0) at freeglut_structure.c:394
#14 0x00007f7689a0f5fa in fghDisplayAll () at freeglut_main.c:249
#15 glutMainLoopEvent () at freeglut_main.c:1450
#16 0x00007f7689a0ff05 in glutMainLoop () at freeglut_main.c:1498
#17 0x00007f768a25d5f0 in run_test (gl_fw=0x7f768a530bc0, argc=2, argv=0x7fffaebdf578) at piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:127
#18 0x00007f768a25b736 in piglit_gl_test_run (argc=2, argv=0x7fffaebdf578, config=0x7fffaebdf460) at piglit/tests/util/piglit-framework-gl.c:127
#19 0x0000000000401e10 in main (argc=3, argv=0x7fffaebdf578) at piglit/tests/texturing/getteximage-formats.c:46
(gdb) frame 1
#1  0x00007f7687b0c464 in llvmpipe_create_surface (pipe=0x2019c40, pt=0x2122090, surf_tmpl=0x7fffaeb8ee40) at src/gallium/drivers/llvmpipe/lp_texture.c:580
580	   assert(pt->bind & (PIPE_BIND_DEPTH_STENCIL | PIPE_BIND_RENDER_TARGET));
(gdb) print pt->bind
$1 = 8
Comment 1 Roland Scheidegger 2013-03-01 03:16:57 UTC
Yes, those new assertions essentially catch state tracker bugs. Maybe I should just disable them for the time being - in this case the state tracker is smart enough to actually not use the surface but it still creates it.
Comment 2 Vinson Lee 2013-03-01 04:00:46 UTC
c8eb2d0e829d0d2aea6a982620da0d3cfb5982e2 is the first bad commit
commit c8eb2d0e829d0d2aea6a982620da0d3cfb5982e2
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Thu Feb 28 01:25:24 2013 +0100

    llvmpipe: check buffers in llvmpipe_is_resource_referenced.
    
    Now that buffers can be used as textures or render targets
    make sure they aren't skipped.
    
    Fix suggested by Jose Fonseca.
    
    v2: added a couple of assertions so we can actually guarantee
    we check the resources and don't skip them. Also added some comments
    that this is actually a lie due to the way the opengl buffer api works.

:040000 040000 433342731ec1897b776bb1ea286814110adff12e 9e52a970fa15bbbb2e4d71d294065089988820b6 M	src
bisect run success
Comment 3 Roland Scheidegger 2013-03-02 02:07:59 UTC
Fixed by 2ef13e7c557eb5b5d017e25ff7c15b2912996c6f.
The driver will still warn though.


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.