xref: /aosp_15_r20/external/angle/extensions/ANGLE_texture_multisample.txt (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1Name
2
3    ANGLE_texture_multisample
4
5Name Strings
6
7    GL_ANGLE_texture_multisample
8
9Contributors
10
11    Yunchao He, Intel Corporation
12    Yizhou Jiang, Intel Corporation
13    Contributors to the OpenGL ES 3.1, GLSL ES 3.1, and ARB_texture_multisample
14
15Contact
16
17    Yunchao He (yunchao.he 'at' intel.com)
18
19Status
20
21    Incomplete
22
23Version
24
25    Last Modified Date: August 27, 2018
26    Author Revision: 1
27
28Number
29
30    OpenGL ES Extension XX
31
32Dependencies
33
34    OpenGL ES 3.0 is required.
35
36    This extension is written against the OpenGL ES 3.0.5 and OpenGL ES
37    Shading Language 3.0 (Document Revision 6) specifications.
38
39    KHR_robustness affects the behavior of this specification.
40
41    ANGLE_get_tex_level_parameter affects the behavior of this specification.
42
43Overview
44
45    This extension provides support for a new type of texture -
46    two-dimensional multisample textures - as well as mechanisms to
47    allocate storage and attach such textures to FBOs for rendering.
48    It also add supports using such textures in a shader, fetching specific
49    samples from such textures in a shader, and querying the dimensions of
50    such textures in a shader.
51
52    This extension also includes the following functionality, some of which
53    was first described in NV_explicit_multisample:
54
55     * An API to query the location of samples within the pixel
56
57     * An explicit control for the multisample sample mask to augment the
58       control provided by SampleCoverage
59
60     * A mechanism to support the SAMPLE_MASK capability
61
62     * A mechanism to return corresponding types for multisample textures when
63       the uniform type is queried by getActiveUniform
64
65    This extension does not expose multisampled 2D array textures, because they
66    are not supported in OpenGL ES 3.1.
67
68IP Status
69
70    No known IP claims.
71
72New Procedures and Functions
73
74    void TexStorage2DMultisampleANGLE(enum target,
75                                      sizei samples,
76                                      enum sizedinternalformat,
77                                      sizei width,
78                                      sizei height,
79                                      boolean fixedsamplelocations);
80
81    void GetMultisamplefvANGLE(enum pname, uint index, float *val);
82
83    void SampleMaskiANGLE(uint maskNumber, bitfield mask);
84
85New Tokens
86
87    Accepted by the <target> parameter of BindTexture,
88    TexStorage2DMultisampleANGLE, GetInternalformativ, TexParameter{if}*,
89    GetTexParameter{if}v, GetTexLevelParameter{if}vANGLE and
90    by the <textarget> parameter of FramebufferTexture2D:
91
92        TEXTURE_2D_MULTISAMPLE_ANGLE                      0x9100
93
94    Accepted by the <pname> parameter of GetMultisamplefvANGLE:
95
96        SAMPLE_POSITION_ANGLE                             0x8E50
97
98    Accepted by the <cap> parameter of Enable, Disable, and IsEnabled:
99
100        SAMPLE_MASK_ANGLE                                 0x8E51
101
102    Accepted by the <target> parameter of GetIntegeri_v:
103
104        SAMPLE_MASK_VALUE_ANGLE                           0x8E52
105
106    Accepted by the <pname> parameter of GetIntegerv:
107
108        MAX_SAMPLE_MASK_WORDS_ANGLE                       0x8E59
109        MAX_COLOR_TEXTURE_SAMPLES_ANGLE                   0x910E
110        MAX_DEPTH_TEXTURE_SAMPLES_ANGLE                   0x910F
111        MAX_INTEGER_SAMPLES_ANGLE                         0x9110
112        TEXTURE_BINDING_2D_MULTISAMPLE_ANGLE              0x9104
113
114    Accepted by the <pname> parameter of GetTexLevelParameter{if}vANGLE:
115
116        TEXTURE_SAMPLES_ANGLE                             0x9106
117        TEXTURE_FIXED_SAMPLE_LOCATIONS_ANGLE              0x9107
118
119    Returned by the <type> parameter of GetActiveUniform:
120
121        SAMPLER_2D_MULTISAMPLE_ANGLE                      0x9108
122        INT_SAMPLER_2D_MULTISAMPLE_ANGLE                  0x9109
123        UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ANGLE         0x910A
124
125Additions to Chapter 2 of the OpenGL ES 3.0.5 Specification (OpenGL ES
126Operation)
127
128    Add to table 2.10 "OpenGL ES Shading Language type tokens" page 64:
129
130    Type Name Token                                       Keyword
131    -----------------------------------------             ------------
132    SAMPLER_2D_MULTISAMPLE_ANGLE                          sampler2DMS
133    INT_SAMPLER_2D_MULTISAMPLE_ANGLE                      isampler2DMS
134    UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ANGLE             usampler2DMS
135
136    Add to section 2.12.9, after subsection "Texel Fetches":
137
138    Multisample Texel Fetches
139
140    Multisample buffers do not have mipmaps, and there is no level of
141    detail parameter for multisample texel fetches. Instead, an integer
142    parameter selects the sample number to be fetched from the buffer.
143    The number identifying the sample is the same as the value used to
144    query the sample location using GetMultisamplefvANGLE. Multisample
145    textures are not filtered when samples are fetched, and filter state
146    is ignored.
147
148    If the context was created with robust buffer access enabled, the result
149    of the texel fetch in the following cases is zero. If robust buffer
150    access is not enabled, the result of the texel fetch is undefined if
151    any of the following conditions hold:
152
153    * the texel coordinate (i, j) refer to a texel outside the extents
154      of the multisample texture image, where any of
155                  i < 0           i >= W
156                  j < 0           j >= H
157      and the size parameter W and H refer to the width and height of
158      the image.
159
160    * the specified sample number does not exist (is negative, or greater
161      than or equal to the number of samples in the texture).
162
163    Additionally, these fetches may only be performed on a multisample
164    texture sampler. No other sample or fetch commands may be performed
165    on a multisample texture sampler.
166
167Additions to Chapter 3 of the OpenGL ES 3.0.5 Specification (Rasterization)
168
169    Insert into section 3.3, "Multisampling" after the discussion of
170    the query for SAMPLES:
171
172    (..., and is queried by calling GetIntegerv with pname set to SAMPLES.)
173
174    The location at which shading is performed for a given sample (the
175    shading sample location) is queried with the command
176
177        void GetMultisamplefvANGLE(enum pname, uint index, float *val);
178
179    <pname> must be SAMPLE_POSITION_ANGLE, and <index> corresponds to the
180    sample for which the location should be returned. The shading sample
181    location (x, y) is returned as two floating-point values in (val[0],
182    val[1]) respectively. x and y each lie in the range [0, 1] and
183    represent a location in pixel space at which depth and associated
184    data for that sample are evaluated for a fragment (e.g. where sample
185    shading is performed). (0.5, 0.5) thus corresponds to the pixel center.
186    If the multisample mode does not have fixed sample locations, the returned
187    values may only reflect the locations of samples within some pixels.
188
189    An INVALID_ENUM error is generated if <pname> is not SAMPLE_LOCATION.
190    An INVALID_VALUE error is generated if <index> is greater than or equal to
191    the value of SAMPLES.
192
193    Modify Section 3.8.1, "Texture Objects":
194
195    (modify first paragraph of section, p. 122, simply adding
196     references to multisample textures)
197
198    Textures in GL are represented by named objects. The name space for texture
199    objects is the unsigned integers, with zero reserved by the GL to represent
200    the default texture object. The default texture object is bound to each of
201    the TEXTURE_2D, TEXTURE_3D, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP, and
202    TEXTURE_2D_MULTISAMPLE_ANGLE targets during context initialization.
203
204    (modify the last paragraph, p. 123)
205
206    The texture object name space, including the initial two- and
207    three-dimensional, two-dimensional array, cube map, and two-dimensional
208    multisample texture objects, is shared among all texture units. A texture
209    object may be bound to more than one texture unit simultaneously. After a
210    texture object is bound, any GL operations on that target object affect
211    any other texture units to which the same texture object is bound.
212
213    Modify Section 3.8.3, "Texture Image Specification" (p. 134):
214
215    (add the new target to MAX_TEXTURE_SIZE description)
216
217    In a similar fashion, the maximum allowable width of a texel array
218    for a two-dimensional texture, two-dimensional array texture,
219    or two-dimensional multisample texture, and the maximum allowable
220    height of a two-dimensional texture, two-dimensional array texture,
221    or two-dimensional multisample texture, must be at least 2^(k-lod)
222    for image arrays of level 0 through k, where k is the log base 2 of
223    MAX_TEXTURE_SIZE.
224
225    Insert new Section 3.8.5, "Multisample Textures". Renumber subsequent
226    sections:
227
228    In addition to the texture types described in previous sections, an
229    additional type of texture is supported. A multisample texture is
230    similar to a two-dimensional texture, except it contains multiple
231    samples per texel. Multisample textures do not have multiple image
232    levels, and are immutable.
233
234    The command
235
236        void TexStorage2DMultisampleANGLE(enum target, sizei samples,
237                                   int sizedinternalformat,
238                                   sizei width, sizei height,
239                                   boolean fixedsamplelocations);
240
241    establishes the data storage, format, dimensions, and number of samples
242    of a multisample texture's image. <target> must be
243    TEXTURE_2D_MULTISAMPLE_ANGLE. <width> and <height> are the dimensions
244    in texels of the texture.
245
246    <samples> represents a request for a desired minimum number of samples.
247    Since different implementations may support different sample counts for
248    multisampled textures, the actual number of samples allocated for the
249    texture image is implementation-dependent. However, the resulting value
250    for TEXTURE_SAMPLES_ANGLE is guaranteed to be greater than or equal to
251    <samples> and no more than the next larger sample count supported by the
252    implementation.
253
254    If <fixedsamplelocations> is TRUE, the image will use identical sample
255    locations and the same number of samples for all texels in the image,
256    and the sample locations will not depend on the sizedinternalformat or
257    size of the image.
258
259    Upon success, TexStorage2DMultisampleANGLE deletes any existing image
260    for <target> and the contents of texels are undefined. The values of
261    TEXTURE_WIDTH_ANGLE, TEXTURE_HEIGHT_ANGLE, TEXTURE_SAMPLES_ANGLE,
262    TEXTURE_INTERNAL_FORMAT_ANGLE, and TEXTURE_FIXED_SAMPLE_LOCATIONS_ANGLE are
263    set to <width>, <height>, the actual number of samples allocated,
264    <sizedinternalformat>, and <fixedsamplelocations> respectively.
265
266    When a multisample texture is accessed in a shader, the access takes one
267    vector of integers describing which texel to fetch and an integer
268    corresponding to the sample numbers described in section 3.3 describing
269    which sample within the texel to fetch. No standard sampling instructions
270    are allowed on the multisample texture targets, and no filtering is
271    performed by the fetch. Fetching a sample number less than zero, or
272    greater than or equal to the number of samples in the texture, produces
273    undefined results.
274
275    An INVALID_ENUM error is generated if target is not
276    TEXTURE_2D_MULTISAMPLE_ANGLE.
277    An INVALID_OPERATION error is generated if zero is bound to <target>.
278    An INVALID_VALUE is generated if <width> or <height> is less than 1.
279    An INVALID_VALUE is generated if <width> or <height> is greater than
280    the value of MAX_TEXTURE_SIZE.
281    An INVALID_VALUE is generated if samples is zero.
282    An INVALID_ENUM error is generated if <sizedinternalformat> is not
283    color-renderable, depth-renderable, or stencil-renderable (as defined
284    in section 4.4.4).
285    An INVALID_ENUM error is generated if <sizedinternalformat> is one of the
286    unsized base internal formats listed in table 3.11.
287    An INVALID_OPERATION is generated if <samples> is greater than the maximum
288    number of samples supported for this <target> and <sizedinternalformat>,
289    The maximum number of samples supported can be determined by calling
290    GetInternalformativ with a <pname> of SAMPLES (see section 6.1.15).
291    An INVALID_OPERATION is generated if the value of TEXTURE_IMMUTABLE_FORMAT
292    for the texture currently bound to <target> on the active texture unit is
293    TRUE.
294    An OUT_OF_MEMORY error is generated if the GL is unable to create a texture
295    image of the requested size.
296
297    Modify Section 3.8.7, "Texture Parameters":
298
299    (add TEXTURE_2D_MULTISAMPLE_ANGLE to the texture targets accepted by
300    TexParameter*)
301
302    <target> is the target, either TEXTURE_2D, TEXTURE_3D, TEXTURE_2D_ARRAY,
303    TEXTURE_CUBE_MAP, or TEXTURE_2D_MULTISAMPLE_ANGLE.
304
305    Add the following paragraph to the end of Section 3.8.7:
306
307    An INVALID_ENUM is generated if <target> is TEXTURE_2D_MULTISAMPLE_ANGLE
308    and <pname> is any sampler state from table 6.10. An INVALID_OPERATION
309    error is generated if <target> is TEXTURE_2D_MULTISAMPLE_ANGLE, and
310    <pname> TEXTURE_BASE_LEVEL is set to any value other than zero.
311
312    Modify Section 3.8.14, "Texture State" (p. 162):
313
314    (... the compressed flag set to FALSE, and a zero compressed size).
315
316    Multisample textures also contain an integer identifying the number of
317    samples in each texel, and a boolean indicating whether identical sample
318    locations and number of samples will be used for all texels in the image.
319
320Additions to Chapter 4 of the OpenGL ES 3.0.5 Specification (Per-Fragment
321Operations and the Framebuffer)
322
323    Modify Section 4.1.3, "Multisample Fragment Operations" (p. 174):
324
325    (modify the first paragraph to include SAMPLE_MASK_ANGLE and
326    SAMPLE_MASK_VALUE_ANGLE on the list of values the coverage value is
327    modified based on.)
328
329    This step modifies fragment alpha and coverage values based on the values
330    of SAMPLE_ALPHA_TO_COVERAGE, SAMPLE_COVERAGE, SAMPLE_COVERAGE_VALUE,
331    SAMPLE_COVERAGE_INVERT, SAMPLE_MASK_ANGLE, and SAMPLE_MASK_VALUE_ANGLE.
332
333    Add to the end of Section 4.1.3, after the discussion of SAMPLE_COVERAGE:
334
335    If SAMPLE_MASK_ANGLE is enabled, the fragment coverage is ANDed
336    with the coverage value SAMPLE_MASK_VALUE_ANGLE.
337
338    The value of SAMPLE_MASK_VALUE_ANGLE is specified using
339
340        void SampleMaskiANGLE(GLuint maskNumber, GLbitfield mask);
341
342    with <mask> set to the desired mask for mask word <maskNumber>. Bit B of
343    mask word M corresponds to sample 32*M+B as described in Section 3.3. The
344    sample mask value is queried by calling GetIntegeri_v with <target> set to
345    SAMPLE_MASK_VALUE_ANGLE and the index set to <maskNumber>.
346
347    An INVALID_VALUE error is generated if <maskNumber> is greater than or
348    equal to the value of MAX_SAMPLE_MASK_WORDS_ANGLE.
349
350    Modify Section 4.4.2, "Attaching Images to Framebuffer Objects":
351
352    (the first paragraph of RenderbufferStorageMultisample p. 204)
353
354    ... If either <width> or <height> is greater than the value of
355    MAX_RENDERBUFFER_SIZE, then the error INVALID_VALUE is generated. If
356    <samples> is greater than the maximum number of samples supported for
357    <sizedinternalformat>, then the error INVALID_OPERATION is generated (see
358    GetInternalformativ in section 6.1.15). If the GL is unable to create
359    a data store of the requested size, the error OUT_OF_MEMORY is generated.
360
361    (the third paragraph of "Required Renderbuffer Formats" p. 205):
362
363    Implementations must support creation of renderbuffers in these
364    required formats with up to the value of MAX_SAMPLES multisamples,
365    with the exception that the signed and unsigned integer formats are
366    required only to support creation of renderbuffers with up to the
367    value of MAX_INTEGER_SAMPLES_ANGLE multisamples, which must be at
368    least one.
369
370    (modify section 4.4.2.4 "Attaching Texture Images to a Framebuffer",
371    describing FrameBufferTexture2D p. 207)
372
373    If texture is not zero, then texture must either name an existing
374    two-dimensional texture object and textarget must be TEXTURE_2D, texture
375    must name an existing cube map texture and textarget must be one of the
376    cube map face targets from table 3.21, or texture must name an existing
377    multisample texture and textarget must be TEXTURE_2D_MULTISAMPLE_ANGLE.
378    Otherwise, an INVALID_OPERATION error is generated.
379
380    <level> specifies ...
381
382    If <textarget> is TEXTURE_2D_MULTISAMPLE_ANGLE, then <level> must be zero.
383    Otherwise, an INVALID_VALUE error is generated. If textarget is one of ...
384
385
386    Modify Section 4.4.4.2, "Whole Framebuffer Completeness":
387
388    (modify the last bullet at the top of p. 215)
389
390    - The value of RENDERBUFFER_SAMPLES is the same for all attached
391      renderbuffers; the value of TEXTURE_SAMPLES_ANGLE is the same for all
392      attached textures; and, if the attached images are a mix of
393      renderbuffers and textures, the value of RENDERBUFFER_SAMPLES
394      matches the value of TEXTURE_SAMPLES_ANGLE.
395
396      { FRAMEBUFFER_INCOMPLETE_MULTISAMPLE }
397
398    (add one more bullet after the last bullet, p. 215)
399
400    - The value of TEXTURE_FIXED_SAMPLE_LOCATIONS_ANGLE is the same for all
401      attached textures; and, if the attached images are a mix of renderbuffers
402      and textures, the value of TEXTURE_FIXED_SAMPLE_LOCATIONS_ANGLE must be
403      TRUE for all attached textures.
404
405      { FRAMEBUFFER_INCOMPLETE_MULTISAMPLE }
406
407Additions to Chapter 6 of the OpenGL ES 3.0.5 Specification (State and State
408Requests)
409
410    Modify Section 6.1.3, "Enumerated Queries":
411
412    (modify the paragraph describing the <target> parameter of
413    GetTexParameter*)
414
415    <target> may be one of TEXTURE_2D, TEXTURE_3D, TEXTURE_2D_ARRAY,
416    TEXTURE_CUBE_MAP, or TEXTURE_2D_MULTISAMPLE_ANGLE, indicating the
417    currently bound two-dimensional, three-dimensional, two-dimensional
418    array, cube map, or two-dimensional multisample texture object,
419    respectively.
420
421    An INVALID_ENUM is generated if <target> is not one of the texture
422    targets described above.
423    An INVALID_ENUM is generated if <pname> is not one of the texture
424    parameters described above.
425
426    Modify Section 6.1.15, "Internal Format Queries":
427
428    (modify the paragraph describing target as follows, p. 244)
429
430    <target> indicates the usage of the internalformat, and must be either
431    RENDERBUFFER or TEXTURE_2D_MULTISAMPLE_ANGLE, indicating the renderbuffer,
432    or two-dimensional multisample texture. Otherwise an INVALID_ENUM error
433    is generated.
434
435    (add the following paragraph after "Querying SAMPLES with a <bufSize>
436    ...")
437
438    The maximum value of SAMPLES is guaranteed to be at least the lowest of
439    the value of MAX_INTEGER_SAMPLES_ANGLE if internal format is a signed or
440    unsigned integer format, the value of MAX_DEPTH_TEXTURE_SAMPLES_ANGLE if
441    internalformat is a depth or stencil-renderable format and target is
442    TEXTURE_2D_MULTISAMPLE_ANGLE, the value of MAX_COLOR_TEXTURE_SAMPLES_ANGLE
443    if internal format is a color-renderable format and target is
444    TEXTURE_2D_MULTISAMPLE_ANGLE, or the value of MAX_SAMPLES.
445
446    (remove the last paragraph on p. 244)
447    "Since multisampling is not supported for signed and unsigned integer
448    internal formats, the value of NUM_SAMPLE_COUNTS will be zero for such
449    formats."
450
451    (modify to the first paragraph on p. 245)
452    When query every accepted <internalformat> on multisample renderbuffer or
453    texture, the value of NUM_SAMPLE_COUNTS is guaranteed to be at least
454    one, and the maximum value in SAMPLES is guaranteed to be at least the
455    value of MAX_SAMPLES. If <target> does not support multisample (is not
456    multisample renderbuffer or texture), the value of NUM_SAMPLE_COUNTS will
457    be zero for any accepted <internalformat>.
458
459Dependencies on ANGLE_get_tex_level_parameter
460
461    If ANGLE_get_tex_level_parameter is not supported, omit any references to
462    GetTexLevelParameter{if}vANGLE, TEXTURE_WIDTH_ANGLE, TEXTURE_HEIGHT_ANGLE,
463    TEXTURE_INTERNAL_FORMAT_ANGLE, TEXTURE_SAMPLES_ANGLE, and
464    TEXTURE_FIXED_SAMPLE_LOCATIONS_ANGLE.
465
466Errors
467
468    The error INVALID_VALUE is generated by GetIntegeri_v if <target> is
469    SAMPLE_MASK_VALUE_ANGLE and <index> is greater than or equal to
470    MAX_SAMPLE_MASK_WORDS_ANGLE.
471
472    The error INVALID_VALUE is generated by SampleMaskiANGLE if <index> is
473    greater than or equal to MAX_SAMPLE_MASK_WORDS_ANGLE.
474
475    The error INVALID_ENUM is generated by TexStorage2DMultisampleANGLE if
476    <target> is not TEXTURE_2D_MULTISAMPLE_ANGLE.
477
478    The error INVALID_OPERATION is generated by TexStorage2DMultisampleANGLE
479    if zero is bound to <target>.
480
481    The error INVALID_VALUE is generated by TexStorage2DMultisampleANGLE if
482    <width> or <height> is less than 1 or greater than the value of
483    MAX_TEXTURE_SIZE.
484
485    The error INVALID_VALUE is generated by TexStorage2DMultisampleANGLE if
486    <samples> is zero.
487
488    The error INVALID_ENUM is generated by TexStorage2DMultisampleANGLE if
489    <sizedinternalformat> is not color-renderable, depth-renderable, or
490    stencil-renderable (as defined
491    in section 4.4.4).
492
493    The error INVALID_ENUM is generated by TexStorage2DMultisampleANGLE if
494    <sizedinternalformat> is one of the unsized base internal formats listed
495    in table 3.11.
496
497    The error INVALID_OPERATION is generated by TexStorage2DMultisampleANGLE
498    if <samples> is greater than the maximum number of samples supported for
499    this <target> and <sizedinternalformat>, The maximum number of samples
500    supported can be determined by calling GetInternalformativ with a <pname>
501    of SAMPLES (see section 6.1.15).
502
503    The error INVALID_OPERATION is generated by TexStorage2DMultisampleANGLE
504    if the value of TEXTURE_IMMUTABLE_FORMAT for the texture currently bound
505    to <target> on the active texture unit is TRUE.
506
507    The error OUT_OF_MEMORY is generated by TexStorage2DMultisampleANGLE
508    if the GL is unable to create a texture image of the requested size.
509
510    The error INVALID_ENUM is generated by GetMultisamplefvANGLE if <pname>
511    is not SAMPLE_POSITION_ANGLE.
512
513    The error INVALID_VALUE is generated by GetMultisamplefvANGLE if <index>
514    is greater than or equal to the value of SAMPLES.
515
516    The error INVALID_OPERATION is generated by RenderbufferStorageMultisample
517    if <sizedinternalformat> is a signed or unsigned integer format and
518    <samples> is greater than the value of MAX_INTEGER_SAMPLES_ANGLE.
519
520    The error INVALID_OPERATION is generated by TexParameter* if <target> is
521    TEXTURE_2D_MULTISAMPLE_ANGLE, <pname> is TEXTURE_BASE_LEVEL, and <value>
522    is not zero.
523
524    The error INVALID_OPERATION is generated by TexParameter* if <target> is
525    TEXTURE_2D_MULTISAMPLE_ANGLE and <pname> is sampler state value from table
526    6.10.
527
528New State
529
530    (add to table 6.7, Multisampling p. 252)
531
532                                                               Initial
533    Get Value                           Type    Get Command     Value     Description                     Sec.
534    ---------                           ----    -----------    -------    ----------------------          -----
535    SAMPLE_MASK_ANGLE                   B       IsEnabled      FALSE      Additional sample mask          4.1.3
536    SAMPLE_MASK_VALUE_ANGLE             nxZ+    GetIntegeri_v  ~0         Additional sample mask value    4.1.3
537
538    Where n is the number of sample mask words (the value of
539    MAX_SAMPLE_MASK_WORDS_ANGLE) the implementation supports.
540
541    (add to table 6.8, Textures (selector, state per texture unit) p. 253)
542
543                                                                     Initial
544    Get Value                                 Type     Get Command    Value  Description                   Sec.
545    ------------------------------------      ----     -----------    ------ ---------------------------   -----
546    TEXTURE_BINDING_2D_MULTISAMPLE_ANGLE        32*xZ+   GetIntegerv    0      Texture object bound to     3.8.1
547                                                                             TEXTURE_2D_MULTISAMPLE_ANGLE
548
549    (add new table 6.10, Textures (state per texture image), renumber subsequent tables)
550
551                                                                          Initial
552    Get Value                            Type   Get Command                Value   Description                  Sec.
553    ----------------------               ----   -------------------        ------  ---------------------------  ------
554    TEXTURE_SAMPLES_ANGLE                 Z+    GetTexLevelParameterANGLE  0       Number of samples per texel  3.8.5
555    TEXTURE_FIXED_SAMPLE_LOCATIONS_ANGLE  B     GetTexLevelParameterANGLE  TRUE    Whether the image uses a     3.8.5
556                                                                                   fixed sample pattern
557
558    (add to table 6.35, Framebuffer dependent Values, p. 280)
559
560                                                              Initial
561    Get Value               Type        Get Command            Value           Description      Sec.
562    ------------------      ----------  ------------------     --------------  ---------------  ------
563    SAMPLE_POSITION_ANGLE   N*2*R[0,1]  GetMultisamplefvANGLE  implementation  Explicit sample  3.3.1
564                                                               dependent       positions
565
566    Where N is the number of samples (the value of SAMPLES) the framebuffer supports.
567
568New Implementation Dependent State
569
570                                                          Minimum
571    Get Value                        Type    Get Command  Value   Description                Sec.
572    ---------                        ------- -----------  ------- ------------------------   ------
573    MAX_SAMPLE_MASK_WORDS_ANGLE      Z+      GetIntegerv  1       maximum number of sample   4.1.3
574                                                                  mask words
575    MAX_COLOR_TEXTURE_SAMPLES_ANGLE  Z+      GetIntegerv  1       maximum number of samples  4.1.3
576                                                                  in a color multisample
577                                                                  texture
578    MAX_DEPTH_TEXTURE_SAMPLES_ANGLE  Z+      GetIntegerv  1       maximum number of samples  4.1.3
579                                                                  in a depth/stencil
580                                                                  multisample texture
581    MAX_INTEGER_SAMPLES_ANGLE        Z+      GetIntegerv  1       Maximum number of samples  4.4.2
582                                                                  in integer format
583                                                                  multisample buffers
584
585Modifications to the OpenGL ES Shading Language Specification, Version 3.00,
586Document Revision 6
587
588    Including the following line in a shader can be used to control the
589    language featured described in this extension:
590
591      #extension GL_ANGLE_texture_multisample : <behavior>
592
593    where <behavior> is as specified in section 3.5.
594
595    A new preprocessor #define is added to the OpenGL ES Shading Language:
596
597      #define GL_ANGLE_texture_multisample 1
598
599    Add to section 3.8 "Keywords":
600
601    The following new sampler types are added:
602
603      sampler2DMS, isampler2DMS, usampler2DMS,
604
605    Add to section 4.1 "Basic Types":
606
607    Add the following sampler type to the "Floating Point Sampler
608    Types (opaque)" table:
609
610      sampler2DMS    handle for accessing a 2D multisample texture
611
612    Add the following sampler type to the "Unsigned Integer Sampler
613    Types (opaque)" table:
614
615      usampler2DMS    handle for accessing an unsigned integer 2D
616                      multisample texture
617
618    Add the following sampler type to the "Integer Sampler Types" table:
619
620      isampler2DMS    handle for accessing an integer 2D
621                      multisample texture
622
623    Add to section 8.8 "Texture Lookup Functions":
624
625    Add new functions to the set of allowed texture lookup functions:
626
627    Syntax:
628
629      gvec4 texelFetch(gsampler2DMS sampler, ivec2 P, int sample)
630
631    Description:
632
633      Use integer texture coordinate <P> to lookup a single sample
634      <sample> on the texture bound to <sampler> as described in section
635      2.12.9.3 of the OpenGL ES specification "Multisample Texel Fetches".
636
637    Syntax:
638
639      ivec2 textureSize(gsampler2DMS sampler)
640
641    Description:
642
643      Returns the dimensions, width and height of level 0 for the
644      texture bound to <sampler>, as described in section 2.12.9.4 of
645      the OpenGL ES specification section "Texture Size Query".
646
647Examples
648
649Issues
650    None
651
652Revision History
653
654    Rev.    Date    Author       Changes
655    ----  --------  ----------   --------------------------------------------
656    1     08/27/18   Yunchao He  First revision. Adapted from OpenGL ES
657                                 specification 3.1, OpenGLSL ES specification
658                                 3.10 at document revision 4, and
659                                 ARB_texture_multisample at revision 12.
660