[Mesa-dev] RFC: ARB_sample_shading in gallium

Roland Scheidegger sroland at vmware.com
Fri Mar 28 14:47:11 PDT 2014


Am 28.03.2014 22:18, schrieb Ilia Mirkin:
> Hey guys,
> 
> I was thinking of taking a shot at implementing ARB_sample_shading for
> nv50 (well, nva3-nva8) this weekend. One of the issues is that it's
> not implemented in gallium at all right now, so I need to pipe it
> through somehow. I believe that the only piece of data that needs to
> be piped through is the value returned by
> _mesa_get_min_invocations_per_fragment, which is a function of the fp,
> the drawbuffer, and the MS state. When that value is > 1, sample
> shading is effectively enabled. (I guess even when it's == 1, things
> like gl_SampleID still need to work, perhaps it's worth adding a
> separate enabled bit too.)
> 
> Should this single integer get its own set_* callback, similar to
> set_sample_mask, or should it be included somewhere, e.g.
> pipe_framebuffer_state? Or even added to the set_sample_mask call?
> 

Would something like in d3d10.1 work where you simply say that inputs
are interpolated at sample frequency? That way you can also have some
inputs which are not interpolated at sample frequency (I thought there's
opengl functionality for this too somewhere - even if not I'd really
like to have that functionality in gallium). It would just need new
interpolation mode enums.
Though I guess this does not fully cover ARB_sample_shading - this
extension allows you for instance to have msaa 4x, but run fs at 2x (I
could be wrong but I don't think you can do that in d3d, I don't know if
hw can do it presumably some can otherwise it wouldn't be in the
extension, though it is definitely worded in a way that makes it
possible to just run at full sample frequency).

Roland


More information about the mesa-dev mailing list