diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2009-02-04 14:55:13 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2009-02-04 19:41:12 +1000 |
commit | c10fb9579027ae34eda0c52acb353e8da5832495 (patch) | |
tree | 9f858afc7eed2b1da4eafa7040d1def9a118b201 /src/gallium/winsys/drm/nouveau/common/nouveau_context.c | |
parent | a47965588fdaa75166c48d50974b38fcbfd2a749 (diff) |
nouveau: link against libdrm_nouveau (installed with libdrm)
Diffstat (limited to 'src/gallium/winsys/drm/nouveau/common/nouveau_context.c')
-rw-r--r-- | src/gallium/winsys/drm/nouveau/common/nouveau_context.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/gallium/winsys/drm/nouveau/common/nouveau_context.c b/src/gallium/winsys/drm/nouveau/common/nouveau_context.c index e093877381..de4a90e25f 100644 --- a/src/gallium/winsys/drm/nouveau/common/nouveau_context.c +++ b/src/gallium/winsys/drm/nouveau/common/nouveau_context.c @@ -43,7 +43,7 @@ nouveau_channel_context_create(struct nouveau_device *dev) return NULL; } - nvc->next_handle = 0x80000000; + nvc->next_handle = 0x88000000; if ((ret = nouveau_notifier_alloc(nvc->channel, nvc->next_handle++, 1, &nvc->sync_notifier))) { @@ -120,22 +120,12 @@ nouveau_context_init(struct nouveau_screen *nv_screen, { struct pipe_surface *fb_surf; struct nouveau_pipe_buffer *fb_buf; - struct nouveau_bo_priv *fb_bo; - - fb_bo = calloc(1, sizeof(struct nouveau_bo_priv)); - fb_bo->drm.offset = nv_screen->front_offset; - fb_bo->drm.flags = NOUVEAU_MEM_FB; - fb_bo->drm.size = nv_screen->front_pitch * - nv_screen->front_height; - fb_bo->refcount = 1; - fb_bo->base.flags = NOUVEAU_BO_PIN | NOUVEAU_BO_VRAM; - fb_bo->base.offset = fb_bo->drm.offset; - fb_bo->base.handle = (unsigned long)fb_bo; - fb_bo->base.size = fb_bo->drm.size; - fb_bo->base.device = nv_screen->device; fb_buf = calloc(1, sizeof(struct nouveau_pipe_buffer)); - fb_buf->bo = &fb_bo->base; + + nouveau_bo_fake(dev, nv_screen->front_offset, NOUVEAU_BO_VRAM, + nv_screen->front_pitch*nv_screen->front_height, + NULL, &fb_buf->bo); fb_surf = calloc(1, sizeof(struct pipe_surface)); if (nv_screen->front_cpp == 2) |