Path: blob/main_old/extensions/ANGLE_texture_multisample.txt
1693 views
Name12ANGLE_texture_multisample34Name Strings56GL_ANGLE_texture_multisample78Contributors910Yunchao He, Intel Corporation11Yizhou Jiang, Intel Corporation12Contributors to the OpenGL ES 3.1, GLSL ES 3.1, and ARB_texture_multisample1314Contact1516Yunchao He (yunchao.he 'at' intel.com)1718Status1920Incomplete2122Version2324Last Modified Date: August 27, 201825Author Revision: 12627Number2829OpenGL ES Extension XX3031Dependencies3233OpenGL ES 3.0 is required.3435This extension is written against the OpenGL ES 3.0.5 and OpenGL ES36Shading Language 3.0 (Document Revision 6) specifications.3738KHR_robustness affects the behavior of this specification.3940Overview4142This extension provides support for a new type of texture -43two-dimensional multisample textures - as well as mechanisms to44allocate storage and attach such textures to FBOs for rendering.45It also add supports using such textures in a shader, fetching specific46samples from such textures in a shader, and querying the dimensions of47such textures in a shader.4849This extension also includes the following functionality, some of which50was first described in NV_explicit_multisample:5152* An API to query the location of samples within the pixel5354* An explicit control for the multisample sample mask to augment the55control provided by SampleCoverage5657* An API to query the texture's level-of-detail information for various58parameters5960* A mechanism to support the SAMPLE_MASK capability6162* A mechanism to return corresponding types for multisample textures when63the uniform type is queried by getActiveUniform6465This extension does not expose multisampled 2D array textures, because they66are not supported in OpenGL ES 3.1.6768IP Status6970No known IP claims.7172New Procedures and Functions7374void TexStorage2DMultisampleANGLE(enum target,75sizei samples,76enum sizedinternalformat,77sizei width,78sizei height,79boolean fixedsamplelocations);8081void GetMultisamplefvANGLE(enum pname, uint index, float *val);8283void SampleMaskiANGLE(uint maskNumber, bitfield mask);8485void GetTexLevelParameter{if}vANGLE(enum target, int level,86enum pname, T *params );8788New Tokens8990Accepted by the <target> parameter of BindTexture,91TexStorage2DMultisampleANGLE, GetInternalformativ, TexParameter{if}*,92GetTexParameter{if}v, GetTexLevelParameter{if}vANGLE and93by the <textarget> parameter of FramebufferTexture2D:9495TEXTURE_2D_MULTISAMPLE_ANGLE 0x91009697Accepted by the <pname> parameter of GetMultisamplefvANGLE:9899SAMPLE_POSITION_ANGLE 0x8E50100101Accepted by the <cap> parameter of Enable, Disable, and IsEnabled:102103SAMPLE_MASK_ANGLE 0x8E51104105Accepted by the <target> parameter of GetIntegeri_v:106107SAMPLE_MASK_VALUE_ANGLE 0x8E52108109Accepted by the <pname> parameter of GetIntegerv:110111MAX_SAMPLE_MASK_WORDS_ANGLE 0x8E59112MAX_COLOR_TEXTURE_SAMPLES_ANGLE 0x910E113MAX_DEPTH_TEXTURE_SAMPLES_ANGLE 0x910F114MAX_INTEGER_SAMPLES_ANGLE 0x9110115TEXTURE_BINDING_2D_MULTISAMPLE_ANGLE 0x9104116117Accepted by the <pname> parameter of GetTexLevelParameter{if}vANGLE:118119TEXTURE_SAMPLES_ANGLE 0x9106120TEXTURE_FIXED_SAMPLE_LOCATIONS_ANGLE 0x9107121TEXTURE_WIDTH 0x1000122TEXTURE_HEIGHT 0x1001123TEXTURE_DEPTH 0x8071124TEXTURE_INTERNAL_FORMAT 0x1003125TEXTURE_RED_SIZE 0x805C126TEXTURE_GREEN_SIZE 0x805D127TEXTURE_BLUE_SIZE 0x805E128TEXTURE_ALPHA_SIZE 0x805F129TEXTURE_DEPTH_SIZE 0x884A130TEXTURE_STENCIL_SIZE 0x88F1131TEXTURE_SHARED_SIZE 0x8C3F132TEXTURE_RED_TYPE 0x8C10133TEXTURE_GREEN_TYPE 0x8C11134TEXTURE_BLUE_TYPE 0x8C12135TEXTURE_ALPHA_TYPE 0x8C13136TEXTURE_DEPTH_TYPE 0x8C16137TEXTURE_COMPRESSED 0x86A1138139Returned by the <type> parameter of GetActiveUniform:140141SAMPLER_2D_MULTISAMPLE_ANGLE 0x9108142INT_SAMPLER_2D_MULTISAMPLE_ANGLE 0x9109143UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ANGLE 0x910A144145Additions to Chapter 2 of the OpenGL ES 3.0.5 Specification (OpenGL ES146Operation)147148Add to table 2.10 "OpenGL ES Shading Language type tokens" page 64:149150Type Name Token Keyword151----------------------------------------- ------------152SAMPLER_2D_MULTISAMPLE_ANGLE sampler2DMS153INT_SAMPLER_2D_MULTISAMPLE_ANGLE isampler2DMS154UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ANGLE usampler2DMS155156Add to section 2.12.9, after subsection "Texel Fetches":157158Multisample Texel Fetches159160Multisample buffers do not have mipmaps, and there is no level of161detail parameter for multisample texel fetches. Instead, an integer162parameter selects the sample number to be fetched from the buffer.163The number identifying the sample is the same as the value used to164query the sample location using GetMultisamplefvANGLE. Multisample165textures are not filtered when samples are fetched, and filter state166is ignored.167168If the context was created with robust buffer access enabled, the result169of the texel fetch in the following cases is zero. If robust buffer170access is not enabled, the result of the texel fetch is undefined if171any of the following conditions hold:172173* the texel coordinate (i, j) refer to a texel outside the extents174of the multisample texture image, where any of175i < 0 i >= W176j < 0 j >= H177and the size parameter W and H refer to the width and height of178the image.179180* the specified sample number does not exist (is negative, or greater181than or equal to the number of samples in the texture).182183Additionally, these fetches may only be performed on a multisample184texture sampler. No other sample or fetch commands may be performed185on a multisample texture sampler.186187Additions to Chapter 3 of the OpenGL ES 3.0.5 Specification (Rasterization)188189Insert into section 3.3, "Multisampling" after the discussion of190the query for SAMPLES:191192(..., and is queried by calling GetIntegerv with pname set to SAMPLES.)193194The location at which shading is performed for a given sample (the195shading sample location) is queried with the command196197void GetMultisamplefvANGLE(enum pname, uint index, float *val);198199<pname> must be SAMPLE_POSITION_ANGLE, and <index> corresponds to the200sample for which the location should be returned. The shading sample201location (x, y) is returned as two floating-point values in (val[0],202val[1]) respectively. x and y each lie in the range [0, 1] and203represent a location in pixel space at which depth and associated204data for that sample are evaluated for a fragment (e.g. where sample205shading is performed). (0.5, 0.5) thus corresponds to the pixel center.206If the multisample mode does not have fixed sample locations, the returned207values may only reflect the locations of samples within some pixels.208209An INVALID_ENUM error is generated if <pname> is not SAMPLE_LOCATION.210An INVALID_VALUE error is generated if <index> is greater than or equal to211the value of SAMPLES.212213Modify Section 3.8.1, "Texture Objects":214215(modify first paragraph of section, p. 122, simply adding216references to multisample textures)217218Textures in GL are represented by named objects. The name space for texture219objects is the unsigned integers, with zero reserved by the GL to represent220the default texture object. The default texture object is bound to each of221the TEXTURE_2D, TEXTURE_3D, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP, and222TEXTURE_2D_MULTISAMPLE_ANGLE targets during context initialization.223224(modify the last paragraph, p. 123)225226The texture object name space, including the initial two- and227three-dimensional, two-dimensional array, cube map, and two-dimensional228multisample texture objects, is shared among all texture units. A texture229object may be bound to more than one texture unit simultaneously. After a230texture object is bound, any GL operations on that target object affect231any other texture units to which the same texture object is bound.232233Modify Section 3.8.3, "Texture Image Specification" (p. 134):234235(add the new target to MAX_TEXTURE_SIZE description)236237In a similar fashion, the maximum allowable width of a texel array238for a two-dimensional texture, two-dimensional array texture,239or two-dimensional multisample texture, and the maximum allowable240height of a two-dimensional texture, two-dimensional array texture,241or two-dimensional multisample texture, must be at least 2^(k-lod)242for image arrays of level 0 through k, where k is the log base 2 of243MAX_TEXTURE_SIZE.244245Insert new Section 3.8.5, "Multisample Textures". Renumber subsequent246sections:247248In addition to the texture types described in previous sections, an249additional type of texture is supported. A multisample texture is250similar to a two-dimensional texture, except it contains multiple251samples per texel. Multisample textures do not have multiple image252levels, and are immutable.253254The command255256void TexStorage2DMultisampleANGLE(enum target, sizei samples,257int sizedinternalformat,258sizei width, sizei height,259boolean fixedsamplelocations);260261establishes the data storage, format, dimensions, and number of samples262of a multisample texture's image. <target> must be263TEXTURE_2D_MULTISAMPLE_ANGLE. <width> and <height> are the dimensions264in texels of the texture.265266<samples> represents a request for a desired minimum number of samples.267Since different implementations may support different sample counts for268multisampled textures, the actual number of samples allocated for the269texture image is implementation-dependent. However, the resulting value270for TEXTURE_SAMPLES_ANGLE is guaranteed to be greater than or equal to271<samples> and no more than the next larger sample count supported by the272implementation.273274If <fixedsamplelocations> is TRUE, the image will use identical sample275locations and the same number of samples for all texels in the image,276and the sample locations will not depend on the sizedinternalformat or277size of the image.278279Upon success, TexStorage2DMultisampleANGLE deletes any existing image280for <target> and the contents of texels are undefined. The values of281TEXTURE_WIDTH, TEXTURE_HEIGHT, TEXTURE_SAMPLES_ANGLE,282TEXTURE_INTERNAL_FORMAT and TEXTURE_FIXED_SAMPLE_LOCATIONS_ANGLE are283set to <width>, <height>, the actual number of samples allocated,284<sizedinternalformat>, and <fixedsamplelocations> respectively.285286When a multisample texture is accessed in a shader, the access takes one287vector of integers describing which texel to fetch and an integer288corresponding to the sample numbers described in section 3.3 describing289which sample within the texel to fetch. No standard sampling instructions290are allowed on the multisample texture targets, and no filtering is291performed by the fetch. Fetching a sample number less than zero, or292greater than or equal to the number of samples in the texture, produces293undefined results.294295An INVALID_ENUM error is generated if target is not296TEXTURE_2D_MULTISAMPLE_ANGLE.297An INVALID_OPERATION error is generated if zero is bound to <target>.298An INVALID_VALUE is generated if <width> or <height> is less than 1.299An INVALID_VALUE is generated if <width> or <height> is greater than300the value of MAX_TEXTURE_SIZE.301An INVALID_VALUE is generated if samples is zero.302An INVALID_ENUM error is generated if <sizedinternalformat> is not303color-renderable, depth-renderable, or stencil-renderable (as defined304in section 4.4.4).305An INVALID_ENUM error is generated if <sizedinternalformat> is one of the306unsized base internal formats listed in table 3.11.307An INVALID_OPERATION is generated if <samples> is greater than the maximum308number of samples supported for this <target> and <sizedinternalformat>,309The maximum number of samples supported can be determined by calling310GetInternalformativ with a <pname> of SAMPLES (see section 6.1.15).311An INVALID_OPERATION is generated if the value of TEXTURE_IMMUTABLE_FORMAT312for the texture currently bound to <target> on the active texture unit is313TRUE.314An OUT_OF_MEMORY error is generated if the GL is unable to create a texture315image of the requested size.316317Modify Section 3.8.7, "Texture Parameters":318319(add TEXTURE_2D_MULTISAMPLE_ANGLE to the texture targets accepted by320TexParameter*)321322<target> is the target, either TEXTURE_2D, TEXTURE_3D, TEXTURE_2D_ARRAY,323TEXTURE_CUBE_MAP, or TEXTURE_2D_MULTISAMPLE_ANGLE.324325Add the following paragraph to the end of Section 3.8.7:326327An INVALID_ENUM is generated if <target> is TEXTURE_2D_MULTISAMPLE_ANGLE328and <pname> is any sampler state from table 6.10. An INVALID_OPERATION329error is generated if <target> is TEXTURE_2D_MULTISAMPLE_ANGLE, and330<pname> TEXTURE_BASE_LEVEL is set to any value other than zero.331332Modify Section 3.8.14, "Texture State" (p. 162):333334(... the compressed flag set to FALSE, and a zero compressed size).335336Multisample textures also contain an integer identifying the number of337samples in each texel, and a boolean indicating whether identical sample338locations and number of samples will be used for all texels in the image.339340Additions to Chapter 4 of the OpenGL ES 3.0.5 Specification (Per-Fragment341Operations and the Framebuffer)342343Modify Section 4.1.3, "Multisample Fragment Operations" (p. 174):344345(modify the first paragraph to include SAMPLE_MASK_ANGLE and346SAMPLE_MASK_VALUE_ANGLE on the list of values the coverage value is347modified based on.)348349This step modifies fragment alpha and coverage values based on the values350of SAMPLE_ALPHA_TO_COVERAGE, SAMPLE_COVERAGE, SAMPLE_COVERAGE_VALUE,351SAMPLE_COVERAGE_INVERT, SAMPLE_MASK_ANGLE, and SAMPLE_MASK_VALUE_ANGLE.352353Add to the end of Section 4.1.3, after the discussion of SAMPLE_COVERAGE:354355If SAMPLE_MASK_ANGLE is enabled, the fragment coverage is ANDed356with the coverage value SAMPLE_MASK_VALUE_ANGLE.357358The value of SAMPLE_MASK_VALUE_ANGLE is specified using359360void SampleMaskiANGLE(GLuint maskNumber, GLbitfield mask);361362with <mask> set to the desired mask for mask word <maskNumber>. Bit B of363mask word M corresponds to sample 32*M+B as described in Section 3.3. The364sample mask value is queried by calling GetIntegeri_v with <target> set to365SAMPLE_MASK_VALUE_ANGLE and the index set to <maskNumber>.366367An INVALID_VALUE error is generated if <maskNumber> is greater than or368equal to the value of MAX_SAMPLE_MASK_WORDS_ANGLE.369370Modify Section 4.4.2, "Attaching Images to Framebuffer Objects":371372(the first paragraph of RenderbufferStorageMultisample p. 204)373374... If either <width> or <height> is greater than the value of375MAX_RENDERBUFFER_SIZE, then the error INVALID_VALUE is generated. If376<samples> is greater than the maximum number of samples supported for377<sizedinternalformat>, then the error INVALID_OPERATION is generated (see378GetInternalformativ in section 6.1.15). If the GL is unable to create379a data store of the requested size, the error OUT_OF_MEMORY is generated.380381(the third paragraph of "Required Renderbuffer Formats" p. 205):382383Implementations must support creation of renderbuffers in these384required formats with up to the value of MAX_SAMPLES multisamples,385with the exception that the signed and unsigned integer formats are386required only to support creation of renderbuffers with up to the387value of MAX_INTEGER_SAMPLES_ANGLE multisamples, which must be at388least one.389390(modify section 4.4.2.4 "Attaching Texture Images to a Framebuffer",391describing FrameBufferTexture2D p. 207)392393If texture is not zero, then texture must either name an existing394two-dimensional texture object and textarget must be TEXTURE_2D, texture395must name an existing cube map texture and textarget must be one of the396cube map face targets from table 3.21, or texture must name an existing397multisample texture and textarget must be TEXTURE_2D_MULTISAMPLE_ANGLE.398Otherwise, an INVALID_OPERATION error is generated.399400<level> specifies ...401402If <textarget> is TEXTURE_2D_MULTISAMPLE_ANGLE, then <level> must be zero.403Otherwise, an INVALID_VALUE error is generated. If textarget is one of ...404405406Modify Section 4.4.4.2, "Whole Framebuffer Completeness":407408(modify the last bullet at the top of p. 215)409410- The value of RENDERBUFFER_SAMPLES is the same for all attached411renderbuffers; the value of TEXTURE_SAMPLES_ANGLE is the same for all412attached textures; and, if the attached images are a mix of413renderbuffers and textures, the value of RENDERBUFFER_SAMPLES414matches the value of TEXTURE_SAMPLES_ANGLE.415416{ FRAMEBUFFER_INCOMPLETE_MULTISAMPLE }417418(add one more bullet after the last bullet, p. 215)419420- The value of TEXTURE_FIXED_SAMPLE_LOCATIONS_ANGLE is the same for all421attached textures; and, if the attached images are a mix of renderbuffers422and textures, the value of TEXTURE_FIXED_SAMPLE_LOCATIONS_ANGLE must be423TRUE for all attached textures.424425{ FRAMEBUFFER_INCOMPLETE_MULTISAMPLE }426427Additions to Chapter 6 of the OpenGL ES 3.0.5 Specification (State and State428Requests)429430Modify Section 6.1.3, "Enumerated Queries":431432(modify the paragraph describing the <target> parameter of433GetTexParameter*)434435<target> may be one of TEXTURE_2D, TEXTURE_3D, TEXTURE_2D_ARRAY,436TEXTURE_CUBE_MAP, or TEXTURE_2D_MULTISAMPLE_ANGLE, indicating the437currently bound two-dimensional, three-dimensional, two-dimensional438array, cube map, or two-dimensional multisample texture object,439respectively.440441An INVALID_ENUM is generated if <target> is not one of the texture442targets described above.443An INVALID_ENUM is generated if <pname> is not one of the texture444parameters described above.445446Modify Section 6.1.4 "Texture Queries":447448(Add the following text to the end of the section)449450The commands451452void GetTexLevelParameter{if}vANGLE(enum target, int level,453enum pname, T *params );454455place information about texture image parameter <pname> for level-of-detail456<level> of the specified target into <params>. <pname> must be one of the457symbolic values in table 6.11.458459<target> may be one of TEXTURE_2D, TEXTURE_3D, TEXTURE_2D_ARRAY, one of460the cube map face targets from table 3.18, or TEXTURE_2D_MULTISAMPLE_ANGLE,461indicating the two- or three-dimensional texture, two-dimensional array462texture, one of the six distinct 2D images making up the cube map texture463object, or two-dimensional multisample texture. Otherwise an INVALID_ENUM is464generated.465466<level> determines which level-of-detail's state is returned. If <level>467is negative or larger than the maximum allowable level-of-detail, then an468INVALID_VALUE error is generated.469470Note that TEXTURE_CUBE_MAP is not a valid <target> parameter for471GetTexLevelParameter{if}vANGLE, because it does not specify a particular472cube map face.473474For texture images with uncompressed internal formats, queries of475<pname> TEXTURE_RED_TYPE, TEXTURE_GREEN_TYPE, TEXTURE_BLUE_TYPE,476TEXTURE_ALPHA_TYPE, and TEXTURE_DEPTH_TYPE return the data type used477to store the component. Types NONE, SIGNED_NORMALIZED, UNSIGNED_-478NORMALIZED, FLOAT, INT, and UNSIGNED_INT respectively indicate missing,479signed normalized fixed-point, unsigned normalized fixed-point,480floating-point, signed unnormalized integer, and unsigned unnormalized481integer components. Queries of <pname> TEXTURE_RED_SIZE, TEXTURE_GREEN_SIZE,482TEXTURE_BLUE_SIZE, TEXTURE_ALPHA_SIZE, TEXTURE_DEPTH_SIZE,483TEXTURE_STENCIL_SIZE, and TEXTURE_SHARED_SIZE return the actual resolutions484of the stored image components, not the resolutions specified when the image485was defined. Invalid <pname> generate an INVALID_ENUM error.486487For texture images with compressed internal formats, the types returned488specify how components are interpreted after decompression, while the489resolutions returned specify the component resolution of an uncompressed490internal format that produces an image of roughly the same quality as the491compressed image in question. Since the quality of the implementation's492compression algorithm is likely data-dependent, the returned component sizes493should be treated only as rough approximations.494495Queries of <pname> TEXTURE_INTERNAL_FORMAT, TEXTURE_WIDTH, TEXTURE_HEIGHT,496and TEXTURE_DEPTH return the internal format, width, height, and depth,497respectively, as specified when the image array was created.498499Queries of <pname> TEXTURE_SAMPLES_ANGLE, and500TEXTURE_FIXED_SAMPLE_LOCATIONS_ANGLE on multisample textures return the501number of samples and whether texture sample fixed locations are enabled,502respectively. For non-multisample texture, the default values 0 and TRUE503as in new added table 6.11 are returned respectively.504505Modify Section 6.1.15, "Internal Format Queries":506507(modify the paragraph describing target as follows, p. 244)508509<target> indicates the usage of the internalformat, and must be either510RENDERBUFFER or TEXTURE_2D_MULTISAMPLE_ANGLE, indicating the renderbuffer,511or two-dimensional multisample texture. Otherwise an INVALID_ENUM error512is generated.513514(add the following paragraph after "Querying SAMPLES with a <bufSize>515...")516517The maximum value of SAMPLES is guaranteed to be at least the lowest of518the value of MAX_INTEGER_SAMPLES_ANGLE if internal format is a signed or519unsigned integer format, the value of MAX_DEPTH_TEXTURE_SAMPLES_ANGLE if520internalformat is a depth or stencil-renderable format and target is521TEXTURE_2D_MULTISAMPLE_ANGLE, the value of MAX_COLOR_TEXTURE_SAMPLES_ANGLE522if internal format is a color-renderable format and target is523TEXTURE_2D_MULTISAMPLE_ANGLE, or the value of MAX_SAMPLES.524525(remove the last paragraph on p. 244)526"Since multisampling is not supported for signed and unsigned integer527internal formats, the value of NUM_SAMPLE_COUNTS will be zero for such528formats."529530(modify to the first paragraph on p. 245)531When query every accepted <internalformat> on multisample renderbuffer or532texture, the value of NUM_SAMPLE_COUNTS is guaranteed to be at least533one, and the maximum value in SAMPLES is guaranteed to be at least the534value of MAX_SAMPLES. If <target> does not support multisample (is not535multisample renderbuffer or texture), the value of NUM_SAMPLE_COUNTS will536be zero for any accepted <internalformat>.537538Errors539540The error INVALID_VALUE is generated by GetIntegeri_v if <target> is541SAMPLE_MASK_VALUE_ANGLE and <index> is greater than or equal to542MAX_SAMPLE_MASK_WORDS_ANGLE.543544The error INVALID_VALUE is generated by SampleMaskiANGLE if <index> is545greater than or equal to MAX_SAMPLE_MASK_WORDS_ANGLE.546547The error INVALID_ENUM is generated by TexStorage2DMultisampleANGLE if548<target> is not TEXTURE_2D_MULTISAMPLE_ANGLE.549550The error INVALID_OPERATION is generated by TexStorage2DMultisampleANGLE551if zero is bound to <target>.552553The error INVALID_VALUE is generated by TexStorage2DMultisampleANGLE if554<width> or <height> is less than 1 or greater than the value of555MAX_TEXTURE_SIZE.556557The error INVALID_VALUE is generated by TexStorage2DMultisampleANGLE if558<samples> is zero.559560The error INVALID_ENUM is generated by TexStorage2DMultisampleANGLE if561<sizedinternalformat> is not color-renderable, depth-renderable, or562stencil-renderable (as defined563in section 4.4.4).564565The error INVALID_ENUM is generated by TexStorage2DMultisampleANGLE if566<sizedinternalformat> is one of the unsized base internal formats listed567in table 3.11.568569The error INVALID_OPERATION is generated by TexStorage2DMultisampleANGLE570if <samples> is greater than the maximum number of samples supported for571this <target> and <sizedinternalformat>, The maximum number of samples572supported can be determined by calling GetInternalformativ with a <pname>573of SAMPLES (see section 6.1.15).574575The error INVALID_OPERATION is generated by TexStorage2DMultisampleANGLE576if the value of TEXTURE_IMMUTABLE_FORMAT for the texture currently bound577to <target> on the active texture unit is TRUE.578579The error OUT_OF_MEMORY is generated by TexStorage2DMultisampleANGLE580if the GL is unable to create a texture image of the requested size.581582The error INVALID_ENUM is generated by GetMultisamplefvANGLE if <pname>583is not SAMPLE_POSITION_ANGLE.584585The error INVALID_VALUE is generated by GetMultisamplefvANGLE if <index>586is greater than or equal to the value of SAMPLES.587588The error INVALID_OPERATION is generated by RenderbufferStorageMultisample589if <sizedinternalformat> is a signed or unsigned integer format and590<samples> is greater than the value of MAX_INTEGER_SAMPLES_ANGLE.591592The error INVALID_OPERATION is generated by TexParameter* if <target> is593TEXTURE_2D_MULTISAMPLE_ANGLE, <pname> is TEXTURE_BASE_LEVEL, and <value>594is not zero.595596The error INVALID_OPERATION is generated by TexParameter* if <target> is597TEXTURE_2D_MULTISAMPLE_ANGLE and <pname> is sampler state value from table5986.10.599600The error INVALID_ENUM is generated by GetTexLevelParameter{if}vANGLE601if <target> is not one of TEXTURE_2D, TEXTURE_3D, TEXTURE_2D_ARRAY, one of602the cube map face targets from table 3.18, or TEXTURE_2D_MULTISAMPLE_ANGLE.603604The error INVALID_VALUE is generated by GetTexLevelParameter{if}vANGLE605if <level> is negative or larger than the maximum allowable level-of-detail.606607The error INVALID_ENUM is generated by GetTexLevelParameter{if}vANGLE608if <value> is not one of TEXTURE_RED_TYPE, TEXTURE_GREEN_TYPE,609TEXTURE_BLUE_TYPE, TEXTURE_ALPHA_TYPE, TEXTURE_DEPTH_TYPE,610TEXTURE_DEPTH_SIZE, TEXTURE_STENCIL_SIZE, TEXTURE_SHARED_SIZE,611TEXTURE_SAMPLES_ANGLE, TEXTURE_FIXED_SAMPLE_LOCATIONS_ANGLE, TEXTURE_WIDTH,612TEXTURE_HEIGHT, TEXTURE_DEPTH, TEXTURE_INTERNAL_FORMAT, TEXTURE_RED_SIZE,613TEXTURE_GREEN_SIZE, TEXTURE_BLUE_SIZE, TEXTURE_ALPHA_SIZE,614or TEXTURE_COMPRESSED.615616New State617618(add to table 6.7, Multisampling p. 252)619620Initial621Get Value Type Get Command Value Description Sec.622--------- ---- ----------- ------- ---------------------- -----623SAMPLE_MASK_ANGLE B IsEnabled FALSE Additional sample mask 4.1.3624SAMPLE_MASK_VALUE_ANGLE nxZ+ GetIntegeri_v ~0 Additional sample mask value 4.1.3625626Where n is the number of sample mask words (the value of627MAX_SAMPLE_MASK_WORDS_ANGLE) the implementation supports.628629(add to table 6.8, Textures (selector, state per texture unit) p. 253)630631Initial632Get Value Type Get Command Value Description Sec.633------------------------------------ ---- ----------- ------ --------------------------- -----634TEXTURE_BINDING_2D_MULTISAMPLE_ANGLE 32*xZ+ GetIntegerv 0 Texture object bound to 3.8.1635TEXTURE_2D_MULTISAMPLE_ANGLE636637(add new table 6.10, Textures (state per texture image), renumber subsequent tables)638639Initial640Get Value Type Get Command Value Description Sec.641---------------------- ---- ------------------- ------ --------------------------- ------642TEXTURE_SAMPLES_ANGLE Z+ GetTexLevelParameterANGLE 0 Number of samples per texel 3.8.5643TEXTURE_FIXED_SAMPLE_LOCATIONS_ANGLE B GetTexLevelParameterANGLE TRUE Whether the image uses a 3.8.5644fixed sample pattern645646TEXTURE_WIDTH Z+ GetTexLevelParameterANGLE 0 Specified width 3.8647TEXTURE_HEIGHT Z+ GetTexLevelParameterANGLE 0 Specified height (2D/3D) 3.8648TEXTURE_DEPTH Z+ GetTexLevelParameterANGLE 0 Specified depth (3D) 3.8649TEXTURE_INTERNAL_FORMAT E GetTexLevelParameterANGLE RGBA Internal format 3.8650or R8 (see section 3.8.14)651TEXTURE_x_SIZE 6xZ+ GetTexLevelParameterANGLE 0 Component resolution (x is 3.8652RED, GREEN, BLUE, ALPHA,653DEPTH, or STENCIL)654TEXTURE_SHARED_SIZE Z+ GetTexLevelParameterANGLE 0 Shared exponent field 3.8655resolution656TEXTURE_x_TYPE E GetTexLevelParameterANGLE NONE Component type (x is RED, 6.1.4657GREEN, BLUE, ALPHA, or658DEPTH)659TEXTURE_COMPRESSED B GetTexLevelParameterANGLE FALSE True if image has a 3.8.6660compressed internal format661662(add to table 6.35, Framebuffer dependent Values, p. 280)663664Initial665Get Value Type Get Command Value Description Sec.666------------------ ---------- ------------------ -------------- --------------- ------667SAMPLE_POSITION_ANGLE N*2*R[0,1] GetMultisamplefvANGLE implementation Explicit sample 3.3.1668dependent positions669670Where N is the number of samples (the value of SAMPLES) the framebuffer supports.671672New Implementation Dependent State673674Minimum675Get Value Type Get Command Value Description Sec.676--------- ------- ----------- ------- ------------------------ ------677MAX_SAMPLE_MASK_WORDS_ANGLE Z+ GetIntegerv 1 maximum number of sample 4.1.3678mask words679MAX_COLOR_TEXTURE_SAMPLES_ANGLE Z+ GetIntegerv 1 maximum number of samples 4.1.3680in a color multisample681texture682MAX_DEPTH_TEXTURE_SAMPLES_ANGLE Z+ GetIntegerv 1 maximum number of samples 4.1.3683in a depth/stencil684multisample texture685MAX_INTEGER_SAMPLES_ANGLE Z+ GetIntegerv 1 Maximum number of samples 4.4.2686in integer format687multisample buffers688689Modifications to the OpenGL ES Shading Language Specification, Version 3.00,690Document Revision 6691692Including the following line in a shader can be used to control the693language featured described in this extension:694695#extension GL_ANGLE_texture_multisample : <behavior>696697where <behavior> is as specified in section 3.5.698699A new preprocessor #define is added to the OpenGL ES Shading Language:700701#define GL_ANGLE_texture_multisample 1702703Add to section 3.8 "Keywords":704705The following new sampler types are added:706707sampler2DMS, isampler2DMS, usampler2DMS,708709Add to section 4.1 "Basic Types":710711Add the following sampler type to the "Floating Point Sampler712Types (opaque)" table:713714sampler2DMS handle for accessing a 2D multisample texture715716Add the following sampler type to the "Unsigned Integer Sampler717Types (opaque)" table:718719usampler2DMS handle for accessing an unsigned integer 2D720multisample texture721722Add the following sampler type to the "Integer Sampler Types" table:723724isampler2DMS handle for accessing an integer 2D725multisample texture726727Add to section 8.8 "Texture Lookup Functions":728729Add new functions to the set of allowed texture lookup functions:730731Syntax:732733gvec4 texelFetch(gsampler2DMS sampler, ivec2 P, int sample)734735Description:736737Use integer texture coordinate <P> to lookup a single sample738<sample> on the texture bound to <sampler> as described in section7392.12.9.3 of the OpenGL ES specification "Multisample Texel Fetches".740741Syntax:742743ivec2 textureSize(gsampler2DMS sampler)744745Description:746747Returns the dimensions, width and height of level 0 for the748texture bound to <sampler>, as described in section 2.12.9.4 of749the OpenGL ES specification section "Texture Size Query".750751Examples752753Issues754None755756Revision History757758Rev. Date Author Changes759---- -------- ---------- --------------------------------------------7601 08/27/18 Yunchao He First revision. Adapted from OpenGL ES761specification 3.1, OpenGLSL ES specification7623.10 at document revision 4, and763ARB_texture_multisample at revision 12.764765766