diff options
Diffstat (limited to 'src/gallium/state_trackers/vega')
-rw-r--r-- | src/gallium/state_trackers/vega/api_context.c | 7 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/api_images.c | 5 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/image.c | 10 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/mask.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/renderer.c | 8 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/vg_context.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/vg_manager.c | 4 |
7 files changed, 12 insertions, 26 deletions
diff --git a/src/gallium/state_trackers/vega/api_context.c b/src/gallium/state_trackers/vega/api_context.c index d6bbda5e075..19e42dd1562 100644 --- a/src/gallium/state_trackers/vega/api_context.c +++ b/src/gallium/state_trackers/vega/api_context.c @@ -56,7 +56,7 @@ void vegaFlush(void) return; pipe = ctx->pipe; - pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL); + pipe->flush(pipe, NULL); vg_manager_flush_frontbuffer(ctx); } @@ -72,9 +72,10 @@ void vegaFinish(void) pipe = ctx->pipe; - pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence); + pipe->flush(pipe, &fence); if (fence) { - pipe->screen->fence_finish(pipe->screen, fence, 0); + pipe->screen->fence_finish(pipe->screen, fence, + PIPE_TIMEOUT_INFINITE); pipe->screen->fence_reference(pipe->screen, &fence, NULL); } } diff --git a/src/gallium/state_trackers/vega/api_images.c b/src/gallium/state_trackers/vega/api_images.c index b993ba62c26..2cb5622f817 100644 --- a/src/gallium/state_trackers/vega/api_images.c +++ b/src/gallium/state_trackers/vega/api_images.c @@ -356,7 +356,6 @@ void vegaWritePixels(const void * data, VGint dataStride, VGint width, VGint height) { struct vg_context *ctx = vg_current_context(); - struct pipe_context *pipe = ctx->pipe; if (!supported_image_format(dataFormat)) { vg_set_error(ctx, VG_UNSUPPORTED_IMAGE_FORMAT_ERROR); @@ -387,8 +386,6 @@ void vegaWritePixels(const void * data, VGint dataStride, #endif image_destroy(img); } - /* make sure rendering has completed */ - pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL); } void vegaReadPixels(void * data, VGint dataStride, @@ -421,8 +418,6 @@ void vegaReadPixels(void * data, VGint dataStride, return; } - /* make sure rendering has completed */ - pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL); if (sx < 0) { xoffset = -sx; xoffset *= _vega_size_for_format(dataFormat); diff --git a/src/gallium/state_trackers/vega/image.c b/src/gallium/state_trackers/vega/image.c index 73351b671f9..44480876b6e 100644 --- a/src/gallium/state_trackers/vega/image.c +++ b/src/gallium/state_trackers/vega/image.c @@ -257,7 +257,7 @@ struct vg_image * image_create(VGImageFormat format, image->sampler.normalized_coords = 1; assert(screen->is_format_supported(screen, pformat, PIPE_TEXTURE_2D, - 0, PIPE_BIND_SAMPLER_VIEW, 0)); + 0, PIPE_BIND_SAMPLER_VIEW)); memset(&pt, 0, sizeof(pt)); pt.target = PIPE_TEXTURE_2D; @@ -518,8 +518,6 @@ void image_copy(struct vg_image *dst, VGint dx, VGint dy, vg_set_error(ctx, VG_ILLEGAL_ARGUMENT_ERROR); return; } - /* make sure rendering has completed */ - ctx->pipe->flush(ctx->pipe, PIPE_FLUSH_RENDER_CACHE, NULL); vg_copy_texture(ctx, dst->sampler_view->texture, dst->x + dx, dst->y + dy, src->sampler_view, src->x + sx, src->y + sy, width, height); } @@ -569,9 +567,6 @@ void image_set_pixels(VGint dx, VGint dy, struct pipe_surface *surf, surf_tmpl; struct st_renderbuffer *strb = ctx->draw_buffer->strb; - /* make sure rendering has completed */ - pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL); - memset(&surf_tmpl, 0, sizeof(surf_tmpl)); u_surface_default_template(&surf_tmpl, image_texture(src), 0 /* no bind flag - not a surface*/); @@ -595,9 +590,6 @@ void image_get_pixels(struct vg_image *dst, VGint dx, VGint dy, /* flip the y coordinates */ /*dy = dst->height - dy - height;*/ - /* make sure rendering has completed */ - pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL); - memset(&surf_tmpl, 0, sizeof(surf_tmpl)); u_surface_default_template(&surf_tmpl, image_texture(dst), PIPE_BIND_RENDER_TARGET); diff --git a/src/gallium/state_trackers/vega/mask.c b/src/gallium/state_trackers/vega/mask.c index dfd0600e444..10590e29cd2 100644 --- a/src/gallium/state_trackers/vega/mask.c +++ b/src/gallium/state_trackers/vega/mask.c @@ -111,8 +111,6 @@ static void read_alpha_mask(void * data, VGint dataStride, VGubyte *dst = (VGubyte *)data; VGint xoffset = 0, yoffset = 0; - /* make sure rendering has completed */ - pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL); if (sx < 0) { xoffset = -sx; xoffset *= _vega_size_for_format(dataFormat); diff --git a/src/gallium/state_trackers/vega/renderer.c b/src/gallium/state_trackers/vega/renderer.c index 9de2cb1014d..5715073e2d9 100644 --- a/src/gallium/state_trackers/vega/renderer.c +++ b/src/gallium/state_trackers/vega/renderer.c @@ -140,7 +140,7 @@ static VGboolean renderer_can_support(struct renderer *renderer, struct pipe_screen *screen = renderer->pipe->screen; return screen->is_format_supported(screen, - res->format, res->target, 0, bindings, 0); + res->format, res->target, 0, bindings); } /** @@ -1463,11 +1463,11 @@ void renderer_copy_surface(struct renderer *ctx, } assert(screen->is_format_supported(screen, src->format, PIPE_TEXTURE_2D, - 0, PIPE_BIND_SAMPLER_VIEW, 0)); + 0, PIPE_BIND_SAMPLER_VIEW)); assert(screen->is_format_supported(screen, dst->format, PIPE_TEXTURE_2D, - 0, PIPE_BIND_SAMPLER_VIEW, 0)); + 0, PIPE_BIND_SAMPLER_VIEW)); assert(screen->is_format_supported(screen, dst->format, PIPE_TEXTURE_2D, - 0, PIPE_BIND_RENDER_TARGET, 0)); + 0, PIPE_BIND_RENDER_TARGET)); /* * XXX for now we're always creating a temporary texture. diff --git a/src/gallium/state_trackers/vega/vg_context.c b/src/gallium/state_trackers/vega/vg_context.c index 83b42609e03..c2ab56455b1 100644 --- a/src/gallium/state_trackers/vega/vg_context.c +++ b/src/gallium/state_trackers/vega/vg_context.c @@ -69,7 +69,7 @@ choose_depth_stencil_format(struct vg_context *ctx) for (fmt = formats; *fmt != PIPE_FORMAT_NONE; fmt++) { if (screen->is_format_supported(screen, *fmt, - PIPE_TEXTURE_2D, 0, PIPE_BIND_DEPTH_STENCIL, 0)) + PIPE_TEXTURE_2D, 0, PIPE_BIND_DEPTH_STENCIL)) break; } diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c index 44d2996bb45..eeea68677de 100644 --- a/src/gallium/state_trackers/vega/vg_manager.c +++ b/src/gallium/state_trackers/vega/vg_manager.c @@ -142,8 +142,8 @@ vg_context_flush(struct st_context_iface *stctxi, unsigned flags, struct pipe_fence_handle **fence) { struct vg_context *ctx = (struct vg_context *) stctxi; - ctx->pipe->flush(ctx->pipe, flags, fence); - if (flags & PIPE_FLUSH_RENDER_CACHE) + ctx->pipe->flush(ctx->pipe, fence); + if (flags & ST_FLUSH_FRONT) vg_manager_flush_frontbuffer(ctx); } |