[Mesa-dev] [PATCH 1/2] mesa: fix the format of glEdgeFlagPointer

Ilia Mirkin imirkin at alum.mit.edu
Mon Mar 3 23:16:44 PST 2014


On Tue, Mar 4, 2014 at 2:05 AM, Ian Romanick <idr at freedesktop.org> wrote:
> On 03/03/2014 03:25 AM, Marek Olšák wrote:
>>
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> Softpipe expects a float in the vertex shader, which is what glEdgeFlag
>> generates.
>>
>> This fixes piglit/gl-2.0-edgeflag.
>
>
> I think this may be a problem elsewhere inside softpipe.  This test passes
> with or without this patch on i965.  It was also previously passing on i915
> and r200.  I don't have that hardware with me right now, so I can't test it
> with the patch.  Does this test fail on Gallium hardware drivers?

Fails on nv30, nv50, and nvc0 drivers:

http://people.freedesktop.org/~imirkin/nv40-comparison/problems.html
http://people.freedesktop.org/~imirkin/nv84-comparison/problems.html
http://people.freedesktop.org/~imirkin/nvc0-comparison/problems.html

>
> The "integer" column was added in OpenGL 3.0 (though the old comment says
> GL_EXT_gpu_shader4), so maybe this setting should be conditional with the GL
> version?
>
>> Cc: mesa-stable at lists.freedesktop.orgb
>>
>> ---
>>   src/mesa/main/varray.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
>> index 44db2cb..b4b6fa9 100644
>> --- a/src/mesa/main/varray.c
>> +++ b/src/mesa/main/varray.c
>> @@ -569,8 +569,8 @@ void GLAPIENTRY
>>   _mesa_EdgeFlagPointer(GLsizei stride, const GLvoid *ptr)
>>   {
>>      const GLbitfield legalTypes = UNSIGNED_BYTE_BIT;
>> -   /* see table 2.4 edits in GL_EXT_gpu_shader4 spec: */
>> -   const GLboolean integer = GL_TRUE;
>> +   /* this is the same type that glEdgeFlag uses */
>> +   const GLboolean integer = GL_FALSE;
>>      GET_CURRENT_CONTEXT(ctx);
>>
>>      FLUSH_VERTICES(ctx, 0);
>>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list