summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/pipe/nouveau/nouveau_gldefs.h2
-rw-r--r--src/mesa/pipe/nv40/nv40_context.c2
-rw-r--r--src/mesa/pipe/nv40/nv40_fragprog.c1
-rw-r--r--src/mesa/pipe/nv40/nv40_fragtex.c1
-rw-r--r--src/mesa/pipe/nv40/nv40_miptree.c35
-rw-r--r--src/mesa/pipe/nv50/nv50_miptree.c5
6 files changed, 25 insertions, 21 deletions
diff --git a/src/mesa/pipe/nouveau/nouveau_gldefs.h b/src/mesa/pipe/nouveau/nouveau_gldefs.h
index 8ba3bdef64..e1015c93a2 100644
--- a/src/mesa/pipe/nouveau/nouveau_gldefs.h
+++ b/src/mesa/pipe/nouveau/nouveau_gldefs.h
@@ -189,7 +189,7 @@ nvgl_primitive(unsigned prim) {
case PIPE_PRIM_POLYGON:
return 0x000a;
default:
- assert(0);
+ return 0x0001;
}
}
diff --git a/src/mesa/pipe/nv40/nv40_context.c b/src/mesa/pipe/nv40/nv40_context.c
index 1351a79fe0..49c67a8fd5 100644
--- a/src/mesa/pipe/nv40/nv40_context.c
+++ b/src/mesa/pipe/nv40/nv40_context.c
@@ -71,6 +71,8 @@ nv40_get_paramf(struct pipe_context *pipe, int param)
return 16.0;
case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
return 4.0;
+ case PIPE_CAP_BITMAP_TEXCOORD_BIAS:
+ return 0.0;
default:
NOUVEAU_ERR("Unknown PIPE_CAP %d\n", param);
return 0.0;
diff --git a/src/mesa/pipe/nv40/nv40_fragprog.c b/src/mesa/pipe/nv40/nv40_fragprog.c
index e650c97541..1165661010 100644
--- a/src/mesa/pipe/nv40/nv40_fragprog.c
+++ b/src/mesa/pipe/nv40/nv40_fragprog.c
@@ -826,6 +826,7 @@ nv40_fragprog_bind(struct nv40_context *nv40, struct nv40_fragment_program *fp)
so_emit(nv40->nvws, so);
so_ref(so, &fp->so);
+ so_ref(NULL, &so);
nv40->fragprog.active = fp;
}
diff --git a/src/mesa/pipe/nv40/nv40_fragtex.c b/src/mesa/pipe/nv40/nv40_fragtex.c
index 283d49704a..c87e361831 100644
--- a/src/mesa/pipe/nv40/nv40_fragtex.c
+++ b/src/mesa/pipe/nv40/nv40_fragtex.c
@@ -121,6 +121,7 @@ nv40_fragtex_build(struct nv40_context *nv40, int unit)
so_emit(nv40->nvws, so);
so_ref (so, &nv40->so_fragtex[unit]);
+ so_ref (NULL, &so);
}
void
diff --git a/src/mesa/pipe/nv40/nv40_miptree.c b/src/mesa/pipe/nv40/nv40_miptree.c
index 48062d1ae8..df70feaa05 100644
--- a/src/mesa/pipe/nv40/nv40_miptree.c
+++ b/src/mesa/pipe/nv40/nv40_miptree.c
@@ -53,27 +53,26 @@ nv40_miptree_layout(struct nv40_miptree *nv40mt)
nv40mt->total_size = offset;
}
-static void
-nv40_miptree_create(struct pipe_context *pipe, struct pipe_texture **pt)
+static struct pipe_texture *
+nv40_miptree_create(struct pipe_context *pipe, const struct pipe_texture *pt)
{
struct pipe_winsys *ws = pipe->winsys;
- struct nv40_miptree *nv40mt;
-
- nv40mt = realloc(*pt, sizeof(struct nv40_miptree));
- if (!nv40mt)
- return;
- *pt = NULL;
-
- nv40_miptree_layout(nv40mt);
-
- nv40mt->buffer = ws->buffer_create(ws, 256, PIPE_BUFFER_USAGE_PIXEL,
- nv40mt->total_size);
- if (!nv40mt->buffer) {
- free(nv40mt);
- return;
+ struct nv40_miptree *mt;
+
+ mt = malloc(sizeof(struct nv40_miptree));
+ if (!mt)
+ return NULL;
+ mt->base = *pt;
+ nv40_miptree_layout(mt);
+
+ mt->buffer = ws->buffer_create(ws, 256, PIPE_BUFFER_USAGE_PIXEL,
+ mt->total_size);
+ if (!mt->buffer) {
+ free(mt);
+ return NULL;
}
-
- *pt = &nv40mt->base;
+
+ return &mt->base;
}
static void
diff --git a/src/mesa/pipe/nv50/nv50_miptree.c b/src/mesa/pipe/nv50/nv50_miptree.c
index 51442d64f3..0c034ed438 100644
--- a/src/mesa/pipe/nv50/nv50_miptree.c
+++ b/src/mesa/pipe/nv50/nv50_miptree.c
@@ -4,10 +4,11 @@
#include "nv50_context.h"
-static void
-nv50_miptree_create(struct pipe_context *pipe, struct pipe_texture **pt)
+static struct pipe_texture *
+nv50_miptree_create(struct pipe_context *pipe, const struct pipe_texture *pt)
{
NOUVEAU_ERR("unimplemented\n");
+ return NULL;
}
static void