[Mesa-dev] [PATCH 2/2] gallium: Replaced gl_rasterization_rules with lower_left_origin and half_pixel_center.
Christoph Bumiller
e0425955 at student.tuwien.ac.at
Tue Apr 23 10:02:41 PDT 2013
On 23.04.2013 18:28, Jose Fonseca wrote:
> Ok. I've moved the docs to src/gallium/docs/source/cso/rasterizer.rst , and renamed `lower_left_origin` to `bottom_edge_rule`.
>
Well, that doesn't work for NV, but it's at least less invasive for
radeon since you don't have to change the state tracker (using
lower_left_origin instead of flipping viewport + bottom_edge_rule) to
get things working correctly.
/me breathes, tries not to care, too much stuff on my plate already
> This is how it looks like:
>
> http://people.freedesktop.org/~jrfonseca/gl_rasterization_rules/cso/rasterizer.html#other-members
>
> Jose
>
> ----- Original Message -----
>> Yeah, I was confused when reading the comment and the diagrams. It
>> probably shouldn't mention the screen origin at all and instead should
>> say which one of the top and bottom edges is inclusive and which one
>> is exclusive when determining pixel ownership.
>>
>> Anyway, thank you for fixing this. I would have probably never knew
>> how to fix the triangle rasterization tests if you didn't bring this
>> up.
>>
>> Marek
>>
>> On Sun, Apr 21, 2013 at 7:54 PM, Jose Fonseca <jfonseca at vmware.com> wrote:
>>> ----- Original Message -----
>>>> Some suggestions for the name:
>>>>
>>>> lower_left_edge_rule
>>>> lower_left_rasterization_edge_rule
>>>> gl_edge_rule
>>>> gl_rasterization_edge_rule
>>>>
>>>> In this case, the name is not as important as the documentation which
>>>> defines the behavior of the state.
>>>
>>> On that note, I thought that James' diagrams were pretty good. Maybe the
>>> axis is misleading.
>>>
>>>
>>> + /**
>>> + * Triangle rasterization always uses a 'top,left' rule for pixel
>>> ownership,
>>> + * this just alters what we consider to be the top edge for that test.
>>> + *
>>> + * When true, screen coordinates origin is considered to be at
>>> bottom-left
>>> + * (e.g., OpenGL drawables):
>>> + *
>>> + * y ^
>>> + * |
>>> + * | +=============+ <- top edge
>>> + * | | |
>>> + * | | |
>>> + * | | |
>>> + * | +-------------+
>>> + * |
>>> + * 0 +--------------------->
>>> + * 0 x
>>> + *
>>> + * When false, screen coordinates origin is considered to be at
>>> top-left
>>> + * (e.g., OpenGL FBOs, D3D):
>>> + *
>>> + * 0 x
>>> + * 0 +--------------------->
>>> + * |
>>> + * | +=============+ <- top edge
>>> + * | | |
>>> + * | | |
>>> + * | | |
>>> + * | +-------------+
>>> + * |
>>> + * y V
>>> *
>>> - * Triangle rasterization always uses a 'top,left' rule for pixel
>>> - * ownership, this just alters which point we consider the pixel
>>> - * center for that test.
>>> + * See also:
>>> + * -
>>> http://www.opengl.org/registry/specs/ARB/fragment_coord_conventions.txt
>>> + * -
>>> http://msdn.microsoft.com/en-us/library/windows/desktop/cc627092.aspx
>>> + * -
>>> http://msdn.microsoft.com/en-us/library/windows/desktop/bb147314.aspx
>>> */
>>> - unsigned gl_rasterization_rules:1;
>>> + unsigned lower_left_origin:1;
>>>
>>> /**
>>> * When true, rasterization is disabled and no pixels are written.
>>>
>>> Jose
>>
More information about the mesa-dev
mailing list