summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/intel_fbo.h
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-12-03 21:15:47 -0800
committerPaul Berry <[email protected]>2013-12-09 10:51:03 -0800
commitb5fe413b4d665cdb7a9be6ebae23a6c5f3ec393d (patch)
tree2554cb8832d42d78c91a41ec00454af6a9e8efdc /src/mesa/drivers/dri/i965/intel_fbo.h
parent3a2925bfa9537c202574eba0e2537b08939081ac (diff)
i965: Document conventions for counting layers in 2D multisample buffers.
The "layer" parameters used in blorp, and the intel_renderbuffer::mt_layer field, represent a physical layer rather than a logical layer. This is important for 2D multisample arrays on Gen7+ because the UMS and CMS multisample layouts use N physical layers to represent each logical layer, where N is the number of samples. Also add an assertion to blorp to help catch bugs if we fail to follow these conventions. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_fbo.h')
-rw-r--r--src/mesa/drivers/dri/i965/intel_fbo.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.h b/src/mesa/drivers/dri/i965/intel_fbo.h
index 02c357d0072..fb50f862aac 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.h
+++ b/src/mesa/drivers/dri/i965/intel_fbo.h
@@ -63,6 +63,11 @@ struct intel_renderbuffer
*
* For renderbuffers not created with glFramebufferTexture*(), mt_level and
* mt_layer are 0.
+ *
+ * Note: for a 2D multisample array texture on Gen7+ using
+ * INTEL_MSAA_LAYOUT_UMS or INTEL_MSAA_LAYOUT_CMS, mt_layer is the physical
+ * layer holding sample 0. So, for example, if mt->num_samples == 4, then
+ * logical layer n corresponds to mt_layer == 4*n.
*/
unsigned int mt_level;
unsigned int mt_layer;