Hash :
2a63b3f8
        
        Author :
  
        
        Date :
2016-02-08T12:29:08
        
      
Re-land "Implement EGL_experimental_present_path_angle" - Re-land with clang fix. This allows ANGLE to render directly onto a D3D swapchain in the correct orientation when using the D3D11 renderer. The trick is to add an extra uniform to each shader which takes either the value +1.0 or -1.0. When rendering to a texture, ANGLE sets this value to -1.0. When rendering to the default framebuffer, ANGLE sets this value to +1.0. ANGLE multiplies vertex positions by this value in the VS to invert rendering when appropriate. It also corrects other state (e.g. viewport/scissor rect) and shader built-in values (e.g. gl_FragCoord). This saves a substantial amount of GPU time and lowers power consumption. For example, the old method (where ANGLE renders all content onto an offscreen texture, and then copies/inverts this onto the swapchain at eglSwapBuffers() time) uses about 20% of the GPU each frame on a Lumia 630. Verification: + dEQP GL ES2 tests pass when "present path fast" is enabled + all ANGLE_end2end_tests pass when "present path fast" is enabled BUG=angleproject:1219 Change-Id: I56b339897828753a616d7bae837a2f354dba9c63 Reviewed-on: https://chromium-review.googlesource.com/326730 Tryjob-Request: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
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 96 97 98 99 100 101 102 103 104 105
Name
    ANGLE_experimental_present_path
Name Strings
    EGL_ANGLE_experimental_present_path
Contributors
    Austin Kinross
Contacts
    Austin Kinross (aukinros 'at' microsoft 'dot' com)
Status
    Experimental
Version
    Version 1, Jan 22 2016
Number
    EGL Extension #XXX
Extension Type
    EGL display extension
Dependencies
    Requires ANGLE_platform_angle_d3d.
    Written against the wording of EGL 1.4 as modified by
    ANGLE_platform_angle_d3d.
Overview
    This extension exposes an optimized, but potentially non-conformant,
    rendering path for ANGLE's D3D11 renderer on Windows.
New Types
    None
New Procedures and Functions
    None
New Tokens
    Accepted as an attribute name in the <attrib_list> argument of
    eglGetPlatformDisplayEXT:
        EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE      0x33A4
    Accepted as values for the EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE attribute:
        EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE 0x33A9
        EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE 0x33AA
Additions to the EGL Specification
    None.
New Behavior
    To request a display that enables this optimized rendering path,
    the value of EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE should be set to
    EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE. Setting this value may impact
    OpenGL ES conformance (see Issue 1 below).
    The only valid values for the attribute
    EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE are
    EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE and
    EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE. If any other value is specified
    then an EGL_BAD_ATTRIBUTE error is generated and EGL_NO_DISPLAY is
    returned.
    If a value for EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE is specified and
    EGL_PLATFORM_ANGLE_TYPE_ANGLE is not set to
    EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE then an EGL_BAD_ATTRIBUTE error is
    generated and EGL_NO_DISPLAY is returned.
	If the attribute EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE
    is unspecified then it is implicitly set to
    EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE.
Issues
    1) Does setting EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE to be
       EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE maintain OpenGL ES
       conformance?
       RESOLVED: Not necessarily, that is implementation-specific. Check then
       EGL_CONFORMANT attribute to see if the implementation supports any
       conformant EGL configs when EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE
       is specified.
Revision History
    Version 1, Jan 22 2016 (Austin Kinross)
      - Initial draft