Bug 23400

Summary: ogl conformance test - api-color segement fault error, patch for funcion is_interleaved_arrays is attached
Product: Mesa Reporter: Fei Jiang <fei.jiang>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: patch_for_is_interleaved_arrays

Description Fei Jiang 2009-08-18 18:17:22 UTC
Created attachment 28770 [details] [review]
patch_for_is_interleaved_arrays

When I tried to resolve a ogl conformance test ”api-color” issue, I found is_interleaved_arrays function need a small change, patched is attached. 

In the following case, vertex array is not living in a VBO, while color array is living in a VBO, and their stride is same. It is not a interleaved array, but function is_interleaved_arrays will return GL_TRUE. 

I add “abs(arrays[mesaAttr]->Ptr - firstAddr) > firstStride” conditional statement for that case. 

 
glVertexPointer (2, GL_FLOAT, 0, vbuf);
glEnableClientState (GL_VERTEX_ARRAY);

……

glGenBuffersARB(2, array_id);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, array_id[0]);
glColorPointer (attr[apiType].dim, attr[apiType].type, stride, 0);
glEnableClientState (GL_COLOR_ARRAY);
glBufferDataARB(GL_ARRAY_BUFFER_ARB, MAX_STRIDE * 4 * sizeof(char), cbuf, GL_STATIC_DRAW_ARB);

……

glDrawArrays (GL_QUAD_STRIP, 0, 4);
Comment 1 Marek Olšák 2011-02-09 06:33:27 UTC
This bug is no longer valid. The code in st_draw.c has been rewritten a couple of times since the bug was filed, and works for me and other Gallium users. Closing..

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.