SetViewports
- Gallium lacks support for multiple geometry-shader-selectable viewports D3D11 has
-ShaderResourceViewReadAfterWriteHazard -> flush(PIPE_FLUSH_RENDER_CACHE)
- - Gallium does not support specifying this per-render-target/view
+ShaderResourceViewReadAfterWriteHazard
+ - Gallium lacks support for this
SoSetTargets -> set_stream_output_buffers
* Called via pipe->flush()
*/
void
-cell_flush(struct pipe_context *pipe, unsigned flags,
+cell_flush(struct pipe_context *pipe,
struct pipe_fence_handle **fence)
{
struct cell_context *cell = cell_context(pipe);
if (fence) {
*fence = NULL;
- /* XXX: Implement real fencing */
- flags |= CELL_FLUSH_WAIT;
}
- if (flags & (PIPE_FLUSH_SWAPBUFFERS | PIPE_FLUSH_RENDER_CACHE))
- flags |= CELL_FLUSH_WAIT;
+ flags |= CELL_FLUSH_WAIT;
draw_flush( cell->draw );
cell_flush_int(cell, flags);
if (failover->mode == FO_SW) {
if (failover->dirty) {
- failover->hw->flush( failover->hw, ~0, NULL );
+ failover->hw->flush( failover->hw, NULL );
failover_state_emit( failover );
}
* intervening flush. Unlikely to be much performance impact to
* this:
*/
- failover->sw->flush( failover->sw, ~0, NULL );
+ failover->sw->flush( failover->sw, NULL );
}
}
static void
galahad_flush(struct pipe_context *_pipe,
- unsigned flags,
struct pipe_fence_handle **fence)
{
struct galahad_context *glhd_pipe = galahad_context(_pipe);
struct pipe_context *pipe = glhd_pipe->pipe;
pipe->flush(pipe,
- flags,
fence);
}
static void i915_flush_pipe( struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence )
{
struct i915_context *i915 = i915_context(pipe);
/* Do we need to emit an MI_FLUSH command to flush the hardware
* caches?
*/
+ /* XXX These flags are now implicit. All of them. */
if (flags & (PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_TEXTURE_CACHE)) {
unsigned flush = MI_FLUSH;
static void
brw_flush( struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence )
{
brw_context_flush( brw_context( pipe ) );
static void
identity_flush(struct pipe_context *_pipe,
- unsigned flags,
struct pipe_fence_handle **fence)
{
struct identity_context *id_pipe = identity_context(_pipe);
struct pipe_context *pipe = id_pipe->pipe;
pipe->flush(pipe,
- flags,
fence);
}
static void
do_flush( struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence)
{
- llvmpipe_flush(pipe, flags, fence, __FUNCTION__);
+ llvmpipe_flush(pipe, fence, __FUNCTION__);
}
/**
- * \param flags bitmask of PIPE_FLUSH_x flags
* \param fence if non-null, returns pointer to a fence which can be waited on
*/
void
llvmpipe_flush( struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence,
const char *reason)
{
draw_flush(llvmpipe->draw);
/* ask the setup module to flush */
- lp_setup_flush(llvmpipe->setup, flags, fence, reason);
+ lp_setup_flush(llvmpipe->setup, fence, reason);
if (llvmpipe_variant_count > 1000) {
/* Enable to dump BMPs of the color/depth buffers each frame */
if (0) {
- if (flags & PIPE_FLUSH_FRAME) {
- static unsigned frame_no = 1;
- char filename[256];
- unsigned i;
-
- for (i = 0; i < llvmpipe->framebuffer.nr_cbufs; i++) {
- util_snprintf(filename, sizeof(filename), "cbuf%u_%u", i, frame_no);
- debug_dump_surface_bmp(&llvmpipe->pipe, filename, llvmpipe->framebuffer.cbufs[i]);
- }
-
- if (0) {
- util_snprintf(filename, sizeof(filename), "zsbuf_%u", frame_no);
- debug_dump_surface_bmp(&llvmpipe->pipe, filename, llvmpipe->framebuffer.zsbuf);
- }
-
- ++frame_no;
+ static unsigned frame_no = 1;
+ char filename[256];
+ unsigned i;
+
+ for (i = 0; i < llvmpipe->framebuffer.nr_cbufs; i++) {
+ util_snprintf(filename, sizeof(filename), "cbuf%u_%u", i, frame_no);
+ debug_dump_surface_bmp(&llvmpipe->pipe, filename, llvmpipe->framebuffer.cbufs[i]);
+ }
+
+ if (0) {
+ util_snprintf(filename, sizeof(filename), "zsbuf_%u", frame_no);
+ debug_dump_surface_bmp(&llvmpipe->pipe, filename, llvmpipe->framebuffer.zsbuf);
}
+
+ ++frame_no;
}
}
const char *reason )
{
struct pipe_fence_handle *fence = NULL;
- llvmpipe_flush(pipe, 0, &fence, reason);
+ llvmpipe_flush(pipe, &fence, reason);
if (fence) {
pipe->screen->fence_finish(pipe->screen, fence, PIPE_TIMEOUT_INFINITE);
pipe->screen->fence_reference(pipe->screen, &fence, NULL);
struct pipe_resource *resource,
unsigned level,
int layer,
- unsigned flush_flags,
boolean read_only,
boolean cpu_access,
boolean do_not_block,
* Just flush.
*/
- llvmpipe_flush(pipe, flush_flags, NULL, reason);
+ llvmpipe_flush(pipe, NULL, reason);
}
}
void
llvmpipe_flush(struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence,
const char *reason);
struct pipe_resource *resource,
unsigned level,
int layer,
- unsigned flush_flags,
boolean read_only,
boolean cpu_access,
boolean do_not_block,
*/
if (pq->fence) {
if (!lp_fence_issued(pq->fence))
- llvmpipe_flush(pipe, 0, NULL, __FUNCTION__);
+ llvmpipe_flush(pipe, NULL, __FUNCTION__);
if (!lp_fence_signalled(pq->fence))
lp_fence_wait(pq->fence);
if (!lp_fence_signalled(pq->fence)) {
if (!lp_fence_issued(pq->fence))
- llvmpipe_flush(pipe, 0, NULL, __FUNCTION__);
+ llvmpipe_flush(pipe, NULL, __FUNCTION__);
if (!wait)
return FALSE;
}
-/**
- * \param flags bitmask of PIPE_FLUSH_x flags
- */
void
lp_setup_flush( struct lp_setup_context *setup,
- unsigned flags,
struct pipe_fence_handle **fence,
const char *reason)
{
unsigned flags )
{
if (!lp_setup_try_clear( setup, color, depth, stencil, flags )) {
- lp_setup_flush(setup, 0, NULL, __FUNCTION__);
+ lp_setup_flush(setup, NULL, __FUNCTION__);
if (!lp_setup_try_clear( setup, color, depth, stencil, flags ))
assert(0);
if (!lp_scene_bin_everywhere(setup->scene,
LP_RAST_OP_END_QUERY,
dummy)) {
- lp_setup_flush(setup, 0, NULL, __FUNCTION__);
+ lp_setup_flush(setup, NULL, __FUNCTION__);
}
}
else {
void
lp_setup_flush( struct lp_setup_context *setup,
- unsigned flags,
struct pipe_fence_handle **fence,
const char *reason);
llvmpipe_flush_resource(pipe,
dst, dst_level, dstz,
- 0, /* flush_flags */
FALSE, /* read_only */
TRUE, /* cpu_access */
FALSE, /* do_not_block */
llvmpipe_flush_resource(pipe,
src, src_level, src_box->z,
- 0, /* flush_flags */
TRUE, /* read_only */
TRUE, /* cpu_access */
FALSE, /* do_not_block */
if (!llvmpipe_flush_resource(pipe, resource,
level,
box->depth > 1 ? -1 : box->z,
- 0, /* flush_flags */
read_only,
TRUE, /* cpu_access */
do_not_block,
/*
* context
*/
-static void noop_flush(struct pipe_context *ctx, unsigned flags,
+static void noop_flush(struct pipe_context *ctx,
struct pipe_fence_handle **fence)
{
}
#include "nouveau/nouveau_reloc.h"
static void
-nv50_flush(struct pipe_context *pipe, unsigned flags,
+nv50_flush(struct pipe_context *pipe,
struct pipe_fence_handle **fence)
{
struct nv50_context *nv50 = nv50_context(pipe);
struct nouveau_channel *chan = nv50->screen->base.channel;
- if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
+ /* XXX This flag wasn't set by the state tracker anyway. */
+ /*if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
BEGIN_RING(chan, RING_3D_(NV50_GRAPH_WAIT_FOR_IDLE), 1);
OUT_RING (chan, 0);
BEGIN_RING(chan, RING_3D(TEX_CACHE_CTL), 1);
OUT_RING (chan, 0x20);
- }
+ }*/
if (fence)
nouveau_fence_ref(nv50->screen->base.fence.current,
(struct nouveau_fence **)fence);
- if (flags & (PIPE_FLUSH_SWAPBUFFERS | PIPE_FLUSH_FRAME))
- FIRE_RING(chan);
+ FIRE_RING(chan);
}
void
#include "nouveau/nouveau_reloc.h"
static void
-nvc0_flush(struct pipe_context *pipe, unsigned flags,
+nvc0_flush(struct pipe_context *pipe,
struct pipe_fence_handle **fence)
{
struct nvc0_context *nvc0 = nvc0_context(pipe);
struct nouveau_channel *chan = nvc0->screen->base.channel;
- if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
+ /* XXX This flag wasn't set by the state tracker anyway. */
+ /*if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
BEGIN_RING(chan, RING_3D(SERIALIZE), 1);
OUT_RING (chan, 0);
BEGIN_RING(chan, RING_3D(TEX_CACHE_CTL), 1);
OUT_RING (chan, 0x00);
- } else
- if ((flags & PIPE_FLUSH_RENDER_CACHE) && !(flags & PIPE_FLUSH_FRAME)) {
+ } else*/
+ /* XXX FLUSH_FRAME is now implicit. */
+ /*if ((flags & PIPE_FLUSH_RENDER_CACHE) && !(flags & PIPE_FLUSH_FRAME)) {
BEGIN_RING(chan, RING_3D(SERIALIZE), 1);
OUT_RING (chan, 0);
- }
+ }*/
if (fence)
nouveau_fence_ref(nvc0->screen->base.fence.current,
(struct nouveau_fence **)fence);
- if (flags & (PIPE_FLUSH_SWAPBUFFERS | PIPE_FLUSH_FRAME))
- FIRE_RING(chan);
+ FIRE_RING(chan);
}
static void
#include "nvfx_resource.h"
static void
-nvfx_flush(struct pipe_context *pipe, unsigned flags,
+nvfx_flush(struct pipe_context *pipe,
struct pipe_fence_handle **fence)
{
struct nvfx_context *nvfx = nvfx_context(pipe);
struct nouveau_grobj *eng3d = screen->eng3d;
/* XXX: we need to actually be intelligent here */
- if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
+ /* XXX This flag wasn't set by the state tracker anyway. */
+ /*if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
BEGIN_RING(chan, eng3d, 0x1fd8, 1);
OUT_RING(chan, 2);
BEGIN_RING(chan, eng3d, 0x1fd8, 1);
OUT_RING(chan, 1);
- }
+ }*/
FIRE_RING(chan);
if (fence)
NOUVEAU_ERR("hw->swtnl 0x%08x\n", nvfx->fallback_swtnl);
warned = TRUE;
}
- nvfx->pipe.flush(&nvfx->pipe, 0, NULL);
+ nvfx->pipe.flush(&nvfx->pipe, NULL);
nvfx->dirty |= (NVFX_NEW_VIEWPORT |
NVFX_NEW_VERTPROG |
NVFX_NEW_ARRAYS);
}
static void r300_flush_wrapped(struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence)
{
- /* don't use the flags param, it means something else */
r300_flush(pipe, 0, fence);
}
&r300transfer->linear_texture->b.b.b, 0, &src_box);
/* XXX remove this. */
- ctx->flush(ctx, 0, NULL);
+ r300_flush(ctx, 0, NULL);
}
struct pipe_transfer*
/*
* pipe_context
*/
-static void r600_flush(struct pipe_context *ctx, unsigned flags,
+static void r600_flush(struct pipe_context *ctx,
struct pipe_fence_handle **fence)
{
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
struct r600_query *rquery = (struct r600_query *)query;
if (rquery->num_results) {
- ctx->flush(ctx, 0, NULL);
+ ctx->flush(ctx, NULL);
}
return r600_context_query_result(&rctx->ctx, (struct r600_query *)query, wait, vresult);
}
rtransfer->staging_texture,
0, &sbox);
- ctx->flush(ctx, 0, NULL);
+ ctx->flush(ctx, NULL);
}
unsigned r600_texture_get_offset(struct r600_resource_texture *rtex,
if (usage & PIPE_TRANSFER_READ) {
r600_copy_to_staging_texture(ctx, trans);
/* Always referenced in the blit. */
- ctx->flush(ctx, 0, NULL);
+ ctx->flush(ctx, NULL);
}
return &trans->transfer;
}
static void
rbug_flush(struct pipe_context *_pipe,
- unsigned flags,
struct pipe_fence_handle **fence)
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
pipe->flush(pipe,
- flags,
fence);
}
/* protect the pipe context */
pipe_mutex_lock(rb_context->call_mutex);
- rb_context->pipe->flush(rb_context->pipe, flush->flags, NULL);
+ rb_context->pipe->flush(rb_context->pipe, NULL);
pipe_mutex_unlock(rb_context->call_mutex);
pipe_mutex_unlock(rb_screen->list_mutex);
softpipe->pipe.draw_stream_output = softpipe_draw_stream_output;
softpipe->pipe.clear = softpipe_clear;
- softpipe->pipe.flush = softpipe_flush;
+ softpipe->pipe.flush = softpipe_flush_wrapped;
softpipe->pipe.render_condition = softpipe_render_condition;
void
softpipe_flush( struct pipe_context *pipe,
- unsigned flags,
+ unsigned flags,
struct pipe_fence_handle **fence )
{
struct softpipe_context *softpipe = softpipe_context(pipe);
draw_flush(softpipe->draw);
- if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
+ if (flags & SP_FLUSH_TEXTURE_CACHE) {
for (i = 0; i < softpipe->num_fragment_sampler_views; i++) {
sp_flush_tex_tile_cache(softpipe->fragment_tex_cache[i]);
}
}
}
- if (flags & PIPE_FLUSH_SWAPBUFFERS) {
- /* If this is a swapbuffers, just flush color buffers.
- *
- * The zbuffer changes are not discarded, but held in the cache
- * in the hope that a later clear will wipe them out.
- */
- for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++)
- if (softpipe->cbuf_cache[i])
- sp_flush_tile_cache(softpipe->cbuf_cache[i]);
-
- /* Need this call for hardware buffers before swapbuffers.
- *
- * there should probably be another/different flush-type function
- * that's called before swapbuffers because we don't always want
- * to unmap surfaces when flushing.
- */
- softpipe_unmap_transfers(softpipe);
- }
- else if (flags & PIPE_FLUSH_RENDER_CACHE) {
- for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++)
- if (softpipe->cbuf_cache[i])
- sp_flush_tile_cache(softpipe->cbuf_cache[i]);
-
- if (softpipe->zsbuf_cache)
- sp_flush_tile_cache(softpipe->zsbuf_cache);
-
- softpipe->dirty_render_cache = FALSE;
- }
+ /* If this is a swapbuffers, just flush color buffers.
+ *
+ * The zbuffer changes are not discarded, but held in the cache
+ * in the hope that a later clear will wipe them out.
+ */
+ for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++)
+ if (softpipe->cbuf_cache[i])
+ sp_flush_tile_cache(softpipe->cbuf_cache[i]);
+
+ if (softpipe->zsbuf_cache)
+ sp_flush_tile_cache(softpipe->zsbuf_cache);
+
+ softpipe->dirty_render_cache = FALSE;
+
+ /* Need this call for hardware buffers before swapbuffers.
+ *
+ * there should probably be another/different flush-type function
+ * that's called before swapbuffers because we don't always want
+ * to unmap surfaces when flushing.
+ */
+ softpipe_unmap_transfers(softpipe);
/* Enable to dump BMPs of the color/depth buffers each frame */
#if 0
*fence = NULL;
}
+void
+softpipe_flush_wrapped( struct pipe_context *pipe,
+ struct pipe_fence_handle **fence )
+{
+ softpipe_flush(pipe, SP_FLUSH_TEXTURE_CACHE, fence);
+}
+
/**
* Flush context if necessary.
* disappear and the pipe driver should just ensure that all visible
* side-effects happen when they need to happen.
*/
- if (referenced & SP_REFERENCED_FOR_WRITE)
- flush_flags |= PIPE_FLUSH_RENDER_CACHE;
-
if (referenced & SP_REFERENCED_FOR_READ)
- flush_flags |= PIPE_FLUSH_TEXTURE_CACHE;
+ flush_flags |= SP_FLUSH_TEXTURE_CACHE;
if (cpu_access) {
/*
if (do_not_block)
return FALSE;
- pipe->flush(pipe, flush_flags, &fence);
+ softpipe_flush(pipe, flush_flags, &fence);
if (fence) {
/*
* Just flush.
*/
- pipe->flush(pipe, flush_flags, NULL);
+ softpipe_flush(pipe, flush_flags, NULL);
}
}
struct pipe_context;
struct pipe_fence_handle;
+#define SP_FLUSH_TEXTURE_CACHE 0x2
+
void
-softpipe_flush(struct pipe_context *pipe, unsigned flags,
+softpipe_flush(struct pipe_context *pipe,
+ unsigned flags,
struct pipe_fence_handle **fence);
+void
+softpipe_flush_wrapped( struct pipe_context *pipe,
+ struct pipe_fence_handle **fence );
+
boolean
softpipe_flush_resource(struct pipe_context *pipe,
struct pipe_resource *texture,
/* We're switching between SW and HW drawing. Do a flush to avoid
* mixing HW and SW rendering with the same vertex buffer.
*/
- pipe->flush(pipe, ~0, NULL);
+ pipe->flush(pipe, NULL);
svga->prev_draw_swtnl = svga->state.sw.need_swtnl;
}
static void svga_flush( struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence )
{
struct svga_context *svga = svga_context(pipe);
*/
svga_context_flush(svga, fence);
- SVGA_DBG(DEBUG_DMA|DEBUG_PERF, "%s flags %x fence_ptr %p\n",
- __FUNCTION__, flags, fence ? *fence : 0x0);
+ SVGA_DBG(DEBUG_DMA|DEBUG_PERF, "%s fence_ptr %p\n",
+ __FUNCTION__, fence ? *fence : 0x0);
/* Enable to dump BMPs of the color/depth buffers each frame */
if (0) {
- if (flags & PIPE_FLUSH_FRAME) {
- struct pipe_framebuffer_state *fb = &svga->curr.framebuffer;
- static unsigned frame_no = 1;
- char filename[256];
- unsigned i;
+ struct pipe_framebuffer_state *fb = &svga->curr.framebuffer;
+ static unsigned frame_no = 1;
+ char filename[256];
+ unsigned i;
- for (i = 0; i < fb->nr_cbufs; i++) {
- util_snprintf(filename, sizeof(filename), "cbuf%u_%04u", i, frame_no);
- debug_dump_surface_bmp(&svga->pipe, filename, fb->cbufs[i]);
- }
-
- if (0 && fb->zsbuf) {
- util_snprintf(filename, sizeof(filename), "zsbuf_%04u", frame_no);
- debug_dump_surface_bmp(&svga->pipe, filename, fb->zsbuf);
- }
+ for (i = 0; i < fb->nr_cbufs; i++) {
+ util_snprintf(filename, sizeof(filename), "cbuf%u_%04u", i, frame_no);
+ debug_dump_surface_bmp(&svga->pipe, filename, fb->cbufs[i]);
+ }
- ++frame_no;
+ if (0 && fb->zsbuf) {
+ util_snprintf(filename, sizeof(filename), "zsbuf_%04u", frame_no);
+ debug_dump_surface_bmp(&svga->pipe, filename, fb->zsbuf);
}
+
+ ++frame_no;
}
}
static INLINE void
trace_context_flush(struct pipe_context *_pipe,
- unsigned flags,
struct pipe_fence_handle **fence)
{
struct trace_context *tr_ctx = trace_context(_pipe);
trace_dump_call_begin("pipe_context", "flush");
trace_dump_arg(ptr, pipe);
- trace_dump_arg(uint, flags);
- pipe->flush(pipe, flags, fence);
+ pipe->flush(pipe, fence);
if(fence)
trace_dump_ret(ptr, *fence);
unsigned dstx, unsigned dsty,
unsigned width, unsigned height);
- /** Flush rendering
- * \param flags bitmask of PIPE_FLUSH_x tokens)
+ /** Flush draw commands
*/
void (*flush)( struct pipe_context *pipe,
- unsigned flags,
struct pipe_fence_handle **fence );
/**
#define PIPE_USAGE_STAGING 5 /* supports data transfers from the GPU to the CPU */
-/**
- * Flush types:
- */
-#define PIPE_FLUSH_RENDER_CACHE 0x1
-#define PIPE_FLUSH_TEXTURE_CACHE 0x2
-#define PIPE_FLUSH_SWAPBUFFERS 0x4
-#define PIPE_FLUSH_FRAME 0x8 /**< Mark the end of a frame */
-
-
/**
* Shaders
*/
ST_CONTEXT_RESOURCE_OPENVG_PARENT_IMAGE
};
+/**
+ * Flush flags.
+ */
+#define ST_FLUSH_FRONT (1 << 0)
+
/**
* Value to st_manager->get_param function.
*/
if(dst_surface)
pipe->surface_destroy(pipe, dst_surface);
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, 0);
+ pipe->flush(pipe, 0);
att = (db) ? NATIVE_ATTACHMENT_BACK_LEFT : NATIVE_ATTACHMENT_FRONT_LEFT;
if(!surface->present(surface, att, FALSE, 0))
virtual void STDMETHODCALLTYPE Flush(void)
{
SYNCHRONIZED;
- pipe->flush(pipe, PIPE_FLUSH_FRAME, 0);
+ pipe->flush(pipe, 0);
}
/* In Direct3D 10, if the reference count of an object drops to 0, it is automatically
if (--ctx->bind_count == 0) {
if (ctx->st == ctx->stapi->get_current(ctx->stapi)) {
- ctx->st->flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL);
stapi->make_current(stapi, NULL, NULL, NULL);
draw->context = NULL;
read->context = NULL;
struct st_context_iface *old_st = ctx->stapi->get_current(ctx->stapi);
if (old_st && old_st != ctx->st)
- old_st->flush(old_st, PIPE_FLUSH_RENDER_CACHE, NULL);
+ old_st->flush(old_st, ST_FLUSH_FRONT, NULL);
++ctx->bind_count;
ptex = drawable->textures[ST_ATTACHMENT_BACK_LEFT];
if (ptex) {
- ctx->st->flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL);
drisw_copy_to_front(dPriv, ptex);
}
old_gctx = egl_g3d_context(old_ctx);
if (old_gctx) {
/* flush old context */
- old_gctx->stctxi->flush(old_gctx->stctxi,
- PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, NULL);
+ old_gctx->stctxi->flush(old_gctx->stctxi, ST_FLUSH_FRONT, NULL);
}
if (gctx) {
/* flush if the surface is current */
if (gctx) {
- gctx->stctxi->flush(gctx->stctxi,
- PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, NULL);
+ gctx->stctxi->flush(gctx->stctxi, ST_FLUSH_FRONT, NULL);
}
return gsurf->native->present(gsurf->native,
/* flush if the surface is current */
if (ctx && ctx->DrawSurface == &gsurf->base) {
struct egl_g3d_context *gctx = egl_g3d_context(ctx);
- gctx->stctxi->flush(gctx->stctxi,
- PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, NULL);
+ gctx->stctxi->flush(gctx->stctxi, ST_FLUSH_FRONT, NULL);
}
pipe = ndpy_get_copy_context(gdpy->native);
u_box_origin_2d(ptex->width0, ptex->height0, &src_box);
pipe->resource_copy_region(pipe, ptex, 0, 0, 0, 0,
gsurf->render_texture, 0, &src_box);
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
+ pipe->flush(pipe, NULL);
nsurf->present(nsurf, NATIVE_ATTACHMENT_FRONT_LEFT, FALSE, 0);
pipe_resource_reference(&ptex, NULL);
struct pipe_screen *screen = gdpy->native->screen;
struct pipe_fence_handle *fence = NULL;
- gctx->stctxi->flush(gctx->stctxi,
- PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
+ gctx->stctxi->flush(gctx->stctxi, ST_FLUSH_FRONT, &fence);
if (fence) {
screen->fence_finish(screen, fence, PIPE_TIMEOUT_INFINITE);
screen->fence_reference(screen, &fence, NULL);
/* flush properly if the surface is bound */
if (gsurf->base.CurrentContext) {
gctx = egl_g3d_context(gsurf->base.CurrentContext);
- gctx->stctxi->flush(gctx->stctxi,
- PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, NULL);
+ gctx->stctxi->flush(gctx->stctxi, ST_FLUSH_FRONT, NULL);
}
gctx = egl_g3d_context(es1);
struct egl_g3d_context *gctx = egl_g3d_context(ctx);
if (gctx)
- gctx->stctxi->flush(gctx->stctxi, PIPE_FLUSH_RENDER_CACHE , NULL);
+ gctx->stctxi->flush(gctx->stctxi, ST_FLUSH_FRONT, NULL);
}
if (timeout) {
if (!pipe)
return FALSE;
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, &fence);
+ pipe->flush(pipe, &fence);
if (fence == NULL)
return FALSE;
XMesaContext xmctx = XMesaGetCurrentContext();
if (xmctx && xmctx->xm_buffer == b) {
- xmctx->st->flush( xmctx->st,
- PIPE_FLUSH_RENDER_CACHE |
- PIPE_FLUSH_SWAPBUFFERS |
- PIPE_FLUSH_FRAME,
- NULL);
+ xmctx->st->flush( xmctx->st, ST_FLUSH_FRONT, NULL);
}
xmesa_swap_st_framebuffer(b->stfb);
XMesaDisplay xmdpy = xmesa_init_display(c->xm_visual->display);
struct pipe_fence_handle *fence = NULL;
- c->st->flush(c->st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
+ c->st->flush(c->st, ST_FLUSH_FRONT, &fence);
if (fence) {
xmdpy->screen->fence_finish(xmdpy->screen, fence,
PIPE_TIMEOUT_INFINITE);
return;
pipe = ctx->pipe;
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
+ pipe->flush(pipe, NULL);
vg_manager_flush_frontbuffer(ctx);
}
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,
PIPE_TIMEOUT_INFINITE);
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);
}
return TRUE;
}
} else {
- curctx->st->flush(curctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
+ curctx->st->flush(curctx->st, ST_FLUSH_FRONT, NULL);
}
}
struct stw_context *ctx = stw_current_context();
if (ctx && ctx->current_framebuffer == fb) {
- ctx->st->flush(ctx->st,
- PIPE_FLUSH_RENDER_CACHE |
- PIPE_FLUSH_SWAPBUFFERS |
- PIPE_FLUSH_FRAME,
- NULL);
+ ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL);
}
}
/* pixmap glXWaitX */
if (pSrcBuffer->attachment == DRI2BufferFrontLeft &&
pDestBuffer->attachment == DRI2BufferFakeFrontLeft) {
- ms->ctx->flush(ms->ctx, PIPE_FLUSH_SWAPBUFFERS, NULL);
+ ms->ctx->flush(ms->ctx, NULL);
return;
}
/* pixmap glXWaitGL */
FreeScratchGC(gc);
- ms->ctx->flush(ms->ctx, PIPE_FLUSH_SWAPBUFFERS,
+ ms->ctx->flush(ms->ctx,
(pDestBuffer->attachment == DRI2BufferFrontLeft
&& ms->swapThrottling) ?
&dst_priv->fence : NULL);
if (ms->ctx) {
int j;
- ms->ctx->flush(ms->ctx, PIPE_FLUSH_RENDER_CACHE,
+ ms->ctx->flush(ms->ctx,
ms->dirtyThrottling ?
&ms->fence[XORG_NR_FENCES-1] :
NULL);
}
-void xorg_exa_flush(struct exa_context *exa, uint pipeFlushFlags,
+void xorg_exa_flush(struct exa_context *exa,
struct pipe_fence_handle **fence)
{
- exa->pipe->flush(exa->pipe, pipeFlushFlags, fence);
+ exa->pipe->flush(exa->pipe, fence);
}
void xorg_exa_finish(struct exa_context *exa)
{
struct pipe_fence_handle *fence = NULL;
- xorg_exa_flush(exa, PIPE_FLUSH_RENDER_CACHE, &fence);
+ xorg_exa_flush(exa, &fence);
exa->pipe->screen->fence_finish(exa->pipe->screen, fence,
PIPE_TIMEOUT_INFINITE);
struct pipe_surface *
xorg_gpu_surface(struct pipe_context *pipe, struct exa_pixmap_priv *priv);
-void xorg_exa_flush(struct exa_context *exa, uint pipeFlushFlags,
+void xorg_exa_flush(struct exa_context *exa,
struct pipe_fence_handle **fence);
void xorg_exa_finish(struct exa_context *exa);
float clear_color[4] = {1,0,1,1};
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
util_draw_arrays(ctx, PIPE_PRIM_TRIANGLES, 0, 3);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
else
util_draw_arrays(ctx, PIPE_PRIM_TRIANGLES, 0, 3);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
util_draw_arrays(ctx, PIPE_PRIM_QUADS, 0, 4);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
util_draw_arrays(ctx, PIPE_PRIM_QUADS, 0, 4);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
util_draw_arrays(ctx, PIPE_PRIM_POINTS, 0, 1);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
ctx->bind_fs_state(ctx, NULL);
ctx->delete_fs_state(ctx, fs);
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
util_draw_arrays(ctx, PIPE_PRIM_TRIANGLES, 0, 3);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
screen->flush_frontbuffer(screen, tex, 0, 0, window);
}
ctx->draw_vbo(ctx, &info);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
util_draw_arrays(ctx, PIPE_PRIM_TRIANGLES, 0, 3);
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
ctx->clear(ctx, PIPE_CLEAR_COLOR, clear_color, 0, 0);
util_draw_arrays(ctx, PIPE_PRIM_POINTS, 0, Elements(vertices));
- ctx->flush(ctx, PIPE_FLUSH_RENDER_CACHE, NULL);
+ ctx->flush(ctx, NULL);
graw_save_surface_to_file(ctx, surf, NULL);
4, /* verts */
2); /* attribs/vert */
- p->pipe->flush(p->pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
+ p->pipe->flush(p->pipe, NULL);
debug_dump_surface_bmp(p->pipe, "result.bmp", p->framebuffer.cbufs[0]);
}
3, /* verts */
2); /* attribs/vert */
- p->pipe->flush(p->pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
+ p->pipe->flush(p->pipe, NULL);
debug_dump_surface_bmp(p->pipe, "result.bmp", p->framebuffer.cbufs[0]);
}
return NULL;
}
if (ctx) {
- pctx->flush(pctx, 0, NULL);
+ pctx->flush(pctx, NULL);
}
}
pipe->transfer_unmap(pipe, wdt->transfer);
pipe->transfer_destroy(pipe, wdt->transfer);
- pipe->flush(pipe, 0, NULL);
+ pipe->flush(pipe, NULL);
wdt->transfer = NULL;
}
}
-void st_flush( struct st_context *st, uint pipeFlushFlags,
+void st_flush( struct st_context *st,
struct pipe_fence_handle **fence )
{
FLUSH_CURRENT(st->ctx, 0);
util_blit_flush(st->blit);
util_gen_mipmap_flush(st->gen_mipmap);
- st->pipe->flush( st->pipe, pipeFlushFlags, fence );
+ st->pipe->flush( st->pipe, fence );
}
{
struct pipe_fence_handle *fence = NULL;
- st_flush(st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
+ st_flush(st, &fence);
if(fence) {
st->pipe->screen->fence_finish(st->pipe->screen, fence,
* synchronization issues. Calling finish() here will just hide
* problems that need to be fixed elsewhere.
*/
- st_flush(st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, NULL);
+ st_flush(st, NULL);
if (is_front_buffer_dirty(st)) {
display_front_buffer(st);
st_init_flush_functions(struct dd_function_table *functions);
extern void
-st_flush(struct st_context *st, uint pipeFlushFlags,
+st_flush(struct st_context *st,
struct pipe_fence_handle **fence);
extern void
assert(condition == GL_SYNC_GPU_COMMANDS_COMPLETE && flags == 0);
assert(so->fence == NULL);
- pipe->flush(pipe, 0, &so->fence);
+ pipe->flush(pipe, &so->fence);
}
static void st_check_sync(struct gl_context *ctx, struct gl_sync_object *obj)
struct pipe_fence_handle **fence)
{
struct st_context *st = (struct st_context *) stctxi;
- st_flush(st, flags, fence);
- if (flags & PIPE_FLUSH_RENDER_CACHE)
+ st_flush(st, fence);
+ if (flags & ST_FLUSH_FRONT)
st_manager_flush_frontbuffer(st);
}