diff options
author | Chad Versace <[email protected]> | 2011-11-15 10:05:21 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2011-11-22 10:35:42 -0800 |
commit | 24da7335b22432ef4c2d57cab86e4b8fbe8733d5 (patch) | |
tree | 53c78dc3c3a13131277f299dc678bf10f1322cee /src/mesa/drivers/dri/intel/intel_fbo.h | |
parent | d7b33309fe160212f2eb73f471f3aedcb5d0b5c1 (diff) |
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 <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_fbo.h')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_fbo.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h index 34d2f9a61cf..3a213745e38 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.h +++ b/src/mesa/drivers/dri/intel/intel_fbo.h @@ -52,6 +52,23 @@ struct intel_renderbuffer GLbitfield map_mode; /** + * \name Miptree view + * \{ + * + * Multiple renderbuffers may simultaneously wrap a single texture and each + * provide a different view into that texture. The fields below indicate + * which miptree slice is wrapped by this renderbuffer. The fields' values + * are consistent with the 'level' and 'layer' parameters of + * glFramebufferTextureLayer(). + * + * For renderbuffers not created with glFramebufferTexture*(), mt_level and + * mt_layer are 0. + */ + unsigned int mt_level; + unsigned int mt_layer; + /** \} */ + + /** * \name Packed depth/stencil unwrappers * * If the intel_context is using separate stencil and this renderbuffer has |