diff options
author | Roland Scheidegger <[email protected]> | 2013-03-09 01:46:33 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2013-03-12 00:24:22 +0100 |
commit | 5c41d1c22282fe2fd72a77339246de8e861b4b22 (patch) | |
tree | 426989fa6fa76bcfd859a6e826ed15d4314a2a91 /docs/GL3.txt | |
parent | b7262ac7ea650c4416af28097c66fc64f72e3c28 (diff) |
gallivm: clean up passing derivatives around
Previously, the derivatives were calculated and passed in a packed form
to the sample code (for implicit derivatives, explicit derivatives were
packed to the same format).
There's several reasons why this wasn't such a good idea:
1) the derivatives may not even be needed (not as bad as it sounds since
llvm will just throw the calculations needed for them away but still)
2) the special packing format really shouldn't be part of the sampler
interface
3) depending what the sample code actually does the derivatives will
be processed differently, hence there is no "ideal" packing. For cube
maps with explicit derivatives (which we don't do yet) for instance the
packing looked downright useless, and for non-isotropic filtering we'd
need different calculations too.
So, instead just pass the derivatives as is (for explicit derivatives),
or let the rho calculating sample code calculate them itself. This still
does exactly the same packing stuff for implicit derivatives for now,
though explicit ones are handled in a more straightforward manner (quick
estimates show performance should be quite similar, though it is much
easier to follow and also does the rho calculation per-pixel until the
end, which we eventually need for spec compliance anyway).
No piglit changes.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'docs/GL3.txt')
0 files changed, 0 insertions, 0 deletions