[Mesa-dev] [PATCH 1/2] swr: [rasterizer core] allow an OpenGL driver to specify halfz clipping

Ilia Mirkin imirkin at alum.mit.edu
Wed Nov 9 16:39:16 UTC 2016


On Wed, Nov 9, 2016 at 11:32 AM, Rowley, Timothy O
<timothy.o.rowley at intel.com> wrote:
>
>> On Nov 9, 2016, at 10:16 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>>
>> On Wed, Nov 9, 2016 at 11:12 AM, Rowley, Timothy O
>> <timothy.o.rowley at intel.com> wrote:
>>> Yes, that was about to be my suggestion too - remove the drivertype use in the clipper and use the “clipHalfZ” flag instead.
>>>
>>> driverType is still used in the SwrSetViewports setup, so can’t be completely removed right now.
>>
>> Right. I was thinking of that as the "API" level, vs all the actual
>> rasterization/etc logic as the "core". Perhaps you have different
>> terminology.
>
> We talk about the Swr* functions in api.h/cpp as the API level, and below that the core.
>
>> Unsurprisingly, that last usage will also be about halfz, so if you
>> can update your DX frontend to just set that bit, we could get rid of
>> the driverType entirely. Not sure what your other users of swr are, so
>> perhaps that's not a reasonable request.
>
> I’ll talk to developers here about this last usage.  First thought is that we wouldn’t want SwrSetViewports dependent on rastState, but if the viewport setup was done lazily at SetupPipeline time then using the clip flag could work.

Of course if it's a limited quantity of frontends, that matrix setup
could just be moved out to the FE and dropped entirely from
SwrSetViewports. Right now the gallium frontend doesn't make use of it
either. (Again, conditional on what your other users are.)

  -ilia


More information about the mesa-dev mailing list