Commit a83fa150 authored by Roland Scheidegger's avatar Roland Scheidegger

compile fixes

parent 30dc8afc
......@@ -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;
......
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment