diff options
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 775e9f30ef..86947faee3 100644 --- a/src/gallium/drivers/nv50/nv50_tex.c +++ b/src/gallium/drivers/nv50/nv50_tex.c @@ -26,8 +26,11 @@ #include "nouveau/nouveau_stateobj.h" static int -nv50_tex_construct(struct nouveau_stateobj *so, struct nv50_miptree *mt) +nv50_tex_construct(struct nv50_context *nv50, struct nouveau_stateobj *so, + struct nv50_miptree *mt) { + struct nouveau_bo *bo = nouveau_bo(mt->buffer); + switch (mt->base.format) { case PIPE_FORMAT_A8R8G8B8_UNORM: so_data(so, NV50TIC_0_0_MAPA_C3 | NV50TIC_0_0_TYPEA_UNORM | @@ -117,7 +120,7 @@ nv50_tex_construct(struct nouveau_stateobj *so, struct nv50_miptree *mt) return 1; } - so_reloc(so, mt->buffer, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_LOW | + so_reloc(so, bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_LOW | NOUVEAU_BO_RD, 0, 0); so_data (so, 0xd0005000); so_data (so, 0x00300000); @@ -144,7 +147,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(so, mt)) { + if (nv50_tex_construct(nv50, so, mt)) { NOUVEAU_ERR("failed tex validate\n"); so_ref(NULL, &so); return; |