Hash :
aa2a558e
        
        Author :
  
        
        Date :
2022-08-23T09:47:02
        
      
Vulkan: Add support for setting timestamp surface attribute On Android the EGL wrapper handles most of the functionality required by EGL_ANDROID_get_frame_timestamps. However if for some reason the swapchain is recreated, the timestamp state would be lost resulting in stuttering. Introduce EGL_ANGLE_timestamp_surface_attribute extension that adds support for toggling the EGL_TIMESTAMPS_ANDROID attribute of a surface. Cache this state and recreate the swapchain accordingly. Bug: angleproject:7489 Test: EGLSurfaceTest.TimestampSurfaceAttribute* Test: dEQP-EGL.functional.get_frame_timestamps* Change-Id: I3660f7137c006d904164d243a682a4ff520eabd8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3753396 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
Name
    ANGLE_timestamp_surface_attribute
Name Strings
    EGL_ANGLE_timestamp_surface_attribute
Contributors
    Mohan Maiya
    Ian Elliot
Contacts
    Mohan Maiya, Samsung (m.maiya 'at' samsung 'dot' com)
Notice
    Copyright (c) 2022 The Khronos Group Inc. Copyright terms at
        http://www.khronos.org/registry/speccopyright.html
Status
    Draft.
Version
    Version 1, July 12, 2022
Number
    EGL Extension ###
Dependencies
    Requires support for EGL_ANDROID_get_frame_timestamps extension.
    Refer to EGL_ANDROID_get_frame_timestamps specification for other
    dependencies.
Overview
    On Android most of the functionality required by EGL_ANDROID_get_frame_timestamps
    is handled by a wrapper outside of the EGL driver. However it is necessary
    to be aware of EGL_TIMESTAMPS_ANDROID state on some drivers
    (like ANGLE, which layers GLES APIs over Vulkan, which needs this information
    to setup Vulkan swapchains appropriately).
    This extension allows ANGLE's EGL implementation to rely on the Android EGL
    loader to support and implement the EGL_ANDROID_get_frame_timestamps extension,
    with the exception that ANGLE's EGL implementation will support caching
    EGL_TIMESTAMPS_ANDROID state.
    For details about EGL_TIMESTAMPS_ANDROID and other timestamp related terminology
    please refer to the EGL_ANDROID_get_frame_timestamps specification.
New Types
    None.
New Procedures and Functions
    None.
New Tokens
    None.
For clarity, restating the section of EGL_ANDROID_get_frame_timestamps specification
that will be supported by this extension:
Add to the list of supported tokens for eglSurfaceAttrib in section 3.5.6
"Surface Attributes", page 43:
    If attribute is EGL_TIMESTAMPS_ANDROID, then values specifies whether to
    enable/disable timestamp collection for this surface. A value of EGL_TRUE
    enables timestamp collection, while a value of EGL_FALSE disables it. The
    initial value is false. If surface is not a window surface this has no
    effect.
Issues
    None.
Revision History
    #2 - (August 23, 2022) Mohan Maiya
         Added language to clarify that the extension will require support,
         from an external module, of the EGL_ANDROID_get_frame_timestamps
         extension for the most part with the exception of providing support
         for caching EGL_TIMESTAMPS_ANDROID state.
    #1 - (July 12, 2022) Mohan Maiya
         Original draft