mesa/src
Zhongmin Wu 13c23b19d0 egl: Allow creation of per surface out fence
Add plumbing to allow creation of per display surface out fence.

Currently enabled only on android, since the system expects a valid
fd in ANativeWindow::{queue,cancel}Buffer. We pass a fd of -1 with
which native applications such as flatland fail. The patch enables
explicit sync on android and fixes one of the functional issue for
apps or buffer consumers which depend upon fence and its timestamp.

v2: a) Also implement the fence in cancelBuffer.
    b) The last sync fence is stored in drawable object
       rather than brw context.
    c) format clear.

v3: a) Save the last fence fd in DRI Context object.
    b) Return the last fence if the batch buffer is empty and
       nothing to be flushed when _intel_batchbuffer_flush_fence
    c) Add the new interface in vbtl to set the retrieve fence

v3.1 a) close fd in the new vbtl interface on none Android platform

v4: a) The last fence is saved in brw context.
    b) The retrieve fd is for all the platform but not just Android
    c) Add a uniform dri2 interface to initialize the surface.

v4.1: a) make some changes of variable name.
      b) the patch is broken into two patches.

v4.2: a) Add a deinit interface for surface to clear the out fence

v5: a) Add enable_out_fence to init, platform sets it true or
       false
    b) Change get fd to update fd and check for fence
    c) Commit description updated

v6: a) Heading and commit description updated
    b) enable_out_fence is set only if fence is supported
    c) Review comments on function names
    d) Test with standalone patch, resolves the bug

v6.1: Check for old display fence reverted

v6.2: enable_out_fence initialized to false by default,
      dri2_surf_update_fence_fd updated, deinit changed to fini

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101655

Signed-off-by: Zhongmin Wu <zhongmin.wu@intel.com>
Signed-off-by: Yogesh Marathe <yogesh.marathe@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
2017-08-30 11:55:39 +01:00
..
amd radv: Add trace ids for secondary buffers. 2017-08-29 23:06:03 +02:00
broadcom broadcom/genxml: Add V3D 3.3 packet definitions. 2017-08-18 12:54:13 -07:00
compiler glsl: define YY_NO_INPUT to prevent unused symbol warnings 2017-08-29 15:20:57 -07:00
egl egl: Allow creation of per surface out fence 2017-08-30 11:55:39 +01:00
gallium winsys/amdgpu: add BO to the global list only when RADEON_ALL_BOS is set 2017-08-30 09:33:59 +02:00
gbm loader: rework xmlconfig dependency 2017-08-04 23:54:52 +01:00
getopt
glx mesa: Implement GL_ARB_texture_filter_anisotropic 2017-08-25 12:38:01 -04:00
gtest gtest: Update to 1.8.0. 2017-01-20 11:40:52 -08:00
hgl
intel anv: set right datatypes in anv_pipeline_binding 2017-08-30 08:01:53 +02:00
loader dri3: Move up fourcc utility function 2017-08-21 12:55:54 +01:00
mapi mapi/gen: remove shebang from the marshal generator scripts 2017-08-26 11:20:08 +01:00
mesa i965: Bump the initial program cache size from 4kB to 16kB. 2017-08-29 16:45:16 -07:00
util util: move string_to_uint_map to glsl 2017-08-29 13:40:44 +01:00
vulkan vulkan/util: Add a vk_zalloc helper 2017-08-28 18:35:33 -07:00
Makefile.am build: Convert git_sha1_gen script to Python (part2). 2017-08-01 16:33:55 +01:00
SConscript build: Convert git_sha1_gen script to Python. 2017-08-01 15:24:39 +01:00