Module: Mesa Branch: gallium-resources Commit: a83fa1504b78180524a5eb454ae186741a27cdf8 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a83fa1504b78180524a5eb454ae186741a27cdf8
Author: Roland Scheidegger <srol...@vmware.com> Date: Tue Mar 30 17:37:13 2010 +0200 compile fixes --- src/gallium/drivers/cell/ppu/cell_texture.c | 8 +++++--- src/gallium/drivers/llvmpipe/lp_texture.c | 16 +++++++++------- src/gallium/drivers/svga/svga_resource_texture.c | 2 +- src/gallium/include/pipe/p_screen.h | 2 +- src/gallium/state_trackers/dri/dri1.c | 4 ++-- src/gallium/state_trackers/dri/dri_st_api.c | 2 +- 6 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/gallium/drivers/cell/ppu/cell_texture.c b/src/gallium/drivers/cell/ppu/cell_texture.c index b5d88ac..1f0fff4 100644 --- a/src/gallium/drivers/cell/ppu/cell_texture.c +++ b/src/gallium/drivers/cell/ppu/cell_texture.c @@ -105,7 +105,7 @@ cell_displaytarget_layout(struct pipe_screen *screen, /* Round up the surface size to a multiple of the tile size? */ ct->dt = winsys->displaytarget_create(winsys, - ct->base->tex_usage, + ct->base->bind, ct->base.format, ct->base.width0, ct->base.height0, @@ -588,7 +588,7 @@ static struct pipe_resource * cell_user_buffer_create(struct pipe_screen *screen, void *ptr, unsigned bytes, - unsigned usage) + unsigned bind_flags) { struct cell_resource *buffer; @@ -599,7 +599,9 @@ cell_user_buffer_create(struct pipe_screen *screen, pipe_reference_init(&buffer->base.reference, 1); buffer->base.screen = screen; buffer->base.format = PIPE_FORMAT_R8_UNORM; /* ?? */ - buffer->base.usage = PIPE_BUFFER_USAGE_CPU_READ | usage; + buffer->base.bind = PIPE_TRANSFER_READ | bind_flags; + buffer->base._usage = PIPE_USAGE_IMMUTABLE; + buffer->base.flags = 0; buffer->base.width0 = bytes; buffer->base.height0 = 1; buffer->base.depth0 = 1; diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index d89072e..972c7ae 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -105,7 +105,7 @@ llvmpipe_displaytarget_layout(struct llvmpipe_screen *screen, unsigned height = align(lpt->base.height0, TILE_SIZE); lpt->dt = winsys->displaytarget_create(winsys, - lpt->base.tex_usage, + lpt->base.bind, lpt->base.format, width, height, 16, @@ -128,9 +128,9 @@ llvmpipe_resource_create(struct pipe_screen *_screen, pipe_reference_init(&lpt->base.reference, 1); lpt->base.screen = &screen->base; - if (lpt->base.tex_usage & (PIPE_BIND_DISPLAY_TARGET | - PIPE_BIND_SCANOUT | - PIPE_BIND_SHARED)) { + if (lpt->base.bind & (PIPE_BIND_DISPLAY_TARGET | + PIPE_BIND_SCANOUT | + PIPE_BIND_SHARED)) { if (!llvmpipe_displaytarget_layout(screen, lpt)) goto fail; } @@ -138,7 +138,7 @@ llvmpipe_resource_create(struct pipe_screen *_screen, if (!llvmpipe_resource_layout(screen, lpt)) goto fail; } - + return &lpt->base; fail: @@ -463,7 +463,7 @@ static struct pipe_resource * llvmpipe_user_buffer_create(struct pipe_screen *screen, void *ptr, unsigned bytes, - unsigned usage) + unsigned bind_flags) { struct llvmpipe_resource *buffer; @@ -474,7 +474,9 @@ llvmpipe_user_buffer_create(struct pipe_screen *screen, pipe_reference_init(&buffer->base.reference, 1); buffer->base.screen = screen; buffer->base.format = PIPE_FORMAT_R8_UNORM; /* ?? */ - buffer->base.usage = usage; + buffer->base.bind = bind_flags; + buffer->base._usage = PIPE_USAGE_IMMUTABLE; + buffer->base.flags = 0; buffer->base.width0 = bytes; buffer->base.height0 = 1; buffer->base.depth0 = 1; diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index b200af2..0e4eba0 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -542,7 +542,7 @@ svga_texture_create(struct pipe_screen *screen, * passing the SVGA3D_SURFACE_HINT_RENDERTARGET here defeats its purpose. */ #if 0 - if((template->tex_usage & PIPE_BIND_RENDER_TARGET) && + if((template->bind & PIPE_BIND_RENDER_TARGET) && !util_format_is_compressed(template->format)) tex->key.flags |= SVGA3D_SURFACE_HINT_RENDERTARGET; #endif diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index 8fa648e..c0f0727 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -168,7 +168,7 @@ struct pipe_screen { struct pipe_resource *(*user_buffer_create)(struct pipe_screen *screen, void *ptr, unsigned bytes, - unsigned usage); + unsigned bind_flags); /** * Create a video surface suitable for use as a decoding target by the diff --git a/src/gallium/state_trackers/dri/dri1.c b/src/gallium/state_trackers/dri/dri1.c index 440e07b..7e91a5f 100644 --- a/src/gallium/state_trackers/dri/dri1.c +++ b/src/gallium/state_trackers/dri/dri1.c @@ -223,7 +223,7 @@ dri1_get_pipe_surface(struct dri_drawable *drawable, struct pipe_resource *ptex) pipe_surface_reference(&drawable->dri1_surface, NULL); drawable->dri1_surface = pipe_screen->get_tex_surface(pipe_screen, - ptex, 0, 0, 0, PIPE_BUFFER_USAGE_GPU_READ); + ptex, 0, 0, 0, PIPE_BIND_BLIT_SOURCE); psurf = drawable->dri1_surface; } @@ -453,7 +453,7 @@ dri1_allocate_textures(struct dri_drawable *drawable, if (format != PIPE_FORMAT_NONE) { templ.format = format; - templ.tex_usage = tex_usage; + templ.bind = tex_usage; drawable->textures[i] = screen->pipe_screen->resource_create(screen->pipe_screen, &templ); diff --git a/src/gallium/state_trackers/dri/dri_st_api.c b/src/gallium/state_trackers/dri/dri_st_api.c index d2552b7..3ee5a94 100644 --- a/src/gallium/state_trackers/dri/dri_st_api.c +++ b/src/gallium/state_trackers/dri/dri_st_api.c @@ -94,7 +94,7 @@ dri_drawable_process_buffers(struct dri_drawable *drawable, pipe_resource_reference(&drawable->textures[i], NULL); memset(&templ, 0, sizeof(templ)); - templ.tex_usage = PIPE_BIND_RENDER_TARGET; + templ.bind = PIPE_BIND_RENDER_TARGET; templ.target = PIPE_TEXTURE_2D; templ.last_level = 0; templ.width0 = dri_drawable->w; _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit