summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-06-29 15:59:24 +1000
committerBen Skeggs <skeggsb@gmail.com>2008-06-29 16:00:42 +1000
commitbf94027fdde51aed476e9bfdd4326aa9040440b0 (patch)
tree8e74d312e26f19ab34d05d977cf0bb3e2de2239d /src/gallium/drivers
parent70f0f0ebdfa40de0fe03ca94294d372b9fa4642d (diff)
nv50: fixes after rebase + commits note on the code that was just pushed.
OK, seems a lot of people have been getting the idea that nouveau is dying lately - I decided to commit some of the work I've been doing lately to prove them wrong :) Progress on my side is slow due to lack of time mainly, but I'm still around. Firstly, don't even bother trying to use gallium on G8x/G9x yet, it won't work. I've deliberately left all the necessary winsys changes out of the commits for a very good reason - I don't know what we're going to need from the DRM exactly yet and don't want to be continually breaking interfaces as I discover additional requirements. On my side, I think I've gone through about 3 different DRM interface changes, and have just discovered that I may need more yet. It'd be very annoying for everyone who uses nouveau to keep things in sync. Once I've got it sorted - I'll commit a lot of cool stuff. Stay tuned. Also, don't look at the shader code.. it's horribly nasty and full of hacks, I used it as an opportunity to learn G8x GPU programs at the same time. New semi-decent code is in works, and will follow at some point. :)
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv50/nv50_miptree.c2
-rw-r--r--src/gallium/drivers/nv50/nv50_program.c4
-rw-r--r--src/gallium/drivers/nv50/nv50_state.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c
index ec6e09aea0..f936a1f0e2 100644
--- a/src/gallium/drivers/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nv50/nv50_miptree.c
@@ -26,7 +26,7 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
break;
}
- pitch = ((pt->width[0] + 63) & ~63) * pt->cpp;
+ pitch = ((pt->width[0] + 63) & ~63) * pt->block.size;
mt->buffer = ws->buffer_create(ws, 256, usage, pitch * pt->height[0]);
if (!mt->buffer) {
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index bc45fe0bdf..cd6967b366 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -1240,7 +1240,7 @@ nv50_program_tx_prep(struct nv50_pc *pc)
unsigned last;
d = &p.FullToken.FullDeclaration;
- last = d->u.DeclarationRange.Last;
+ last = d->DeclarationRange.Last;
switch (d->Declaration.File) {
case TGSI_FILE_TEMPORARY:
@@ -1546,7 +1546,7 @@ nv50_program_validate_code(struct nv50_context *nv50, struct nv50_program *p)
}
if (!upload)
- return FALSE;
+ return;
up = ptr = MALLOC(p->exec_size * 4);
for (e = p->exec_head; e; e = e->next) {
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
index 665e3cc80d..743de089d6 100644
--- a/src/gallium/drivers/nv50/nv50_state.c
+++ b/src/gallium/drivers/nv50/nv50_state.c
@@ -121,9 +121,9 @@ nv50_set_sampler_texture(struct pipe_context *pipe, unsigned nr,
int i;
for (i = 0; i < nr; i++)
- pipe_texture_reference(&nv50->miptree[i], pt[i]);
+ pipe_texture_reference((void *)&nv50->miptree[i], pt[i]);
for (i = nr; i < nv50->miptree_nr; i++)
- pipe_texture_reference(&nv50->miptree[i], NULL);
+ pipe_texture_reference((void *)&nv50->miptree[i], NULL);
nv50->miptree_nr = nr;
nv50->dirty |= NV50_NEW_TEXTURE;