Name

    CHROMIUM_gpu_memory_buffer_image

Name Strings

    GL_CHROMIUM_gpu_memory_buffer_image

Version

    Last Modifed Date: Sep 29, 2014

Dependencies

    OpenGL ES 2.0 is required.

    GL_CHROMIUM_image is required.

Overview

    This extension provide a mechanism for creating a GpuMemoryBuffer
    backed image resource.

Issues

    None

New Tokens

    Accepted by the <usage> parameter of CreateGpuMemoryBufferImageCHROMIUM:

        READ_WRITE_CHROMIUM 0x78F2

    Accepted by the <param> parameter of GetImageivCHROMIUM:

        GL_GPU_MEMORY_BUFFER_ID 0x78FD

New Procedures and Functions

    GLuint CreateGpuMemoryBufferImageCHROMIUM(GLsizei width,
                                              GLsizei height,
                                              GLenum internalformat,
                                              GLenum usage)

    Create a GpuMemoryBuffer backed image with width equal to <width>
    and height equal to <height> and format equal to <internalformat>.

    Returns a unique identifier for the image that could be used in
    subsequent operations.

    INVALID_VALUE is generated if <width> or <height> is nonpositive.

    INVALID_ENUM is generated if <internalformat> is not one of
    RGB or RGBA.

    INVALID_ENUM is generated if <usage> is not READ_WRTIE_CHROMIUM.

    On OS X, driver bugs prevent the usage of memory buffers with RGB internal
    format. As a workaround, the created GpuMemoryBuffer will always have
    internal format RGBA. The caller is responsible for handling this
    appropriately. The only support provided by this extension is that calls
    that require parameter validation (such as copyTexImage2D and
    copyTexSubImage2D) will perform paramter validation as if the internal
    format were RGB.

    void GetImageivCHROMIUM(GLuint image_id, GLenum param, GLint* data)

    When the parameter GL_GPU_MEMORY_BUFFER_ID is passed as <param>, returns the
    id of the GpuMemoryBuffer associated with <image_id>. If the image does not
    exist, or is not associated with a GpuMemoryBuffer, returns -1.

Errors

    None.

New State

    None.

Revision History

    9/29/2014   Documented the extension.
    4/12/2016   Added details of OS X RGB workaround.
    5/25/2016   Added the GetImageivCHROMIUM function.
