brw_blorp_mip_info::set(struct intel_mipmap_tree *mt,
unsigned int level, unsigned int layer)
{
+ /* Layer is a physical layer, so if this is a 2D multisample array texture
+ * using INTEL_MSAA_LAYOUT_UMS or INTEL_MSAA_LAYOUT_CMS, then it had better
+ * be a multiple of num_samples.
+ */
+ if (mt->msaa_layout == INTEL_MSAA_LAYOUT_UMS ||
+ mt->msaa_layout == INTEL_MSAA_LAYOUT_CMS) {
+ assert(layer % mt->num_samples == 0);
+ }
+
intel_miptree_check_level_layer(mt, level, layer);
this->mt = mt;
/**
* The 2D layer within the miplevel. Combined, level and layer define the
* 2D miptree slice to use.
+ *
+ * Note: if mt is a 2D multisample array texture on Gen7+ using
+ * INTEL_MSAA_LAYOUT_UMS or INTEL_MSAA_LAYOUT_CMS, layer is the physical
+ * layer holding sample 0. So, for example, if mt->num_samples == 4, then
+ * logical layer n corresponds to layer == 4*n.
*/
uint32_t layer;
return mt;
}
+
+/**
+ * Note: if the src (or dst) is a 2D multisample array texture on Gen7+ using
+ * INTEL_MSAA_LAYOUT_UMS or INTEL_MSAA_LAYOUT_CMS, src_layer (dst_layer) is
+ * the physical layer holding sample 0. So, for example, if
+ * src_mt->num_samples == 4, then logical layer n corresponds to src_layer ==
+ * 4*n.
+ */
void
brw_blorp_blit_miptrees(struct brw_context *brw,
struct intel_mipmap_tree *src_mt,
*
* 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;