[Mesa-dev] [PATCH v2 1/4] mesa: introduce MS variants of line width min/max/granularity
Ilia Mirkin
imirkin at alum.mit.edu
Tue Sep 13 02:32:35 UTC 2016
On Mon, Sep 12, 2016 at 8:55 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On Tuesday, September 6, 2016 11:49:59 PM PDT Ilia Mirkin wrote:
>> These are exposed in ES 3.2. However this moves all st/mesa to clamping
>> on the MS variants. But for now the MS variants are initialized to the
>> AA values.
>>
>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>
> So...
>
> - Virtually all implementations have the same line widths and granularity
> regardless of multisampling or antialiasing settings.
>
> - Imagination is a counter example, and has different ranges/granularity
> for normal (aliased) and smooth/multisampled lines:
>
> https://cvs.khronos.org/bugzilla/show_bug.cgi?id=13828#c2
>
> Hence, the need for two separate ranges. This would be useful for
> a theoretical Imagination driver, although none exists today.
>
> - I believe that AA = MS in all cases. But GLES doesn't have the
> concept of "smooth lines", so they gave the queries a different name.
>
> - The only Mesa driver that sets these differently today is ILO..all
> other drivers set MaxLineWidth and MaxLineWidthAA identically. (I have
> no idea why ILO does this. We could probably drop the distinction.)
FWIW I have no idea what the "correct" values are for NVIDIA hw. I
wouldn't be surprised if it were semi-common for actual hw to want to
set these differently (i.e. AA vs non-AA).
>
> Maybe it would make sense to drop the distinction and just have one
> field for both kinds of queries. If we don't want to go that route,
> then I think I'd rather see only two sets of fields:
>
> - MaxPointWidth
> - MaxPointWidthMS (or AA, either name)
> - LineWidthGranularity
> - LineWidthGranularityMS (or AA, either name)
>
> The MS/AA versions should be used if either MSAA is enabled or
> SmoothFlag is enabled.
>
> Does that seem reasonable?
Fine by me. Happy to drop the bit about the additional variables and
always return the same value for both queries.
The reason I added new values was largely the note in the ES 3.2 spec
which mentions about it being distinct from the AA query, and the
ARB_ES3_2_compatbility spec which adds a separate query and updates
the wording regarding MS rasterization to be about the different
limits.
However I'm perfectly happy to leave this distinction out for now and
let hardware which happens to need these to be different have to split
them out.
I probably won't get to it tonight, but maybe tomorrow night.
Cheers,
-ilia
More information about the mesa-dev
mailing list