X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fstate_trackers%2Fvega%2Fapi_context.c;h=055277cd76e24a46a5330fd79e621ffec5b483d7;hb=beaa5eb03a7729d8085144361a02c48853e7762a;hp=eb2fbe26e7fc9dc1881675df74f869bb2d1924b2;hpb=7567f05199f1ca114cc57e3a11ac101d3707f819;p=mesa.git diff --git a/src/gallium/state_trackers/vega/api_context.c b/src/gallium/state_trackers/vega/api_context.c index eb2fbe26e7f..055277cd76e 100644 --- a/src/gallium/state_trackers/vega/api_context.c +++ b/src/gallium/state_trackers/vega/api_context.c @@ -28,11 +28,12 @@ #include "vg_manager.h" #include "vg_context.h" +#include "api.h" #include "pipe/p_context.h" #include "pipe/p_screen.h" -VGErrorCode vgGetError(void) +VGErrorCode vegaGetError(void) { struct vg_context *ctx = vg_current_context(); VGErrorCode error = VG_NO_CONTEXT_ERROR; @@ -46,7 +47,7 @@ VGErrorCode vgGetError(void) return error; } -void vgFlush(void) +void vegaFlush(void) { struct vg_context *ctx = vg_current_context(); struct pipe_context *pipe; @@ -55,12 +56,12 @@ void vgFlush(void) return; pipe = ctx->pipe; - pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL); + pipe->flush(pipe, NULL, 0); vg_manager_flush_frontbuffer(ctx); } -void vgFinish(void) +void vegaFinish(void) { struct vg_context *ctx = vg_current_context(); struct pipe_fence_handle *fence = NULL; @@ -71,8 +72,10 @@ void vgFinish(void) pipe = ctx->pipe; - pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence); - - pipe->screen->fence_finish(pipe->screen, fence, 0); - pipe->screen->fence_reference(pipe->screen, &fence, NULL); + pipe->flush(pipe, &fence, 0); + if (fence) { + pipe->screen->fence_finish(pipe->screen, fence, + PIPE_TIMEOUT_INFINITE); + pipe->screen->fence_reference(pipe->screen, &fence, NULL); + } }