summaryrefslogtreecommitdiffstats
path: root/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_get_multiple.txt
blob: 0a357007e8b2b85b04b6cb1eb6de12f6bb1cd36f (plain)
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
106
107
108
109
Name

    CHROMIUM_get_multiple

Name Strings

    GL_CHROMIUM_get_multiple

Version

    Last Modifed Date: July 22, 2011

Dependencies

    OpenGL ES 2.0 is required.

Overview

    This extension adds the ability to query multiple state and program
    information in a single call.

Issues


New Tokens

    None

New Procedures and Functions

    void GetMultipleIntegervCHROMIUM (const GLenum* pnames, GLuint count,
                                      GLint* results, GLsizeiptr size)

    <pnames> points to an array of state enums that would normally be queried by
    GetIntegerv. <count> is the number of pnames. <results> points memory large
    enough to contain all the state being queried. <size> is the size of the
    buffer pointed to be <results>

    Example: <pnames> points to an array with VIEWPORT and MAX_TEXTURE_SIZE.
    VIEWPORT returns 4 values, MAX_TEXTURE_SIZE returns 1 value. Therefore
    results must point to a buffer of size 5 * sizeof(GLint) and size must be at
    least 5 * sizeof(GLint)

    INVALID_ENUM is generated if any of the pnames are not valid for GetIntegerv

    INVALID_VALUE is generated if <size> does not equal the size needed for the
    query

    INVALID_VALUE is generated if the memory pointed to be <results> has not
    been zeroed out.

    void GetProgrmaInfoCHROMIUM (GLuint program, GLsizei bufsize,
                                 GLsizei* size, void* info)

    <program> is the program to query. <bufsize> is the size of the buffer to
    hold the results. <size> is a pointer to a GLsizei to store the size needed
    to hold the results. <info> is a pointer to memory to store the result.

    To query the space needed for the results set <info> to NULL.

    The format of the data that will be stored in the memory pointed to by
    <info> is as follows.

        struct ProgramInfoHeader {
          uint32 link_status;  // same as GetProgramiv called with LINK_STATUS
          uint32 num_attribs;  // the number of active attributes
          uint32 num_uniforms;  // the number of active uniforms
          ProgramInput inputs[num_attribs + num_uniforms];
        }

        // The data for one attrib or uniform from GetProgramInfoCHROMIUM.
        struct ProgramInput {
          uint32 type;             // The type (GL_VEC3, GL_SAMPLER_2D, etc.
          int32 size;              // The size (size of array for uniforms)
          uint32 location_offset;  // offset from ProgramInfoHeader to 'size'
                                   // locations for uniforms, 1 for attribs.
          uint32 name_offset;      // offset from ProgrmaInfoHeader to start of
                                   // name.
          uint32 name_length;      // length of the name.
        };

    It is important to note that for attribs, size is the size of the attrib and
    location_offset points to a single location. For uniforms, size is the
    number of array elements and location_offset points to an array of size
    locations, one of each element of the array.

    INVALID_VALUE is generated if <bufsize> is less than 0

    INVALID_VALUE is generated if <size> is NULL

    INVALID_OPERATION is returned if <size> is less than the size needed to hold
    all the results.


    NOTE: This function is not intended to be used directly. Chromium uses it
    internally to cache data.


Errors

    None.

New State

    None.

Revision History

    7/22/2011    Documented the extension