diff options
Diffstat (limited to 'src/gallium/drivers/i965simple')
-rw-r--r-- | src/gallium/drivers/i965simple/Makefile | 2 | ||||
-rw-r--r-- | src/gallium/drivers/i965simple/brw_eu_debug.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/i965simple/brw_surface.c | 13 | ||||
-rw-r--r-- | src/gallium/drivers/i965simple/brw_tex_layout.c | 38 | ||||
-rw-r--r-- | src/gallium/drivers/i965simple/brw_wm_surface_state.c | 2 |
5 files changed, 21 insertions, 36 deletions
diff --git a/src/gallium/drivers/i965simple/Makefile b/src/gallium/drivers/i965simple/Makefile index e97146e57c..19182afa75 100644 --- a/src/gallium/drivers/i965simple/Makefile +++ b/src/gallium/drivers/i965simple/Makefile @@ -50,5 +50,3 @@ C_SOURCES = \ brw_wm_surface_state.c include ../../Makefile.template - -symlinks: diff --git a/src/gallium/drivers/i965simple/brw_eu_debug.c b/src/gallium/drivers/i965simple/brw_eu_debug.c index 4a94ddefa6..4adfb0c02f 100644 --- a/src/gallium/drivers/i965simple/brw_eu_debug.c +++ b/src/gallium/drivers/i965simple/brw_eu_debug.c @@ -30,7 +30,7 @@ */ -#include "pipe/p_debug.h" +#include "util/u_debug.h" #include "brw_eu.h" diff --git a/src/gallium/drivers/i965simple/brw_surface.c b/src/gallium/drivers/i965simple/brw_surface.c index 0a95dce194..511779dbfa 100644 --- a/src/gallium/drivers/i965simple/brw_surface.c +++ b/src/gallium/drivers/i965simple/brw_surface.c @@ -41,7 +41,6 @@ */ static void brw_surface_copy(struct pipe_context *pipe, - boolean do_flip, struct pipe_surface *dst, unsigned dstx, unsigned dsty, struct pipe_surface *src, @@ -64,11 +63,11 @@ brw_surface_copy(struct pipe_context *pipe, pipe_copy_rect(dst_map, &dst->block, dst->stride, - dstx, dsty, - width, height, - src_map, - do_flip ? -(int) src->stride : src->stride, - srcx, do_flip ? height - 1 - srcy : srcy); + dstx, dsty, + width, height, + src_map, + src->stride, + srcx, srcy); pipe->screen->surface_unmap(pipe->screen, src); pipe->screen->surface_unmap(pipe->screen, dst); @@ -79,7 +78,7 @@ brw_surface_copy(struct pipe_context *pipe, assert(dst->block.width == 1); assert(dst->block.height == 1); brw_copy_blit(brw_context(pipe), - do_flip, + FALSE, dst->block.size, (short) src->stride/src->block.size, src_tex->buffer, src->offset, FALSE, (short) dst->stride/dst->block.size, dst_tex->buffer, dst->offset, FALSE, diff --git a/src/gallium/drivers/i965simple/brw_tex_layout.c b/src/gallium/drivers/i965simple/brw_tex_layout.c index 448229ed4e..c921c0d38b 100644 --- a/src/gallium/drivers/i965simple/brw_tex_layout.c +++ b/src/gallium/drivers/i965simple/brw_tex_layout.c @@ -284,18 +284,17 @@ static struct pipe_texture * brw_texture_create_screen(struct pipe_screen *screen, const struct pipe_texture *templat) { - struct pipe_winsys *ws = screen->winsys; struct brw_texture *tex = CALLOC_STRUCT(brw_texture); if (tex) { tex->base = *templat; - tex->base.refcount = 1; + pipe_reference_init(&tex->base.reference, 1); tex->base.nblocksx[0] = pf_get_nblocksx(&tex->base.block, tex->base.width[0]); tex->base.nblocksy[0] = pf_get_nblocksy(&tex->base.block, tex->base.height[0]); if (brw_miptree_layout(tex)) - tex->buffer = ws->buffer_create(ws, 64, + tex->buffer = screen->buffer_create(screen, 64, PIPE_BUFFER_USAGE_PIXEL, tex->stride * tex->total_nblocksy); @@ -311,33 +310,22 @@ brw_texture_create_screen(struct pipe_screen *screen, static void -brw_texture_release_screen(struct pipe_screen *screen, - struct pipe_texture **pt) +brw_texture_destroy_screen(struct pipe_texture *pt) { - if (!*pt) - return; + struct brw_texture *tex = (struct brw_texture *)pt; + uint i; /* - DBG("%s %p refcount will be %d\n", - __FUNCTION__, (void *) *pt, (*pt)->refcount - 1); + DBG("%s deleting %p\n", __FUNCTION__, (void *) tex); */ - if (--(*pt)->refcount <= 0) { - struct brw_texture *tex = (struct brw_texture *)*pt; - uint i; - - /* - DBG("%s deleting %p\n", __FUNCTION__, (void *) tex); - */ - pipe_buffer_reference(screen, &tex->buffer, NULL); + pipe_buffer_reference(&tex->buffer, NULL); - for (i = 0; i < PIPE_MAX_TEXTURE_LEVELS; i++) - if (tex->image_offset[i]) - free(tex->image_offset[i]); + for (i = 0; i < PIPE_MAX_TEXTURE_LEVELS; i++) + if (tex->image_offset[i]) + free(tex->image_offset[i]); - free(tex); - } - *pt = NULL; + free(tex); } @@ -365,7 +353,7 @@ brw_get_tex_surface_screen(struct pipe_screen *screen, ps = CALLOC_STRUCT(pipe_surface); if (ps) { - ps->refcount = 1; + pipe_reference_init(&ps->reference, 1); pipe_texture_reference(&ps->texture, pt); ps->format = pt->format; ps->width = pt->width[level]; @@ -392,7 +380,7 @@ void brw_init_screen_texture_funcs(struct pipe_screen *screen) { screen->texture_create = brw_texture_create_screen; - screen->texture_release = brw_texture_release_screen; + screen->texture_destroy = brw_texture_destroy_screen; screen->get_tex_surface = brw_get_tex_surface_screen; } diff --git a/src/gallium/drivers/i965simple/brw_wm_surface_state.c b/src/gallium/drivers/i965simple/brw_wm_surface_state.c index 1bab5bfdb3..b5b9e0e702 100644 --- a/src/gallium/drivers/i965simple/brw_wm_surface_state.c +++ b/src/gallium/drivers/i965simple/brw_wm_surface_state.c @@ -242,7 +242,7 @@ static void upload_wm_surfaces(struct brw_context *brw ) const struct brw_texture *texUnit = brw->attribs.Texture[i]; if (texUnit && - texUnit->base.refcount/*(texUnit->refcount > 0) == really used */) { + texUnit->base.reference.count/*(texUnit->reference.count > 0) == really used */) { brw_update_texture_surface(brw, i); |