Bug 9035 - Segment fault when Calling DrawArrays
Summary: Segment fault when Calling DrawArrays
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Eric Anholt
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-15 01:03 UTC by haihao
Modified: 2009-08-24 12:24 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
test case for this bug (2.33 KB, text/plain)
2006-11-15 01:05 UTC, haihao
Details
Patch to api_arrayelt.c for texture coords in array elements (1.17 KB, patch)
2006-11-19 16:37 UTC, Gary Wong
Details | Splinter Review

Description haihao 2006-11-15 01:03:27 UTC
If the buffer object is bound to ARRAY_BUFFER, Calling DrawArrays from a display
will result in segment fault
Comment 1 haihao 2006-11-15 01:05:31 UTC
Created attachment 7794 [details]
test case for this bug
Comment 2 haihao 2006-11-15 01:15:18 UTC
In I965 driver, hook function "intel_bufferobj_data" doesn't store data to base
buffer object. But hook function "_save_OBE_DrawArrays" supposes it can access
these data from base buffer object. 

Calling fallback routing "_mesa_buffer_data" in "intel_bufferobj_data" will fix
this bug, but I don't think this is the best resolution.
Comment 3 Keith Whitwell 2006-11-15 05:14:41 UTC
Interesting.  It's true I haven't tested the VBO-inside-displaylist case.  I'll
take a look.
Comment 4 Keith Whitwell 2006-11-15 18:35:29 UTC
I've commited a patch for this, though I haven't been able to test on 965.  The
problem is universal however.  Please retest.
Comment 5 Gary Wong 2006-11-19 16:37:34 UTC
Created attachment 7833 [details] [review]
Patch to api_arrayelt.c for texture coords in array elements

Unfortunately the fix in CVS doesn't work for me.  In particular, the
check_vbo() call in the texture coord loop in _ae_update_state() segfaults (the
problem is in the second parameter, as aa->array is not initialised).

I don't have time to investigate thoroughly now, but here is a patch which
seems to help things for me: modifications to check_vbo parameters in two
places (which seem like what were intended based on cursory inspection), and
commenting out two assertions (which is probably symptomatic of deeper problems
and needs to be looked into more closely).
Comment 6 Keith Whitwell 2006-11-21 05:17:06 UTC
OK, another round of fixes has gone in. Please retest again...
Comment 7 Eric Anholt 2006-11-21 13:44:39 UTC
Original testcase is working in Mesa HEAD on G965.  Gary, was your issue when
running the original testcase, or something else?
Comment 8 Gary Wong 2006-11-21 16:32:09 UTC
It was with something else, but the something else now also works with CVS HEAD.
 Thanks for the new fixes!
Comment 9 Roland Scheidegger 2006-11-22 10:14:18 UTC
Apparently fixed.
Comment 10 Adam Jackson 2009-08-24 12:24:55 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.