From what I can see, the fog distance is computed per-vertex and
stored in the FogCoord vertex shader output. There is no fragment
shader change required. The fixed-function vertex program hasn't been
converted to the GLSL IR yet, only the fragment program, which is
irrelevant here.

Gallium only uses shaders, which means it always uses the generated
fixed-function programs (regardless of the IR being used), so
NV_fog_distance can always be enabled.

Marek

On Thu, Oct 27, 2011 at 3:18 PM, Jose Fonseca <jfons...@vmware.com> wrote:
> I only see implementation for ffvertex_prog.c
>
> Wasn't (or will soon be) the FF->Mesa IR replaced with FF->GLSL IR?  If so, 
> can you truly enable unconditionally on gallium/st?
>
> Jose
>
> ----- Original Message -----
>> If there are no other concerns, I'll push this on Saturday, including
>> the nv20 fix from Francisco Jerez.
>>
>> http://cgit.freedesktop.org/~mareko/mesa/log/?h=nv-fog-distance
>>
>> Marek
>>
>> On Tue, Sep 20, 2011 at 7:50 AM, Nicholas Miell <nmi...@gmail.com>
>> wrote:
>> > On 09/19/2011 10:23 AM, Ian Romanick wrote:
>> >>
>> >> I guess the big question is... why?  With vertex shaders, this
>> >> functionality is not terribly useful.  Over the past few weeks
>> >> we've
>> >> been *removing* code like this, so it seems kind of odd to add
>> >> some of
>> >> it.  If I'm not mistaken, the only hardware in Mesa that can do
>> >> this
>> >> but not vertex shaders is NV10.  Is it really that helpful?
>> >>
>> >> I'm not necessarily opposed to adding this, I just want to be sure
>> >> we're giving it full thought... that's all.
>> >>
>> >
>> > Good question. In the general case, I'd agree with you that
>> > implementing
>> > ancient extensions is a waste of effort, but this one is (AFAICT)
>> > an
>> > extremely low impact change that benefits a number of existing
>> > projects.
>> > It even has new code being written to target it, oddly enough
>> > (which is
>> > what prompted my interest in the first place).
>> >
>> > My first pass at this actually skipped the extension entirely and
>> > just
>> > changed the generated vertex program to always use the eye radial
>> > distance, but I figured that a full implementation of the extension
>> > would be the correct thing to do, especially when there may be some
>> > program out in the wild that breaks if the fog distance isn't
>> > abs(Ze).
>> > _______________________________________________
>> > mesa-dev mailing list
>> > mesa-dev@lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>> >
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to