summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-03-03 15:56:20 +1000
committerBen Skeggs <bskeggs@redhat.com>2011-03-03 15:56:20 +1000
commit6b4e3e8941f41b6d15ac557e3d47bf4f1aa8b185 (patch)
treeec6c1f970fe350e34d4bd2ed176aa668fce769e8 /src/gallium/drivers/nouveau
parent0c0e996d59380af2d247336e3e9cfae58a80791a (diff)
nouveau: allow pipe driver to define which buffers should start in sysmem
PIPE_BIND_CONSTANT_BUFFER alone was OK for nv50/nvc0, but nv30 will need to be able to set others on certain chipsets. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_buffer.c2
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.c b/src/gallium/drivers/nouveau/nouveau_buffer.c
index 571fa0c608..d0cc29104b 100644
--- a/src/gallium/drivers/nouveau/nouveau_buffer.c
+++ b/src/gallium/drivers/nouveau/nouveau_buffer.c
@@ -340,7 +340,7 @@ nouveau_buffer_create(struct pipe_screen *pscreen,
pipe_reference_init(&buffer->base.reference, 1);
buffer->base.screen = pscreen;
- if (buffer->base.bind & PIPE_BIND_CONSTANT_BUFFER)
+ if ((buffer->base.bind & screen->sysmem_bindings) == screen->sysmem_bindings)
ret = nouveau_buffer_allocate(screen, buffer, 0);
else
ret = nouveau_buffer_allocate(screen, buffer, NOUVEAU_BO_GART);
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.h b/src/gallium/drivers/nouveau/nouveau_screen.h
index 580b4da6b4..c091abf278 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.h
+++ b/src/gallium/drivers/nouveau/nouveau_screen.h
@@ -16,6 +16,7 @@ struct nouveau_screen {
* these almost always should be set to the same value */
unsigned vertex_buffer_flags;
unsigned index_buffer_flags;
+ unsigned sysmem_bindings;
struct {
struct nouveau_fence *head;