draw_flush(cell->draw);
/* note: reference counting */
- pipe_buffer_reference(pipe->screen,
- &cell->constants[shader].buffer,
- buf->buffer);
+ pipe_buffer_reference(&cell->constants[shader].buffer, buf->buffer);
if (shader == PIPE_SHADER_VERTEX)
cell->dirty |= CELL_NEW_VS_CONSTANTS;
struct cell_texture *ct = cell_texture(pt);
if (ct->mapped) {
- pipe_buffer_unmap(screen, ct->buffer);
+ pipe_buffer_unmap(ct->buffer->screen, ct->buffer);
ct->mapped = NULL;
}
static void
-cell_tex_surface_destroy(struct pipe_surface *s)
+cell_tex_surface_destroy(struct pipe_surface *surf)
{
pipe_texture_reference(&surf->texture, NULL);
FREE(surf);
ctrans = CALLOC_STRUCT(cell_transfer);
if (ctrans) {
struct pipe_transfer *pt = &ctrans->base;
- pipe_reference_init(&pt->reference, 1);
pipe_texture_reference(&pt->texture, texture);
pt->format = texture->format;
pt->block = texture->block;
}
static void
-xm_buffer_destroy(struct pipe_winsys *pws,
+xm_buffer_destroy(/*struct pipe_winsys *pws,*/
struct pipe_buffer *buf)
{
struct xm_buffer *oldBuf = xm_buffer(buf);
- if (oldBuf->data) {
- {
+ if (oldBuf) {
+ if (oldBuf->data) {
if (!oldBuf->userBuffer) {
align_free(oldBuf->data);
}
- }
- oldBuf->data = NULL;
+ oldBuf->data = NULL;
+ }
+ free(oldBuf);
}
-
- free(oldBuf);
}
static struct pipe_screen *
-xlib_create_cell_screen( struct pipe_winsys *pws )
+xlib_create_cell_screen( void )
{
struct pipe_winsys *winsys;
struct pipe_screen *screen;