Draft proposal for OES_fbo_color_attachments

I’m proposing to add this extension to enable multi render targets which already have partial support on mobiles and are supported by many Desktop machines.

Analysis of data found on http://glbenchmarks.com has shown that at least 3 extensions exist in the wild which would enable multiple framebuffer color attachments:

[ul]
[li] GL_ARB_draw_buffers (supported by 51 devices): Acer Picasso, Motorola MB860 ATRIX 4G, Dell Streak 10 Pro, Samsung SHW-M380S Galaxy Tab 10.1 3G, LG P999, Lenovo IdeaPad Tablet K1, Sony NW-Z1000, Acer Iconia Tab A200, Dell Streak 7, Toshiba AC100 Dynabook AZ, Samsung GT-P7501 Galaxy Tab 10.1N, LG P990 Optimus 2X, Motorola MB855 Photon, Sony Tablet S, Acer Iconia Tab A500, Lenovo ThinkPad Tablet, LG V901, Acer Iconia Tab A100, Samsung GT-P7500, Motorola Electrify, Motorola Xoom, Samsung GT-I9103, Sony Tablet P, LG V909, K-Touch W700, Samsung SGH-927R Galaxy S Glide, Samsung GT-P7310, Toshiba AT100, Samsung SCH-I905, Motorola MZ505, Motorola Droid X2, Motorola XT882, Notion Ink Adam, Toshiba Thrive 7 (AT1S0), LG LU6500, LG SU660 Star Dop, Motorola MT870, Acer Iconia Tab A101, ViewSonic G Tablet, Samsung GT-P7300, Asus Eee Pad Transformer TF101, Hisense M1101AS, Malata Zpad, Motorola MZ604, Motorola MZ601, Acer Iconia Tab A501, Asus Eee Pad Slider SL101, Medion LifeTab P9514, Samsung GT-P7510 Galaxy Tab, Acer G100W, LG Optimus Pad[/li][/:m:xaapcu22]
[li] GL_NV_draw_buffers (supported by 6 devices): Lenovo LePad K2, Acer Iconia Tab A200, Asus Eee Pad Transformer Prime TF201, Acer Iconia Tab A510, Acer A700 (picasso 2)[/li][/
:m:xaapcu22]
[li] GL_NV_fbo_color_attachments (supported by 56 devices): Acer Picasso, Motorola MB860 ATRIX 4G, Lenovo LePad K2, Dell Streak 10 Pro, Samsung SHW-M380S Galaxy Tab 10.1 3G, LG P999, Lenovo IdeaPad Tablet K1, Sony NW-Z1000, Acer Iconia Tab A200, Dell Streak 7, Toshiba AC100 Dynabook AZ, Samsung GT-P7501 Galaxy Tab 10.1N, LG P990 Optimus 2X, Motorola MB855 Photon, Sony Tablet S, Acer Iconia Tab A500, Lenovo ThinkPad Tablet, LG V901, Acer Iconia Tab A100, Samsung GT-P7500, Motorola Electrify, Motorola Xoom, Samsung GT-I9103, Sony Tablet P, Asus Eee Pad Transformer Prime TF201, Acer Iconia Tab A510, LG V909, K-Touch W700, Samsung SGH-927R Galaxy S Glide, Samsung GT-P7310, Acer A700 (picasso 2), Toshiba AT100, Samsung SCH-I905, Motorola MZ505, Motorola Droid X2, Motorola XT882, Notion Ink Adam, Toshiba Thrive 7 (AT1S0), LG LU6500, LG SU660 Star Dop, Motorola MT870, Acer Iconia Tab A101, ViewSonic G Tablet, Samsung GT-P7300, Asus Eee Pad Transformer TF101, Hisense M1101AS, Malata Zpad, Motorola MZ604, Motorola MZ601, Acer Iconia Tab A501, Asus Eee Pad Slider SL101, Medion LifeTab P9514, Samsung GT-P7510 Galaxy Tab, Acer G100W, LG Optimus Pad[/*:m:xaapcu22][/ul][/li]

Name

    OES_fbo_color_attachments

Name Strings

    GL_OES_fbo_color_attachments

Contact

Contributors

Status

    Draft.

Version

    Last Modified Date: January 29, 2012

Number

    OpenGL ES Extension #xx

Dependencies

    Written against the OpenGL ES 2.0 Specification and the OpenGL ES
    Shader Language 1.0.14 Specification.

Overview

    This extension extends OpenGL ES 2.0 to allow multiple output
    colors, and provides a mechanism for directing those outputs to
    multiple color buffers.

    This extension mirrors common functionality provided by:
      - GL ARB_framebuffer_object
      - GL ARB_draw_buffers
      - ES NV_draw_buffers
      - ES NV_fbo_color_attachment

IP Status

    No known IP issues.

New Procedures and Functions

    None.

New Tokens

    Accepted by the <value> parameter of GetIntegerv:

        MAX_COLOR_ATTACHMENTS                    0x8CDF

    Accepted by the <attachment> parameter of
    FramebufferTexture{1D|2D|3D}, FramebufferRenderbuffer, and
    GetFramebufferAttachmentParameteriv

        COLOR_ATTACHMENT0                        0x8CE0
        COLOR_ATTACHMENT1                        0x8CE1
        COLOR_ATTACHMENT2                        0x8CE2
        COLOR_ATTACHMENT3                        0x8CE3
        COLOR_ATTACHMENT4                        0x8CE4
        COLOR_ATTACHMENT5                        0x8CE5
        COLOR_ATTACHMENT6                        0x8CE6
        COLOR_ATTACHMENT7                        0x8CE7
        COLOR_ATTACHMENT8                        0x8CE8
        COLOR_ATTACHMENT9                        0x8CE9
        COLOR_ATTACHMENT10                       0x8CEA
        COLOR_ATTACHMENT11                       0x8CEB
        COLOR_ATTACHMENT12                       0x8CEC
        COLOR_ATTACHMENT13                       0x8CED
        COLOR_ATTACHMENT14                       0x8CEE
        COLOR_ATTACHMENT15                       0x8CEF

Changes to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)

    The OpenGL ES Shading Language specification describes the values
    that may be output by a fragment shader. These are gl_FragColor and
    gl_FragData[[n]].  The final fragment color values or the final
    fragment data values written by a fragment shader are clamped to the
    range [0, 1] and then converted to fixed-point as described in
    section 2.1.2 for framebuffer color components.

    Writing to gl_FragColor specifies the fragment color (color number
    zero) that will be used by subsequent stages of the pipeline.
    Writing to gl_FragData[n] specifies the value of fragment color
    number n. Any colors, or color components, associated with a
    fragment that are not written by the fragment shader are undefined.
    A fragment shader may not statically assign values to both
    gl_FragColor and gl_FragData. In this case, a compile or link error
    will result. A shader statically assigns a value to a variable if,
    after preprocessing, it contains a statement that would write to the
    variable, whether or not run-time flow of control will cause that
    statement to be executed.

Changes to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment Operations and the Framebuffer)

    Replace the second paragraph of Section 4.4.1 (Binding and Managing
    Framebuffer Objects) with the following:

    The namespace for framebuffer objects is the unsigned integers, with
    zero reserved by OpenGL ES to refer to the default framebuffer. A
    framebuffer object is created by binding an unused name to the
    target FRAMEBUFFER. The binding is effected by calling

        void BindFramebuffer(enum target, uint framebuffer);

    with target set to FRAMEBUFFER and framebuffer set to the unused
    name.  The resulting framebuffer object is a new state vector. There
    is a number of color attachment points, plus one each for the depth
    and stencil attachment points. The number of color attachment points
    is equal to the state of MAX_COLOR_ATTACHMENTS.

New Implementation Dependent State

    Add to Table 6.18 (Implementation Dependent Values)

    Get value                Type Get Cmnd    Minimum Value Description             Sec.
    ------------------------ ---- ----------- ------------- -----------             -----
    MAX_COLOR_ATTACHMENTS    Z+   GetIntegerv 1             Number of framebuffer   4.4.1
                                                            color attachment points

Issues

    None

Revision History

    Rev.    Date      Author       Changes
    ----   --------   ---------    ------------------------------------
     1     01/29/12   boesch      First revision based on
                                   ARB_draw_buffers and ARB_framebuffer_object

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.