diff options
author | Dave Airlie <airlied@redhat.com> | 2009-03-20 10:52:17 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-03-20 10:52:17 +1000 |
commit | 407e8ae5b167b0193e1e5b1266a5d61ed836dfb5 (patch) | |
tree | 2d9d05a5c3122f41a13aa8bd9ae921c1176e6b0d /src/gallium/winsys/gdi/gdi_softpipe_winsys.c | |
parent | bdaa0341caffc353fd26bbd91865c2d86eed11c1 (diff) | |
parent | 114bb54324f22cb53bcd14607234d0acd74d37bd (diff) |
Merge remote branch 'main/master' into radeon-rewrite
Conflicts:
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_state.c
src/mesa/drivers/dri/r300/r300_swtcl.c
src/mesa/drivers/dri/r300/radeon_ioctl.c
src/mesa/drivers/dri/radeon/radeon_screen.c
Diffstat (limited to 'src/gallium/winsys/gdi/gdi_softpipe_winsys.c')
-rw-r--r-- | src/gallium/winsys/gdi/gdi_softpipe_winsys.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c index 4924dbf26a..440666d835 100644 --- a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c +++ b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c @@ -87,8 +87,7 @@ gdi_softpipe_buffer_unmap(struct pipe_winsys *winsys, static void -gdi_softpipe_buffer_destroy(struct pipe_winsys *winsys, - struct pipe_buffer *buf) +gdi_softpipe_buffer_destroy(struct pipe_buffer *buf) { struct gdi_softpipe_buffer *oldBuf = gdi_softpipe_buffer(buf); @@ -118,7 +117,7 @@ gdi_softpipe_buffer_create(struct pipe_winsys *winsys, { struct gdi_softpipe_buffer *buffer = CALLOC_STRUCT(gdi_softpipe_buffer); - buffer->base.refcount = 1; + pipe_reference_init(&buffer->base.reference, 1); buffer->base.alignment = alignment; buffer->base.usage = usage; buffer->base.size = size; @@ -143,7 +142,7 @@ gdi_softpipe_user_buffer_create(struct pipe_winsys *winsys, if(!buffer) return NULL; - buffer->base.refcount = 1; + pipe_reference_init(&buffer->base.reference, 1); buffer->base.size = bytes; buffer->userBuffer = TRUE; buffer->data = ptr; @@ -273,14 +272,17 @@ gdi_softpipe_flush_frontbuffer(struct pipe_screen *screen, struct pipe_surface *surface, HDC hDC) { + struct softpipe_texture *texture; struct gdi_softpipe_buffer *buffer; BITMAPINFO bmi; - buffer = gdi_softpipe_buffer(softpipe_texture(surface->texture)->buffer); + texture = softpipe_texture(surface->texture); + + buffer = gdi_softpipe_buffer(texture->buffer); memset(&bmi, 0, sizeof(BITMAPINFO)); bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmi.bmiHeader.biWidth = surface->stride / pf_get_size(surface->format); + bmi.bmiHeader.biWidth = texture->stride[surface->level] / pf_get_size(surface->format); bmi.bmiHeader.biHeight= -(long)surface->height; bmi.bmiHeader.biPlanes = 1; bmi.bmiHeader.biBitCount = pf_get_bits(surface->format); |