isl: assert that Gen8+ don't have bit6_swizzling
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 31 Jan 2019 21:18:19 +0000 (13:18 -0800)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 5 Feb 2019 04:44:41 +0000 (20:44 -0800)
v2: Rewrite the condition to more clearly match the comment. (Jordan)

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/isl/isl.c

index 7bb0fce3b60682b53659b02970335b9d2d2e49c0..eaaa28014a39c1312518c4f83107aeb1931bd8b4 100644 (file)
@@ -99,6 +99,9 @@ isl_device_init(struct isl_device *dev,
                 const struct gen_device_info *info,
                 bool has_bit6_swizzling)
 {
+   /* Gen8+ don't have bit6 swizzling, ensure callsite is not confused. */
+   assert(!(has_bit6_swizzling && info->gen >= 8));
+
    dev->info = info;
    dev->use_separate_stencil = ISL_DEV_GEN(dev) >= 6;
    dev->has_bit6_swizzling = has_bit6_swizzling;