[Mesa-dev] Second derivatives and ARB_derivative_control

Ilia Mirkin imirkin at alum.mit.edu
Tue Aug 12 12:34:54 PDT 2014


On Tue, Aug 12, 2014 at 3:08 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> Hello,
>
> I was looking at the ARB_derivative_control spec and it has this bit:
>
>     "It is typical to consider a 2x2 square of fragments or samples, and
>     compute independent dFdxFine per row and independent dFdyFine per column,
>     while computing only a single dFdxCoarse and a single dFdyCoarse for the
>     entire 2x2 square. Thus, all second-order coarse derivatives, e.g.,
>     dFdxCoarse(dFdxCoarse(x)), may be 0, even for non-linear arguments.
>     However, second-order fine derivatives, e.g., dFdxFine(dFdxFine(x))
>     will properly reflect the difference between the independent fine
>     derivatives computed within the 2x2 square."
>
> The first bit makes sense -- only one dFdxFine value is computed per
> row. However then they go on to second derivatives... that can't
> possibly work, right? dFdyFine(dFdxFine(x)) would work, since each row
> would have a different dFdxFine(x) value, but not
> dFdxFine(dFdxFine(x)). Is this a spec bug, or is one supposed to reach
> outside of the current 2x2 square?

Aha, noticed this at the bottom of the spec:

    2.  Define higher-order derivatives?  Currently we say they are undefined,
        but don't see why they can't say more (like coarse is 0, and fine might
        be something you'd expect).

           dFdxFine(dFdyFine(a))      should work
           dFdxCoarse(dFdyCoarse(a))  should work or be 0

        Generally, the descriptive part of the derivative section may need
        slight tweaking, based on the decisions made.

        Resolution:  Yes, be more specific about how higher-order derivitives
        behave.  See the changes to the descriptive part of section 8.13.1.

So I guess it's a typo earlier in the spec to say that
dFdxFine(dFdxFine(x)) should work.

  -ilia


More information about the mesa-dev mailing list