This is unfortunately sometimes necessary due to rebasing levels when
rendering into them.
16 piglits crash -> pass, when building mesa with debug enabled.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
- /* Immutable textures should not get this far -- they should have been
- * created in a validated state, and nothing can invalidate them.
+ /* On recent generations, immutable textures should not get this far
+ * -- they should have been created in a validated state, and nothing
+ * can invalidate them.
+ *
+ * Unfortunately, this is not true on pre-Sandybridge hardware -- when
+ * rendering into an immutable-format depth texture we may have to rebase
+ * the rendered levels to meet alignment requirements.
+ *
+ * FINISHME: Avoid doing this.
- assert(!tObj->Immutable);
+ assert(!tObj->Immutable || brw->gen < 6);
firstImage = intel_texture_image(tObj->Image[0][tObj->BaseLevel]);
firstImage = intel_texture_image(tObj->Image[0][tObj->BaseLevel]);