Open chrisforbes opened 10 years ago
Note on CMS harm: we want full coverage to translate to a single live sample value in slot 0, plus MCS bits for all samples are in slot 0
.
If we masked off two samples, then the hw has to keep whatever junk was there, so MCS bits are split even for fully covered pixels. This means we can't do the all-samples-in-slot0 optimization in the resolve.
There are a few other wrinkles:
We can do a 2x MSAA mode via some hackery:
sample
message since it does a resolve correctly for 4x. This will need to be changed to 2ld
[assuming we are masking]. Gen7 does custom resolve shaders withld_mcs
+ld2dms
anyway, so no real change other than having to make sure we use the logical sample count, not the physical count.IMS perf impact depends a lot on cache behavior. If we avoid pulling in half the cache lines, we probably win big. Hardware prefetching might break us though.
UMS perf impact should be a clear win (layers 2/3 are never touched). CMS impact should be more of a win as triangle sizes get smaller.