diff options
author | Ben Skeggs <[email protected]> | 2009-06-06 10:57:19 +1000 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2009-06-06 16:24:08 +1000 |
commit | 6c1627a51c237428a79613fcda1412c4660780de (patch) | |
tree | 7e74d2b09d5f1943930129985c8998c535fe2f15 /src/gallium/drivers/nv50/nv50_tex.c | |
parent | b7aa5b1d10cbe2fd0b796538426f1f2910a4832c (diff) |
nv50: support non-normalized texture coords
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_tex.c')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_tex.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv50/nv50_tex.c b/src/gallium/drivers/nv50/nv50_tex.c index 8bb81392fd0..8f553f53464 100644 --- a/src/gallium/drivers/nv50/nv50_tex.c +++ b/src/gallium/drivers/nv50/nv50_tex.c @@ -27,7 +27,7 @@ static int nv50_tex_construct(struct nv50_context *nv50, struct nouveau_stateobj *so, - struct nv50_miptree *mt) + struct nv50_miptree *mt, int unit) { switch (mt->base.format) { case PIPE_FORMAT_A8R8G8B8_UNORM: @@ -120,7 +120,10 @@ nv50_tex_construct(struct nv50_context *nv50, struct nouveau_stateobj *so, so_reloc(so, mt->bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_LOW | NOUVEAU_BO_RD, 0, 0); - so_data (so, 0xd0005000 | mt->bo->tile_mode << 22); + if (nv50->sampler[unit]->normalized) + so_data (so, 0xd0005000 | mt->bo->tile_mode << 22); + else + so_data (so, 0x5001d000 | mt->bo->tile_mode << 22); so_data (so, 0x00300000); so_data (so, mt->base.width[0]); so_data (so, (mt->base.last_level << 28) | @@ -145,7 +148,7 @@ nv50_tex_validate(struct nv50_context *nv50) for (unit = 0; unit < nv50->miptree_nr; unit++) { struct nv50_miptree *mt = nv50->miptree[unit]; - if (nv50_tex_construct(nv50, so, mt)) { + if (nv50_tex_construct(nv50, so, mt, unit)) { NOUVEAU_ERR("failed tex validate\n"); so_ref(NULL, &so); return; |