diff options
author | Roland Scheidegger <[email protected]> | 2013-08-15 18:40:32 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2013-08-15 18:42:20 +0200 |
commit | 5626a84a002cb8565b527ebc1fca73a8497019db (patch) | |
tree | 545b22ad32851b633dd48ae3920a6f31afa966d9 /src/gallium/docs | |
parent | 3b2f3f90ace68e0a4777661f8cbf07438855edcb (diff) |
gallivm: do per-sample depth comparison instead of doing it post-filter
Doing the comparisons pre-filter is highly recommended by OpenGL (and d3d9)
and definitely required by d3d10.
This actually doesn't do it pre-filter but more "in-filter" as otherwise
need to push the comparisons even further down into fetch code and this
also trivially allows using a somewhat cheaper lerp.
Doing it pre-filter would actually have some performance advantage for UNORM
formats (because the comparisons should be done in texture format, we'd only
need to convert the shadow ref coord to texture format once, but in turn would
save converting the per-sample texture values to floats) but this gets a bit
messy as this has implications for border color handling as well (which needs
to be done prior to depth comparisons, hence would also need to convert border
color to texture format too or use some other tricks like doing separate border
color / shadow ref comparison and simply using that result directly when doing
border replacement).
Should make no difference for nearest filtering, and performance for linear
filtering should be mostly the same too (essentially have one more comparison
instruction per sample, and replace the sub/mul/add lerp with a sub/and/and/add
special "lerp" which all in all shouldn't be much of a difference).
v2: get rid of old code completely
Reviewed-by: Zack Rusin <[email protected]>
Diffstat (limited to 'src/gallium/docs')
0 files changed, 0 insertions, 0 deletions