summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv40/nv40_fragtex.c
diff options
context:
space:
mode:
authorYounes Manton <younes.m@gmail.com>2008-12-01 23:48:29 -0500
committerYounes Manton <younes.m@gmail.com>2008-12-02 16:15:12 -0500
commit6b4776df35c46892d7701072b8c03cb1cf2d6f01 (patch)
tree019c35f691c5c1002ffd67f6f8e15bfec26665f3 /src/gallium/drivers/nv40/nv40_fragtex.c
parenta6b7c0bcbebb7532b6728500a868b7c985e3f822 (diff)
nouveau: Use swizzled textures & render targets on nv40 when possible.
Diffstat (limited to 'src/gallium/drivers/nv40/nv40_fragtex.c')
-rw-r--r--src/gallium/drivers/nv40/nv40_fragtex.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv40/nv40_fragtex.c b/src/gallium/drivers/nv40/nv40_fragtex.c
index 566d5a8d5b..0227d22620 100644
--- a/src/gallium/drivers/nv40/nv40_fragtex.c
+++ b/src/gallium/drivers/nv40/nv40_fragtex.c
@@ -66,7 +66,6 @@ nv40_fragtex_build(struct nv40_context *nv40, int unit)
struct nv40_texture_format *tf;
struct nouveau_stateobj *so;
uint32_t txf, txs, txp;
- int swizzled = 0; /*XXX: implement in region code? */
unsigned tex_flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RD;
tf = nv40_fragtex_format(pt->format);
@@ -98,7 +97,7 @@ nv40_fragtex_build(struct nv40_context *nv40, int unit)
return NULL;
}
- if (swizzled) {
+ if (!(pt->tex_usage & NOUVEAU_TEXTURE_USAGE_LINEAR)) {
txp = 0;
} else {
txp = nv40mt->level[0].pitch;