Merge branch '7.8'
[mesa.git] / src / gallium / drivers / nv50 / nv50_tex.c
index aa885e716880d4eec9a836689f63cfe8a6eee18d..85ab947c0063eae6afb15cf51f4246e0db618100 100644 (file)
@@ -105,7 +105,7 @@ nv50_tex_construct(struct nv50_sampler_view *view)
        struct nv50_miptree *mt = nv50_miptree(view->pipe.texture);
        uint32_t swz[4], *tic = view->tic;
 
-       tic[0] = nv50_texture_formats[mt->base.base.format];
+       tic[0] = nv50_texture_formats[view->pipe.format];
 
        swz[0] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_r);
        swz[1] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_g);
@@ -152,8 +152,7 @@ nv50_tex_construct(struct nv50_sampler_view *view)
 
        tic[6] = 0x03000000;
 
-       tic[7] = (view->pipe.last_level - view->pipe.first_level) << 4;
-       tic[7] |= view->pipe.first_level;
+       tic[7] = (view->pipe.last_level << 4) | view->pipe.first_level;
 
        return TRUE;
 }