diff options
author | Ben Skeggs <[email protected]> | 2009-08-31 13:00:34 +1000 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2009-08-31 13:39:38 +1000 |
commit | 02f32454487f2caba00931590254260d871ae795 (patch) | |
tree | 1ebc70aa5e099c7823f1358eccc2cd2fb2394ca6 /src/gallium/drivers/nv50/nv50_tex.c | |
parent | 500b2604947cfe99f38119d9e3860fcf5ba8d499 (diff) |
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.
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_tex.c')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_tex.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/nv50/nv50_tex.c b/src/gallium/drivers/nv50/nv50_tex.c index 14c68b96e14..033cb50c115 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; } |