<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - alloc_layout_array tx * ty assertion failure when making pbuffer current"
href="https://bugs.freedesktop.org/show_bug.cgi?id=61012">61012</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>alloc_layout_array tx * ty assertion failure when making pbuffer current
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Reporter</th>
<td>freedesktop@fluggo.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86 (IA32)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>9.0
</td>
</tr>
<tr>
<th>Component</th>
<td>GLX
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr></table>
<p>
<div>
<pre>The following(ish) code produces an assertion failure using llvmpipe libGL from
Mesa 9.0.2:
GLXContext new_context = glXCreateNewContext(
__display, configs[0], GLX_RGBA_TYPE, NULL, True );
if( !new_context )
g_error( "Failed to create context." );
int pbuf_attrs[] = { GLX_PBUFFER_WIDTH, 8, GLX_PBUFFER_HEIGHT, 8,
GLX_PRESERVED_CONTENTS, False, None };
GLXPbuffer pbuf = glXCreatePbuffer( __display, configs[0], pbuf_attrs );
if( pbuf == None )
g_error( "Failed to create XGL pixel buffer." );
if( !glXMakeContextCurrent( __display,
pbuf,
pbuf,
new_context ) ) {
g_error( "Failed to set context current." );
}
src/gallium/drivers/llvmpipe/lp_texture.c:93:alloc_layout_array: Assertion
`num_slices * tx * ty > 0' failed.
In alloc_layout_array, tx and ty are zero. These values seem to come from state
stored with the pbuffer; Mesa is trying to realize the drawable during the
glXMakeContextCurrent call.
Near as I can tell, the call responsible for storing that state with the
pbuffer is this code:
<a href="http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/state_trackers/glx/xlib/xm_api.c?id=369e46888904c6d379b8b477d9242cff1608e30e#n460">http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/state_trackers/glx/xlib/xm_api.c?id=369e46888904c6d379b8b477d9242cff1608e30e#n460</a>
A call to get_drawable_size retrieves the size of the pbuffer drawable into
local variables width and height, but these values never make it into the
XMesaBuffer structure.
Backtrace:
#0 0xb696717a in _debug_assert_fail (expr=0xb725b888 "num_slices * tx * ty >
0", file=
0xb725b85c "src/gallium/drivers/llvmpipe/lp_texture.c", line=93,
function=0xb725c140 "alloc_layout_array")
at src/gallium/auxiliary/util/u_debug.c:278
#1 0xb6641058 in alloc_layout_array (num_slices=1, width=0, height=0) at
src/gallium/drivers/llvmpipe/lp_texture.c:93
#2 0xb66413f4 in llvmpipe_displaytarget_layout (screen=0x8714b98,
lpr=0x8b43460) at src/gallium/drivers/llvmpipe/lp_texture.c:216
#3 0xb66415c5 in llvmpipe_resource_create (_screen=0x8714b98,
templat=0xbfffdf44) at src/gallium/drivers/llvmpipe/lp_texture.c:263
#4 0xb66c29db in xmesa_st_framebuffer_validate_textures (stfbi=0x87040c8,
width=0, height=0, mask=1)
at src/gallium/state_trackers/glx/xlib/xm_st.c:171
#5 0xb66c2b2e in xmesa_st_framebuffer_validate (stfbi=0x87040c8,
statts=0x8b433c4, count=1, out=0xbfffe028)
at src/gallium/state_trackers/glx/xlib/xm_st.c:224
#6 0xb66e122c in st_framebuffer_validate (stfb=0x8b43088, st=0x8b3d7f0) at
src/mesa/state_tracker/st_manager.c:195
#7 0xb66e2226 in st_api_make_current (stapi=0xb75d2700, stctxi=0x8b3d7f0,
stdrawi=0x87040c8, streadi=0x87040c8)
at src/mesa/state_tracker/st_manager.c:734
#8 0xb66c1dec in XMesaMakeCurrent2 (c=0x8a60e00, drawBuffer=0x8767aa8,
readBuffer=0x8767aa8)
at src/gallium/state_trackers/glx/xlib/xm_api.c:1189
#9 0xb66c4b36 in glXMakeContextCurrent (dpy=0x87261b8, draw=54525953,
read=54525953, ctx=0x8a56290)
at src/gallium/state_trackers/glx/xlib/glx_api.c:1161
#10 0xb7af9807 in gl_set_current_context (context=0x8b43078) at
src/cprocess/gl.c:152
#11 0xb7af9bcf in gl_ensure_context () at src/cprocess/gl.c:185
...and so on...</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>