diff options
author | Roland Scheidegger <[email protected]> | 2010-05-21 20:02:22 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-05-21 20:02:22 +0200 |
commit | 3293bcdc80cdfa20a2381aae2b94505bdf95d857 (patch) | |
tree | 16ab1ae66010f6d8b1325dbfa9006126a8e95771 /src/gallium/state_trackers/vega/vg_manager.c | |
parent | 8504c5d931e47765a15fdaec2df2cb6502a1bd5c (diff) | |
parent | ce65caba846b03b5ef4144e311b85cfd48ab9bbb (diff) |
Merge branch 'gallium-msaa'
Conflicts:
src/mesa/state_tracker/st_gen_mipmap.c
src/mesa/state_tracker/st_texture.c
Diffstat (limited to 'src/gallium/state_trackers/vega/vg_manager.c')
-rw-r--r-- | src/gallium/state_trackers/vega/vg_manager.c | 46 |
1 files changed, 18 insertions, 28 deletions
diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c index f1bc5787855..3b04816df04 100644 --- a/src/gallium/state_trackers/vega/vg_manager.c +++ b/src/gallium/state_trackers/vega/vg_manager.c @@ -124,28 +124,22 @@ setup_new_alpha_mask(struct vg_context *ctx, struct st_framebuffer *stfb) /* if we had an old surface copy it over */ if (old_sampler_view) { - struct pipe_surface *surface = pipe->screen->get_tex_surface( - pipe->screen, - stfb->alpha_mask_view->texture, - 0, 0, 0, - PIPE_BIND_RENDER_TARGET | - PIPE_BIND_BLIT_DESTINATION); - struct pipe_surface *old_surface = pipe->screen->get_tex_surface( - pipe->screen, - old_sampler_view->texture, - 0, 0, 0, - PIPE_BIND_BLIT_SOURCE); - pipe->surface_copy(pipe, - surface, - 0, 0, - old_surface, - 0, 0, - MIN2(old_surface->width, surface->width), - MIN2(old_surface->height, surface->height)); - if (surface) - pipe_surface_reference(&surface, NULL); - if (old_surface) - pipe_surface_reference(&old_surface, NULL); + struct pipe_subresource subsurf, subold_surf; + subsurf.face = 0; + subsurf.level = 0; + subold_surf.face = 0; + subold_surf.level = 0; + pipe->resource_copy_region(pipe, + stfb->alpha_mask_view->texture, + subsurf, + 0, 0, 0, + old_sampler_view->texture, + subold_surf, + 0, 0, 0, + MIN2(old_sampler_view->texture->width0, + stfb->alpha_mask_view->texture->width0), + MIN2(old_sampler_view->texture->height0, + stfb->alpha_mask_view->texture->height0)); } /* Free the old texture @@ -172,9 +166,7 @@ vg_context_update_depth_stencil_rb(struct vg_context * ctx, /* Probably need dedicated flags for surface usage too: */ - surface_usage = (PIPE_BIND_RENDER_TARGET | - PIPE_BIND_BLIT_SOURCE | - PIPE_BIND_BLIT_DESTINATION); + surface_usage = PIPE_BIND_DEPTH_STENCIL; /* XXX: was: RENDER_TARGET */ dsrb->texture = create_texture(pipe, dsrb->format, width, height); if (!dsrb->texture) @@ -216,9 +208,7 @@ vg_context_update_color_rb(struct vg_context *ctx, struct pipe_resource *pt) strb->texture = pt; strb->surface = screen->get_tex_surface(screen, strb->texture, 0, 0, 0, - PIPE_BIND_RENDER_TARGET | - PIPE_BIND_BLIT_SOURCE | - PIPE_BIND_BLIT_DESTINATION); + PIPE_BIND_RENDER_TARGET); if (!strb->surface) { pipe_resource_reference(&strb->texture, NULL); return TRUE; |