summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-06-28 14:38:54 -0700
committerJason Ekstrand <[email protected]>2016-08-17 14:46:22 -0700
commit6155d4ef569558076321f391386aa0cb2eab1ede (patch)
treedde1d78d06f74975480e8a7cc9e4eb50cd36e3de /src
parent3c75b315e13e88555cb7aed7549a4526a140ac7e (diff)
isl/state: Add an assertion for IVB multisample array textures
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/isl/isl_surface_state.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index fb23414b85f..990b7633d98 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -239,6 +239,19 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
switch (s.SurfaceType) {
case SURFTYPE_1D:
case SURFTYPE_2D:
+ /* From the Ivy Bridge PRM >> RENDER_SURFACE_STATE::MinimumArrayElement:
+ *
+ * "If Number of Multisamples is not MULTISAMPLECOUNT_1, this field
+ * must be set to zero if this surface is used with sampling engine
+ * messages."
+ *
+ * This restriction appears to exist only on Ivy Bridge.
+ */
+ if (GEN_GEN == 7 && !GEN_IS_HASWELL && !ISL_DEV_IS_BAYTRAIL(dev) &&
+ (info->view->usage & ISL_SURF_USAGE_TEXTURE_BIT) &&
+ info->surf->samples > 1)
+ assert(info->view->base_array_layer == 0);
+
s.MinimumArrayElement = info->view->base_array_layer;
/* From the Broadwell PRM >> RENDER_SURFACE_STATE::Depth: