summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv40
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-04-04 12:39:45 +1000
committerBen Skeggs <[email protected]>2008-04-04 12:55:57 +1000
commitfbb6cc7842ec8a59b60018233275babc4deb6765 (patch)
tree99ca4056f59f2e8b4366dd47650edb0fb17e5979 /src/gallium/drivers/nv40
parent0b57662fa6feb3d4571e4a3bc3a2243547595816 (diff)
nouveau: in some cases don't create the buffer in local mem initially.
Diffstat (limited to 'src/gallium/drivers/nv40')
-rw-r--r--src/gallium/drivers/nv40/nv40_miptree.c4
-rw-r--r--src/gallium/drivers/nv40/nv40_screen.c8
2 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv40/nv40_miptree.c b/src/gallium/drivers/nv40/nv40_miptree.c
index 502edc16298..1b192172232 100644
--- a/src/gallium/drivers/nv40/nv40_miptree.c
+++ b/src/gallium/drivers/nv40/nv40_miptree.c
@@ -68,7 +68,9 @@ nv40_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
nv40_miptree_layout(mt);
- mt->buffer = ws->buffer_create(ws, 256, PIPE_BUFFER_USAGE_PIXEL,
+ mt->buffer = ws->buffer_create(ws, 256,
+ PIPE_BUFFER_USAGE_PIXEL |
+ NOUVEAU_BUFFER_USAGE_TEXTURE,
mt->total_size);
if (!mt->buffer) {
FREE(mt);
diff --git a/src/gallium/drivers/nv40/nv40_screen.c b/src/gallium/drivers/nv40/nv40_screen.c
index e98005f749f..a408d7262f3 100644
--- a/src/gallium/drivers/nv40/nv40_screen.c
+++ b/src/gallium/drivers/nv40/nv40_screen.c
@@ -27,6 +27,8 @@ nv40_screen_get_vendor(struct pipe_screen *pscreen)
static int
nv40_screen_get_param(struct pipe_screen *pscreen, int param)
{
+ struct nv40_screen *screen = nv40_screen(pscreen);
+
switch (param) {
case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
return 16;
@@ -54,6 +56,12 @@ nv40_screen_get_param(struct pipe_screen *pscreen, int param)
return 10;
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
return 13;
+ case NOUVEAU_CAP_HW_VTXBUF:
+ return 1;
+ case NOUVEAU_CAP_HW_IDXBUF:
+ if (screen->curie->grclass == NV40TCL)
+ return 1;
+ return 0;
default:
NOUVEAU_ERR("Unknown PIPE_CAP %d\n", param);
return 0;