gallium: Redefine the max texture 2d cap from _LEVELS to _SIZE.
[mesa.git] / src / gallium / drivers / i915 / i915_state_sampler.c
index 84ed1514630dcb3e3b0087931c4a36142e99ccc1..66a5778717a80e954f160a22822dc4c3290ad37f 100644 (file)
@@ -307,7 +307,8 @@ static void update_map(struct i915_context *i915,
    int first_level = view->u.tex.first_level;
    const uint num_levels = pt->last_level - first_level;
    unsigned max_lod = num_levels * 4;
-   bool is_npot = (!util_is_power_of_two(pt->width0) || !util_is_power_of_two(pt->height0)); 
+   bool is_npot = (!util_is_power_of_two_or_zero(pt->width0) ||
+                   !util_is_power_of_two_or_zero(pt->height0));
    uint format, pitch;
 
    /*