Jason Ekstrand <ja...@jlekstrand.net> writes:

> Something else that came out of that conversation is that, for 2x
> MSAA, we may get bogus data in all but the bottom 4 bits.  In other
> words, just blindly checking for zero is probably a bad idea.  It'll
> work because the extension spec lets us return false negatives, but it
> isn't a good idea in general.  If we really want the implementation to
> be solid, we need to mask off all but the bottom n * log2(n) bits
> where n = number of samples.

I just noticed that this optimisation is actually suggested in the PRM.
I'll paste it here (sorry for the noise if everyone was already aware of
this):

IVB vol4 part 1, 2.7.1

“A simple optimization with probable large return in performance is to
 compare the MCS value to zero (indicating all samples are on sample
 slice 0), and sample only from sample slice 0 using ld2dss if MCS is
 zero. Sample slice 0 is the pixel color in this case. If MCS is not
 zero, each sample is then obtained using ld2dms messages and the
 results are averaged in the kernel after being returned. Refer to the
 multisample storage format in the GPU Overview volume for more
 details.”

This at least implies that this is an expected use case and maybe is a
good hint that it might do the right thing and clear the extra bits for
the 2x case? Of course it would be good to be more sure. I can't find
the more details that it's referring to. (Why don't the specs have
hyperlinks…?)

Regards,
- Neil
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to