summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv50
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-09-01 10:51:08 -0400
committerIlia Mirkin <[email protected]>2014-09-01 18:38:02 -0400
commit2c440433130d3c64635684355a3667d145a188e3 (patch)
treec0d0efd26990edd55f449c629758a57e513f57dd /src/gallium/drivers/nouveau/nv50
parent9d52e551a5874e54bc80f306bf3cacbad2441315 (diff)
nv50: attach the buffer bo to the miptree structures
The current code... makes no sense. Use nouveau_bo_ref to attach the bo to the exposed resource so as to have the proper lifetime guarantees. Tested-by: Emil Velikov <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.2 10.3" <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50')
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv84_video.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv84_video.c b/src/gallium/drivers/nouveau/nv50/nv84_video.c
index b26e1eebfbb..b42de20f72f 100644
--- a/src/gallium/drivers/nouveau/nv50/nv84_video.c
+++ b/src/gallium/drivers/nouveau/nv50/nv84_video.c
@@ -685,17 +685,14 @@ nv84_video_buffer_create(struct pipe_context *pipe,
bo_size, &cfg, &buffer->full))
goto error;
- mt0->base.bo = buffer->interlaced;
+ nouveau_bo_ref(buffer->interlaced, &mt0->base.bo);
mt0->base.domain = NOUVEAU_BO_VRAM;
- mt0->base.offset = 0;
- mt0->base.address = buffer->interlaced->offset + mt0->base.offset;
- nouveau_bo_ref(buffer->interlaced, &empty);
+ mt0->base.address = buffer->interlaced->offset;
- mt1->base.bo = buffer->interlaced;
+ nouveau_bo_ref(buffer->interlaced, &mt1->base.bo);
mt1->base.domain = NOUVEAU_BO_VRAM;
- mt1->base.offset = mt0->layer_stride * 2;
- mt1->base.address = buffer->interlaced->offset + mt1->base.offset;
- nouveau_bo_ref(buffer->interlaced, &empty);
+ mt1->base.offset = mt0->total_size;
+ mt1->base.address = buffer->interlaced->offset + mt0->total_size;
memset(&sv_templ, 0, sizeof(sv_templ));
for (component = 0, i = 0; i < 2; ++i ) {