Bug 9081

Summary: Calling Vertex with different number of parameters from a display list triggers an assertion.(965, x86)
Product: Mesa Reporter: haihao <haihao.xiang>
Component: Drivers/DRI/i965Assignee: Eric Anholt <eric>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: high CC: mesa-dev
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Test case demonstrating Texvert in a display list
check the current attribute when asserting.

Description haihao 2006-11-19 21:02:39 UTC
On 965 platform, calling glVertex2iv and glVertex3iv in turn from a display list
triggers an assertion: brw_save_api.c:533: _save_upgrade_vertex: Assertion
`oldsz == 0' failed.
Comment 1 haihao 2006-11-19 21:04:36 UTC
Created attachment 7836 [details]
Test case demonstrating Texvert in a display list
Comment 2 haihao 2006-11-19 21:13:15 UTC
Created attachment 7837 [details] [review]
check the current attribute when asserting.

I965 driver supposes the old size is always 0 if save->currentsz[attr][0] == 0
is true when it changes vertex attributes. This supposition is incorrect when
attr is 0(BRW_ATTRIB_POS) because save->currentsz[0] is not refreshed in
context, it is always 0.

Here is the patch that it check the current attribute.
Comment 3 Keith Whitwell 2006-11-20 03:47:20 UTC
I've committed a similar fix - basically including the test for attr != 0 into
the surrounding if statement, as the whole concept of dangling references can't
apply to the position attribute.  Please retest as I don't have access to
hardware atm.
Comment 4 Eric Anholt 2006-11-21 13:40:19 UTC
Appears to work with Mesa HEAD.
Comment 5 Adam Jackson 2009-08-24 12:25:02 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.