intel: Track the miptree layer wrapped by a renderbuffer [v2]
authorChad Versace <chad.versace@linux.intel.com>
Tue, 15 Nov 2011 18:05:21 +0000 (10:05 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Tue, 22 Nov 2011 18:35:42 +0000 (10:35 -0800)
commit24da7335b22432ef4c2d57cab86e4b8fbe8733d5
tree53c78dc3c3a13131277f299dc678bf10f1322cee
parentd7b33309fe160212f2eb73f471f3aedcb5d0b5c1
intel: Track the miptree layer wrapped by a renderbuffer [v2]

TODO: Make v2 for kwg.

Add two fields to intel_renderbuffer:
    mt_level
    mt_layer

Multiple renderbuffers may simultaneously wrap a single texture and each
provide a different view into that texture. [Consider
glFramebufferTextureLayer()].  The new fields indicate which slice of the
miptree is wrapped by the renderbuffer.

The buffer resolve operations, to be introduced in the future, require
these fields in order to resolve the correct slice in the miptree.

To add the fields, it was necessary to replace the type of some function
parameters from gl_texture_image to gl_renderbuffer_attachment.

v2: [kwg] Replace confusing condition `CubeMapFace > 0` with the more
    sensible `Target == GL_TEXTURE_CUBE_MAP`.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/intel/intel_fbo.c
src/mesa/drivers/dri/intel/intel_fbo.h