summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2009-03-07 17:28:08 +1000
committerBen Skeggs <bskeggs@redhat.com>2009-03-07 17:49:10 +1000
commit67f2c6054c7303547c790f283ab3d124ac60a276 (patch)
tree9e8a95315c196a86432bc27a29e9163cc93f2187 /src/gallium/winsys
parent22125f63b9b25bd648513f5b680f73e3f80cc1dc (diff)
nouveau: use bo_handle_ref instead of bo_fake to get front-buffer bo
This'll work on non-GEM also as the DDX will just pass an offset, and libdrm_nouveau knows to treat "handle" as a VRAM offset. When running on GEM the DDX (it doesn't yet, but will) passes a buffer handle instead.
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/drm/nouveau/common/nouveau_context.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gallium/winsys/drm/nouveau/common/nouveau_context.c b/src/gallium/winsys/drm/nouveau/common/nouveau_context.c
index 2c711e583c..fbe57eacf2 100644
--- a/src/gallium/winsys/drm/nouveau/common/nouveau_context.c
+++ b/src/gallium/winsys/drm/nouveau/common/nouveau_context.c
@@ -164,9 +164,7 @@ nouveau_context_init(struct nouveau_screen *nv_screen,
pipe_reference_init(&fb_buf->base.reference, 1);
fb_buf->base.usage = PIPE_BUFFER_USAGE_PIXEL;
- nouveau_bo_fake(dev, nv_screen->front_offset, NOUVEAU_BO_VRAM,
- nv_screen->front_pitch*nv_screen->front_height,
- NULL, &fb_buf->bo);
+ nouveau_bo_handle_ref(dev, nv_screen->front_offset, &fb_buf->bo);
if (nv_screen->front_cpp == 4)
format = PIPE_FORMAT_A8R8G8B8_UNORM;