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);
* 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;
return NULL;
pscreen = &screen->base.base;
+ screen->base.sysmem_bindings = PIPE_BIND_CONSTANT_BUFFER;
+
ret = nouveau_screen_init(&screen->base, dev);
if (ret)
FAIL_SCREEN_INIT("nouveau_screen_init failed: %d\n", ret);
nv50_screen_init_resource_functions(pscreen);
- screen->base.vertex_buffer_flags = screen->base.index_buffer_flags =
- NOUVEAU_BO_GART;
-
ret = nouveau_bo_new(dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0, 4096,
&screen->fence.bo);
if (ret)
return NULL;
pscreen = &screen->base.base;
+ screen->base.sysmem_bindings = PIPE_BIND_CONSTANT_BUFFER;
+
ret = nouveau_screen_init(&screen->base, dev);
if (ret) {
nvc0_screen_destroy(pscreen);
nvc0_screen_init_resource_functions(pscreen);
- screen->base.vertex_buffer_flags = NOUVEAU_BO_GART;
- screen->base.index_buffer_flags = 0;
-
ret = nouveau_bo_new(dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0, 4096,
&screen->fence.bo);
if (ret)