On Tue, Mar 4, 2014 at 8:05 AM, Ian Romanick <i...@freedesktop.org> wrote:
> On 03/03/2014 03:25 AM, Marek Olšák wrote:
>>
>> From: Marek Olšák <marek.ol...@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?

As far as I know, the test fails on all Gallium drivers. It couldn't
have passed on r200, because it doesn't support GL 2.0. The type
cannot be integer, because the immediate mode function glEdgeFlag
emits a float, so if an edge flag array works on i965, glEdgeFlag must
be broken. I'm just following what glEdgeFlag does. Drivers can emit a
float-to-int conversion in the shader like r600g and radeonsi already
do to make glEdgeFlag work.

> 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?

A float-to-int conversion in the shader solves this.

Marek
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to