[Mesa-dev] [PATCH 1/2] gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flag

Brian Paul brianp at vmware.com
Wed Jan 2 12:07:33 PST 2013


On 12/21/2012 09:23 AM, Marek Olšák wrote:
> Usage with pipe_context:
>    pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME);
>
> Usage with st_context_iface:
>    st->flush(st, ST_FLUSH_END_OF_FRAME, NULL);
>
> The flag is only a hint for drivers. Radeon will use it for buffer eviction
> heuristics in the kernel (e.g. for queries like how many frames have passed
> since a buffer was used).
>
> The flag is currently only generated by st/dri on SwapBuffers.
> ---
>   src/gallium/drivers/galahad/glhd_context.c                |    6 +++---
>   src/gallium/drivers/i915/i915_flush.c                     |    3 ++-
>   src/gallium/drivers/i915/i915_resource_texture.c          |    4 ++--
>   src/gallium/drivers/identity/id_context.c                 |    6 +++---
>   src/gallium/drivers/llvmpipe/lp_context.c                 |    3 ++-
>   src/gallium/drivers/noop/noop_pipe.c                      |    3 ++-
>   src/gallium/drivers/nv30/nv30_context.c                   |    3 ++-
>   src/gallium/drivers/nv50/nv50_context.c                   |    3 ++-
>   src/gallium/drivers/nvc0/nvc0_context.c                   |    3 ++-
>   src/gallium/drivers/r300/r300_flush.c                     |    3 ++-
>   src/gallium/drivers/r600/r600_pipe.c                      |    3 ++-
>   src/gallium/drivers/radeonsi/radeonsi_pipe.c              |    3 ++-
>   src/gallium/drivers/rbug/rbug_context.c                   |    6 +++---
>   src/gallium/drivers/rbug/rbug_core.c                      |    2 +-
>   src/gallium/drivers/softpipe/sp_flush.c                   |    5 +++--
>   src/gallium/drivers/softpipe/sp_flush.h                   |    5 +++--
>   src/gallium/drivers/svga/svga_pipe_flush.c                |    3 ++-
>   src/gallium/drivers/trace/tr_context.c                    |    6 ++++--
>   src/gallium/include/pipe/p_context.h                      |    6 ++++--
>   src/gallium/include/pipe/p_defines.h                      |    6 ++++++
>   src/gallium/include/state_tracker/st_api.h                |    1 +
>   src/gallium/state_trackers/clover/core/queue.cpp          |    2 +-
>   src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp |    2 +-
>   src/gallium/state_trackers/dri/common/dri_drawable.c      |    2 ++
>   src/gallium/state_trackers/dri/drm/dri2.c                 |    2 +-
>   src/gallium/state_trackers/egl/android/native_android.cpp |    2 +-
>   src/gallium/state_trackers/egl/common/native_helper.c     |    4 ++--
>   src/gallium/state_trackers/vdpau/presentation.c           |    2 +-
>   src/gallium/state_trackers/vdpau/surface.c                |    2 +-
>   src/gallium/state_trackers/vega/api_context.c             |    4 ++--
>   src/gallium/state_trackers/vega/vg_manager.c              |    8 +++++++-
>   src/gallium/state_trackers/xa/xa_composite.c              |    2 +-
>   src/gallium/state_trackers/xa/xa_context.c                |    8 ++++----
>   src/gallium/state_trackers/xa/xa_tracker.c                |    2 +-
>   src/gallium/state_trackers/xa/xa_yuv.c                    |    2 +-
>   src/gallium/state_trackers/xorg/xorg_crtc.c               |    2 +-
>   src/gallium/state_trackers/xorg/xorg_dri2.c               |    4 ++--
>   src/gallium/state_trackers/xorg/xorg_driver.c             |    2 +-
>   src/gallium/state_trackers/xorg/xorg_exa.c                |    2 +-
>   src/gallium/state_trackers/xvmc/surface.c                 |    2 +-
>   src/gallium/tests/graw/clear.c                            |    2 +-
>   src/gallium/tests/graw/fs-fragcoord.c                     |    2 +-
>   src/gallium/tests/graw/fs-frontface.c                     |    2 +-
>   src/gallium/tests/graw/fs-test.c                          |    2 +-
>   src/gallium/tests/graw/fs-write-z.c                       |    2 +-
>   src/gallium/tests/graw/gs-test.c                          |    2 +-
>   src/gallium/tests/graw/occlusion-query.c                  |    2 +-
>   src/gallium/tests/graw/quad-sample.c                      |    2 +-
>   src/gallium/tests/graw/quad-tex.c                         |    2 +-
>   src/gallium/tests/graw/shader-leak.c                      |    2 +-
>   src/gallium/tests/graw/tex-srgb.c                         |    2 +-
>   src/gallium/tests/graw/tex-swizzle.c                      |    2 +-
>   src/gallium/tests/graw/tri-gs.c                           |    2 +-
>   src/gallium/tests/graw/tri-instanced.c                    |    2 +-
>   src/gallium/tests/graw/tri.c                              |    2 +-
>   src/gallium/tests/graw/vs-test.c                          |    2 +-
>   src/gallium/tests/trivial/quad-tex.c                      |    2 +-
>   src/gallium/tests/trivial/tri.c                           |    2 +-
>   src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c         |    2 +-
>   src/mesa/state_tracker/st_cb_flush.c                      |   11 ++++++-----
>   src/mesa/state_tracker/st_cb_flush.h                      |    3 ++-
>   src/mesa/state_tracker/st_cb_syncobj.c                    |    2 +-
>   src/mesa/state_tracker/st_manager.c                       |    8 +++++++-
>   63 files changed, 120 insertions(+), 81 deletions(-)
>

Looks OK to me.

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list