summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-06-27 08:43:27 -0700
committerJason Ekstrand <[email protected]>2016-08-17 14:46:22 -0700
commited432fd681fce210a74e2de03442a801c37676d3 (patch)
tree0b6afa49e85e4f22a28dfa45b536e9ba2f7be3e3
parent96fa98c18e54a31622a0dea5516f7db7642ca866 (diff)
isl: Add asserts for gen8+ X/YOffset rules
Reviewed-by: Topi Pohjolainen <[email protected]>
-rw-r--r--src/intel/isl/isl_surface_state.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index 6febcbf2b72..fb23414b85f 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -414,6 +414,16 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
assert(info->surf->levels == 1);
assert(info->surf->logical_level0_px.array_len == 1);
assert(info->aux_usage == ISL_AUX_USAGE_NONE);
+
+ if (GEN_GEN >= 8) {
+ /* Broadwell added more rules. */
+ assert(info->surf->samples == 1);
+ if (isl_format_get_layout(info->view->format)->bpb == 8)
+ assert(info->x_offset_sa % 16 == 0);
+ if (isl_format_get_layout(info->view->format)->bpb == 16)
+ assert(info->x_offset_sa % 8 == 0);
+ }
+
#if GEN_GEN >= 7
s.SurfaceArray = false;
#endif