From c574f515f0aa20ccc3841cf61a6124bc5996e7b2 Mon Sep 17 00:00:00 2001 From: Younes Manton Date: Sun, 6 Dec 2009 12:26:55 -0500 Subject: nouveau: Work around nv04-nv40 miptrees not matching nouveau_miptree. Thanks to Bob Gleitsmann for the patch. I'll clean this up in a better way later if noone else beats me to it. --- src/gallium/drivers/nv10/nv10_miptree.c | 2 ++ src/gallium/drivers/nv10/nv10_state.h | 1 + 2 files changed, 3 insertions(+) (limited to 'src/gallium/drivers/nv10') diff --git a/src/gallium/drivers/nv10/nv10_miptree.c b/src/gallium/drivers/nv10/nv10_miptree.c index 439beeccc3..6a52b6af36 100644 --- a/src/gallium/drivers/nv10/nv10_miptree.c +++ b/src/gallium/drivers/nv10/nv10_miptree.c @@ -67,6 +67,7 @@ nv10_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt, mt->level[0].image_offset = CALLOC(1, sizeof(unsigned)); pipe_buffer_reference(&mt->buffer, pb); + mt->bo = nouveau_bo(mt->buffer); return &mt->base; } @@ -90,6 +91,7 @@ nv10_miptree_create(struct pipe_screen *screen, const struct pipe_texture *pt) FREE(mt); return NULL; } + mt->bo = nouveau_bo(mt->buffer); return &mt->base; } diff --git a/src/gallium/drivers/nv10/nv10_state.h b/src/gallium/drivers/nv10/nv10_state.h index 3a3fd0d4f4..2524ac02e2 100644 --- a/src/gallium/drivers/nv10/nv10_state.h +++ b/src/gallium/drivers/nv10/nv10_state.h @@ -126,6 +126,7 @@ struct nv10_depth_stencil_alpha_state { struct nv10_miptree { struct pipe_texture base; + struct nouveau_bo *bo; struct pipe_buffer *buffer; uint total_size; -- cgit v1.2.3