[Mesa-dev] [PATCH 11/16] intel: Support mapping multisample miptrees

Eric Anholt eric at anholt.net
Mon Aug 6 11:35:37 PDT 2012


Chad Versace <chad.versace at linux.intel.com> writes:

> Add two new functions: intel_miptree_{map,unmap}_multisample, to which
> intel_miptree_{map,unmap} dispatch. Only mapping flat, renderbuffer-like
> miptrees are supported.

>  void
> @@ -1513,5 +1606,8 @@ intel_miptree_unmap(struct intel_context *intel,
>  		    unsigned int level,
>  		    unsigned int slice)
>  {
> -   intel_miptree_unmap_singlesample(intel, mt, level, slice);
> +   if (mt->num_samples == 0)

Isn't mt->num_samples sometimes 1 for a singlesample mt now?

> +      intel_miptree_unmap_singlesample(intel, mt, level, slice);
> +   else
> +      intel_miptree_unmap_multisample(intel, mt, level, slice);
>  }

Other than that, downsamples get done in some cases where needs
needs_downsample was false, which is suboptimal.  But I think the code
is correct, and this is a fallback path so I don't care too much.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120806/45f6eec7/attachment-0001.pgp>


More information about the mesa-dev mailing list