[Mesa-dev] Clarifications w.r.t MSAA

Jerome Glisse j.glisse at gmail.com
Tue Jun 12 11:18:47 PDT 2012


On Tue, Jun 12, 2012 at 1:34 PM, Christoph Bumiller
<e0425955 at student.tuwien.ac.at> wrote:
> On 06/12/2012 06:52 PM, Jerome Glisse wrote:
>> On Tue, Jun 12, 2012 at 8:39 AM, Christoph Bumiller
>> <e0425955 at student.tuwien.ac.at> wrote:
>>> On 06/12/2012 02:25 PM, Olivier Galibert wrote:
>>>> On Tue, Jun 12, 2012 at 01:50:08PM +0200, Christoph Bumiller wrote:
>>>>>> First question: how many depths should be computed, and for which
>>>>>> coordinates? Which of these values is associated with which sample?
>>>>>
>>>>> One for each sample point. The depth buffer will be multisampled as well.
>>>>> Coverage sampling (CSAA) where you have extra coverage samples that do
>>>>> NOT (necessarily) correspond to color sample locations are not covered
>>>>> by the GL spec, it's vendor-specific.
>>>>
>>>> Ok.  So that means that if the shader writes z, you have to do full
>>>> supersampling then.
>>>>
>>>
>>> No, I don't think that's the case. You get per-sample depth values if
>>> you use fixed-pipe depth, but shader-computed depth should simply be
>>> replicated (to all samples covered by the shader invocation), like color
>>> outputs.
>>
>> I don't think thats how it wors, each sample will have its color and
>> depth value no matter if fixed pipeline or not. When resolving the
>
> Sorry, "fixed-pipe" was misleading, I meant the z-value from the
> rasterizer (which can be regarded as fixed functionality), not "without
> (custom) shaders".
>
> If the shader is only invoked once for each fragment (i.e.
> MinSampleShading == 1), all the samples that belong to that fragment
> will share the same color and depth values.
>

So i think we agree but according to spec  MinSampleShading=1 -> the
fragment shader is run once for each sample. MinSampleShading value is
a fraction of x/MIN_SAMPLE_SHADING_VALUE_ARB So if you have 8 sample
surface and you set MinSampleShading to 0.5 you will get the fragment
shader invoked for 4 sample. Note that according to spec
implementation might ignore the fraction and only cover the case
MinSampleShading==1

Cheers,
Jerome


More information about the mesa-dev mailing list