summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50/nv50_tex.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2009-06-04 16:13:56 +1000
committerBen Skeggs <bskeggs@redhat.com>2009-06-05 14:37:00 +1000
commit072fdc1fd325256d87b182d4f55c8a5838119cf0 (patch)
treeef37ba017f2b825c234bb706db7f245892c82b3c /src/gallium/drivers/nv50/nv50_tex.c
parent04cef8a03799aa88ebfa1c391e29f8d2ea020d95 (diff)
nouveau: pass nouveau_bo instead of pipe_buffer to so_ calls
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_tex.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_tex.c9
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;