intel: Allocate miptree for multisample DRI2 buffers
authorChad Versace <chad.versace@linux.intel.com>
Thu, 19 Jul 2012 16:45:14 +0000 (09:45 -0700)
committerChad Versace <chad.versace@linux.intel.com>
Tue, 7 Aug 2012 16:30:33 +0000 (09:30 -0700)
commitf4873babdc27f697df9f4642209eca21a02ac476
tree48051714159e9d213b74a2e4254ac61e9e3e556c
parent4eba67285fb6b5d2dd4927e8dc4b3e2945435309
intel: Allocate miptree for multisample DRI2 buffers

Immediately after obtaining, with DRI2GetBuffersWithFormat, the DRM buffer
handle for a DRI2 buffer, we wrap that DRM buffer handle with a region and
a miptree. This patch additionally allocates an accompanying multisample
miptree if the DRI2 buffer is multisampled.

Since we do not yet advertise multisample GL configs, the code for
allocating the multisample miptree is currently inactive.

This patch adds the following fields to intel_mipmap_tree:
    singlesample_mt
    needs_downsample
and the following function stubs:
    intel_miptree_downsample
    intel_miptree_upsample

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/intel/intel_context.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.h