txf = ps->fmt;
txf |= tf->format | 0x8000;
- txf |= ((pt->last_level - pt->first_level + 1) <<
- NV40TCL_TEX_FORMAT_MIPMAP_COUNT_SHIFT);
+ txf |= ((pt->last_level + 1) << NV40TCL_TEX_FORMAT_MIPMAP_COUNT_SHIFT);
if (1) /* XXX */
txf |= NV40TCL_TEX_FORMAT_NO_BORDER;
nr_faces = 1;
}
- for (l = pt->first_level; l <= pt->last_level; l++) {
+ for (l = 0; l <= pt->last_level; l++) {
pt->width[l] = width;
pt->height[l] = height;
pt->depth[l] = depth;
}
for (f = 0; f < nr_faces; f++) {
- for (l = pt->first_level; l <= pt->last_level; l++) {
+ for (l = 0; l <= pt->last_level; l++) {
nv40mt->level[l].image_offset[f] = offset;
offset += nv40mt->level[l].pitch * pt->height[l];
}
int l;
pipe_buffer_reference(ws, &nv40mt->buffer, NULL);
- for (l = mt->first_level; l <= mt->last_level; l++) {
+ for (l = 0; l <= mt->last_level; l++) {
if (nv40mt->level[l].image_offset)
free(nv40mt->level[l].image_offset);
}