From 02f32454487f2caba00931590254260d871ae795 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Mon, 31 Aug 2009 13:00:34 +1000 Subject: nouveau: introduce nouveau_miptree common to all nouveau pipe drivers The winsys once again has to know about textures it seems, so we need a common representation between all our pipe drivers to store some information the winsys will need. Only the nv50 driver has been fixed so far. --- src/gallium/drivers/nv50/nv50_tex.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gallium/drivers/nv50/nv50_tex.c') diff --git a/src/gallium/drivers/nv50/nv50_tex.c b/src/gallium/drivers/nv50/nv50_tex.c index 14c68b96e1..033cb50c11 100644 --- a/src/gallium/drivers/nv50/nv50_tex.c +++ b/src/gallium/drivers/nv50/nv50_tex.c @@ -29,7 +29,7 @@ static int nv50_tex_construct(struct nv50_context *nv50, struct nouveau_stateobj *so, struct nv50_miptree *mt, int unit) { - switch (mt->base.format) { + switch (mt->base.base.format) { case PIPE_FORMAT_A8R8G8B8_UNORM: so_data(so, NV50TIC_0_0_MAPA_C3 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPR_C2 | NV50TIC_0_0_TYPER_UNORM | @@ -118,18 +118,18 @@ nv50_tex_construct(struct nv50_context *nv50, struct nouveau_stateobj *so, return 1; } - so_reloc(so, mt->bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_LOW | + so_reloc(so, mt->base.bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_LOW | NOUVEAU_BO_RD, 0, 0); if (nv50->sampler[unit]->normalized) - so_data (so, 0xd0005000 | mt->bo->tile_mode << 22); + so_data (so, 0xd0005000 | mt->base.bo->tile_mode << 22); else - so_data (so, 0x5001d000 | mt->bo->tile_mode << 22); + so_data (so, 0x5001d000 | mt->base.bo->tile_mode << 22); so_data (so, 0x00300000); - so_data (so, mt->base.width[0]); - so_data (so, (mt->base.last_level << 28) | - (mt->base.depth[0] << 16) | mt->base.height[0]); + so_data (so, mt->base.base.width[0]); + so_data (so, (mt->base.base.last_level << 28) | + (mt->base.base.depth[0] << 16) | mt->base.base.height[0]); so_data (so, 0x03000000); - so_data (so, mt->base.last_level << 4); + so_data (so, mt->base.base.last_level << 4); return 0; } -- cgit v1.2.3