Bug 9971 - Seg fault when calling glRenderMode in GL_FEEDBACK mode
Summary: Seg fault when calling glRenderMode in GL_FEEDBACK mode
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: haihao
QA Contact:
URL:
Whiteboard:
Keywords:
: 9959 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-13 23:55 UTC by Wei Wang
Modified: 2009-08-24 12:25 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
the piece of test code (1016 bytes, text/plain)
2007-02-13 23:57 UTC, Wei Wang
Details
setup function for software rendering before fallback to software rendering (546 bytes, patch)
2007-02-14 19:38 UTC, haihao
Details | Splinter Review
revised patch (439 bytes, text/plain)
2007-02-28 21:33 UTC, haihao
Details

Description Wei Wang 2007-02-13 23:55:38 UTC
version:
Mesa: Master branch; cset 1e6688742e6a6e11d002c1fce5dca3da3d58594f


Under GL_RGB color mode, after switching mode to GL_FEEDBACK, I draw a vertex and then call glRenderMode to switch to GL_RENDER mode. At this moment, segment fault occurs when calling into glRenderMode .
What's more if the 2nd time I call glRenderMode (1st time of calling it was to enter GL_FEEDBACK mode) with arg mode "GL_FEEDBACK" or "GL_SELECT", segment fault still happens. refer to the simple test code attached. and the gdb's backtrace is:

#0  0x00000000 in ?? ()
#1  0xb7b02a7b in run_render (ctx=0x8057a50, stage=0x809af4c)
    at tnl/t_vb_render.c:275
#2  0xb7afcd99 in _tnl_run_pipeline (ctx=0x8057a50) at tnl/t_pipeline.c:159
#3  0xb7afda10 in _tnl_draw_prims (ctx=0x8057a50, arrays=0x8089140, prim=0x8087c9c,
    nr_prims=1, ib=0x0, min_index=0, max_index=1) at tnl/t_draw.c:400
#4  0xb7a5622f in brw_draw_prims (ctx=0x8057a50, arrays=0x8089140, prim=0x8087c9c,
    nr_prims=1, ib=0x0, min_index=0, max_index=1) at brw_draw.c:461
#5  0xb7af650b in vbo_exec_vtx_flush (exec=0x8087b78) at vbo/vbo_exec_draw.c:215
#6  0xb7af2180 in vbo_exec_FlushVertices (ctx=0x8057a50, flags=1)
    at vbo/vbo_exec_api.c:679
#7  0xb7a99f0e in _mesa_RenderMode (mode=7168) at main/feedback.c:442
#8  0xb7efb48d in glRenderMode (mode=7168)
    at ../../../src/mesa/glapi/glapitemp.h:1065
#9  0x0804899c in display () at feedback.c:35
#10 0xb7e1a4bf in processWindowWorkList (window=0x804fc60) at glut_event.c:1302
#11 0xb7e1af92 in glutMainLoop () at glut_event.c:1349
#12 0x08048a2f in main (argc=-1213215667, argv=0xb7ab0ea9) at feedback.c:51

Misc
====
happens on both 32 and 64 bits environments
Comment 1 Wei Wang 2007-02-13 23:57:12 UTC
Created attachment 8700 [details]
the piece of test code
Comment 2 haihao 2007-02-14 19:38:55 UTC
Created attachment 8711 [details] [review]
setup function for software rendering before fallback to software rendering
Comment 3 haihao 2007-02-28 01:28:10 UTC
*** Bug 9959 has been marked as a duplicate of this bug. ***
Comment 4 haihao 2007-02-28 01:33:54 UTC
This is caused by commit b59657ad965f9471574e914b861bb1d2a17d772e(merge vbo-0.2 into master). Some fallback functions aren't installed in i965, so it results in segment fault.
Comment 5 haihao 2007-02-28 21:33:09 UTC
Created attachment 8919 [details]
revised patch

In addition to brw->intel.Fallback, other something will result in fallback as well.
Comment 6 haihao 2007-03-05 06:33:14 UTC
fixed. commit: a783713432a1aed168688ace7d03bc11abf9b406.
Thanks for Keith's review.
Comment 7 Wei Tang 2007-03-08 00:00:36 UTC
Verifying environment:

Drm:     ddcb994c3eac97e153922e2a4c71384404f68597
Mesa:    1c70cde8881f794782780cbd695da0882f78c769
Xf86_video_intel:    81722a21d232fa6cfb11fbe3d984abab50e89bcc
Comment 8 Adam Jackson 2009-08-24 12:25:54 UTC
Mass version move, cvs -> git


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.