[Mesa-dev] [PATCH 3/8] radeonsi: implement set_min_samples

Marek Olšák maraeo at gmail.com
Wed May 7 07:41:59 PDT 2014


Yeah, the sample positions in the fragment shader are always set
correctly even if there is no multisample buffer. It's implemented in
the patch which adds support for SAMPLEPOS.

Marek

On Wed, May 7, 2014 at 4:12 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Wed, May 7, 2014 at 10:00 AM, Marek Olšák <maraeo at gmail.com> wrote:
>> +static void si_set_min_samples(struct pipe_context *ctx, unsigned min_samples)
>> +{
>> +       struct si_context *sctx = (struct si_context *)ctx;
>> +
>> +       if (sctx->ps_iter_samples == min_samples)
>> +               return;
>> +
>> +       sctx->ps_iter_samples = min_samples;
>> +
>> +       if (sctx->framebuffer.nr_samples > 1)
>> +               sctx->msaa_config.dirty = true;
>>  }
>
> I don't know your HW, but keep in mind that there's nothing preventing
> one from using gl_SamplePosition/etc without a MS framebuffer. With
> the piglit tests, that's passing '1' or '0' as the arguments for the
> number of samples.
>
>   -ilia


More information about the mesa-dev mailing list