+ bool is_npot = (!util_is_power_of_two(pt->width0) || !util_is_power_of_two(pt->height0));
+ uint format, pitch;
+
+ /*
+ * This is a bit messy. i915 doesn't support NPOT with mipmaps, but we can
+ * still texture from a single level. This is useful to make u_blitter work.
+ */
+ if (is_npot) {
+ width = u_minify(width, first_level);
+ height = u_minify(height, first_level);
+ max_lod = 1;
+ }