1*8975f5c5SAndroid Build Coastguard WorkerName 2*8975f5c5SAndroid Build Coastguard Worker 3*8975f5c5SAndroid Build Coastguard Worker ANGLE_framebuffer_multisample 4*8975f5c5SAndroid Build Coastguard Worker 5*8975f5c5SAndroid Build Coastguard WorkerName Strings 6*8975f5c5SAndroid Build Coastguard Worker 7*8975f5c5SAndroid Build Coastguard Worker GL_ANGLE_framebuffer_multisample 8*8975f5c5SAndroid Build Coastguard Worker 9*8975f5c5SAndroid Build Coastguard WorkerContributors 10*8975f5c5SAndroid Build Coastguard Worker 11*8975f5c5SAndroid Build Coastguard Worker Contributors to EXT_framebuffer_multisample 12*8975f5c5SAndroid Build Coastguard Worker Daniel Koch, TransGaming Inc. 13*8975f5c5SAndroid Build Coastguard Worker Shannon Woods, TransGaming Inc. 14*8975f5c5SAndroid Build Coastguard Worker Kenneth Russell, Google Inc. 15*8975f5c5SAndroid Build Coastguard Worker Vangelis Kokkevis, Google Inc. 16*8975f5c5SAndroid Build Coastguard Worker 17*8975f5c5SAndroid Build Coastguard WorkerContacts 18*8975f5c5SAndroid Build Coastguard Worker 19*8975f5c5SAndroid Build Coastguard Worker Daniel Koch, TransGaming Inc. (daniel 'at' transgaming 'dot' com) 20*8975f5c5SAndroid Build Coastguard Worker 21*8975f5c5SAndroid Build Coastguard WorkerStatus 22*8975f5c5SAndroid Build Coastguard Worker 23*8975f5c5SAndroid Build Coastguard Worker Implemented in ANGLE ES2 24*8975f5c5SAndroid Build Coastguard Worker 25*8975f5c5SAndroid Build Coastguard WorkerVersion 26*8975f5c5SAndroid Build Coastguard Worker 27*8975f5c5SAndroid Build Coastguard Worker Last Modified Date: Aug 6, 2010 28*8975f5c5SAndroid Build Coastguard Worker Author Revision: #3 29*8975f5c5SAndroid Build Coastguard Worker 30*8975f5c5SAndroid Build Coastguard WorkerNumber 31*8975f5c5SAndroid Build Coastguard Worker 32*8975f5c5SAndroid Build Coastguard Worker OpenGL ES Extension #84 33*8975f5c5SAndroid Build Coastguard Worker 34*8975f5c5SAndroid Build Coastguard WorkerDependencies 35*8975f5c5SAndroid Build Coastguard Worker 36*8975f5c5SAndroid Build Coastguard Worker Requires OpenGL ES 2.0. 37*8975f5c5SAndroid Build Coastguard Worker 38*8975f5c5SAndroid Build Coastguard Worker Requires GL_ANGLE_framebuffer_blit (or equivalent functionality). 39*8975f5c5SAndroid Build Coastguard Worker 40*8975f5c5SAndroid Build Coastguard Worker The extension is written against the OpenGL ES 2.0 specification. 41*8975f5c5SAndroid Build Coastguard Worker 42*8975f5c5SAndroid Build Coastguard Worker OES_texture_3D affects the definition of this extension. 43*8975f5c5SAndroid Build Coastguard Worker 44*8975f5c5SAndroid Build Coastguard WorkerOverview 45*8975f5c5SAndroid Build Coastguard Worker 46*8975f5c5SAndroid Build Coastguard Worker This extension extends the framebuffer object framework to 47*8975f5c5SAndroid Build Coastguard Worker enable multisample rendering. 48*8975f5c5SAndroid Build Coastguard Worker 49*8975f5c5SAndroid Build Coastguard Worker The new operation RenderbufferStorageMultisampleANGLE() allocates 50*8975f5c5SAndroid Build Coastguard Worker storage for a renderbuffer object that can be used as a multisample 51*8975f5c5SAndroid Build Coastguard Worker buffer. A multisample render buffer image differs from a 52*8975f5c5SAndroid Build Coastguard Worker single-sample render buffer image in that a multisample image has a 53*8975f5c5SAndroid Build Coastguard Worker number of SAMPLES that is greater than zero. No method is provided 54*8975f5c5SAndroid Build Coastguard Worker for creating multisample texture images. 55*8975f5c5SAndroid Build Coastguard Worker 56*8975f5c5SAndroid Build Coastguard Worker All of the framebuffer-attachable images attached to a framebuffer 57*8975f5c5SAndroid Build Coastguard Worker object must have the same number of SAMPLES or else the framebuffer 58*8975f5c5SAndroid Build Coastguard Worker object is not "framebuffer complete". If a framebuffer object with 59*8975f5c5SAndroid Build Coastguard Worker multisample attachments is "framebuffer complete", then the 60*8975f5c5SAndroid Build Coastguard Worker framebuffer object behaves as if SAMPLE_BUFFERS is one. 61*8975f5c5SAndroid Build Coastguard Worker 62*8975f5c5SAndroid Build Coastguard Worker The resolve operation is affected by calling 63*8975f5c5SAndroid Build Coastguard Worker BlitFramebufferANGLE (provided by the ANGLE_framebuffer_blit 64*8975f5c5SAndroid Build Coastguard Worker extension) where the source is a multisample application-created 65*8975f5c5SAndroid Build Coastguard Worker framebuffer object and the destination is a single-sample 66*8975f5c5SAndroid Build Coastguard Worker framebuffer object (either application-created or window-system 67*8975f5c5SAndroid Build Coastguard Worker provided). 68*8975f5c5SAndroid Build Coastguard Worker 69*8975f5c5SAndroid Build Coastguard WorkerNew Procedures and Functions 70*8975f5c5SAndroid Build Coastguard Worker 71*8975f5c5SAndroid Build Coastguard Worker void RenderbufferStorageMultisampleANGLE( 72*8975f5c5SAndroid Build Coastguard Worker enum target, sizei samples, 73*8975f5c5SAndroid Build Coastguard Worker enum internalformat, 74*8975f5c5SAndroid Build Coastguard Worker sizei width, sizei height); 75*8975f5c5SAndroid Build Coastguard Worker 76*8975f5c5SAndroid Build Coastguard WorkerNew Types 77*8975f5c5SAndroid Build Coastguard Worker 78*8975f5c5SAndroid Build Coastguard Worker None. 79*8975f5c5SAndroid Build Coastguard Worker 80*8975f5c5SAndroid Build Coastguard WorkerNew Tokens 81*8975f5c5SAndroid Build Coastguard Worker 82*8975f5c5SAndroid Build Coastguard Worker Accepted by the <pname> parameter of GetRenderbufferParameteriv: 83*8975f5c5SAndroid Build Coastguard Worker 84*8975f5c5SAndroid Build Coastguard Worker RENDERBUFFER_SAMPLES_ANGLE 0x8CAB 85*8975f5c5SAndroid Build Coastguard Worker 86*8975f5c5SAndroid Build Coastguard Worker Returned by CheckFramebufferStatus: 87*8975f5c5SAndroid Build Coastguard Worker 88*8975f5c5SAndroid Build Coastguard Worker FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56 89*8975f5c5SAndroid Build Coastguard Worker 90*8975f5c5SAndroid Build Coastguard Worker Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, 91*8975f5c5SAndroid Build Coastguard Worker and GetFloatv: 92*8975f5c5SAndroid Build Coastguard Worker 93*8975f5c5SAndroid Build Coastguard Worker MAX_SAMPLES_ANGLE 0x8D57 94*8975f5c5SAndroid Build Coastguard Worker 95*8975f5c5SAndroid Build Coastguard WorkerAdditions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL Operation) 96*8975f5c5SAndroid Build Coastguard Worker 97*8975f5c5SAndroid Build Coastguard WorkerAdditions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization) 98*8975f5c5SAndroid Build Coastguard Worker 99*8975f5c5SAndroid Build Coastguard Worker Add to the last paragraph of 3.7.2 (Alternate Texture Image Specification) 100*8975f5c5SAndroid Build Coastguard Worker (as modified by ANGLE_framebuffer_blit) the following: 101*8975f5c5SAndroid Build Coastguard Worker 102*8975f5c5SAndroid Build Coastguard Worker "Calling CopyTexSubImage3DOES, CopyTexImage2D or CopyTexSubImage2D will 103*8975f5c5SAndroid Build Coastguard Worker result in INVALID_OPERATION being generated if the object bound to 104*8975f5c5SAndroid Build Coastguard Worker READ_FRAMEBUFFER_BINDING_ANGLE is "framebuffer complete" and the value 105*8975f5c5SAndroid Build Coastguard Worker of SAMPLE_BUFFERS is greater than zero." 106*8975f5c5SAndroid Build Coastguard Worker 107*8975f5c5SAndroid Build Coastguard WorkerAdditions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment 108*8975f5c5SAndroid Build Coastguard WorkerOperations and the Framebuffer) 109*8975f5c5SAndroid Build Coastguard Worker 110*8975f5c5SAndroid Build Coastguard Worker Add to 4.3.1 (Reading Pixels), right before the subsection titled 111*8975f5c5SAndroid Build Coastguard Worker "Obtaining Pixels from the Framebuffer": 112*8975f5c5SAndroid Build Coastguard Worker 113*8975f5c5SAndroid Build Coastguard Worker "ReadPixels generates INVALID_OPERATION if READ_FRAMEBUFFER_BINDING_ANGLE 114*8975f5c5SAndroid Build Coastguard Worker (section 4.4) is non-zero, the read framebuffer is framebuffer 115*8975f5c5SAndroid Build Coastguard Worker complete, and the value of SAMPLE_BUFFERS for the read framebuffer 116*8975f5c5SAndroid Build Coastguard Worker is greater than zero." 117*8975f5c5SAndroid Build Coastguard Worker 118*8975f5c5SAndroid Build Coastguard Worker In 4.3.2 (Copying Pixels), add to the section describing BlitFramebuffer 119*8975f5c5SAndroid Build Coastguard Worker that was added by ANGLE_framebuffer_blit. 120*8975f5c5SAndroid Build Coastguard Worker 121*8975f5c5SAndroid Build Coastguard Worker "If SAMPLE_BUFFERS for the read framebuffer is greater than zero and 122*8975f5c5SAndroid Build Coastguard Worker SAMPLE_BUFFERS for the draw framebuffer is zero, the samples 123*8975f5c5SAndroid Build Coastguard Worker corresponding to each pixel location in the source are converted to 124*8975f5c5SAndroid Build Coastguard Worker a single sample before being written to the destination. 125*8975f5c5SAndroid Build Coastguard Worker 126*8975f5c5SAndroid Build Coastguard Worker If SAMPLE_BUFFERS for the draw framebuffer is greater than zero, 127*8975f5c5SAndroid Build Coastguard Worker no copy is performed and an INVALID_OPERATION error is generated. 128*8975f5c5SAndroid Build Coastguard Worker 129*8975f5c5SAndroid Build Coastguard Worker If SAMPLE_BUFFERS for the read framebuffer is greater than zero and 130*8975f5c5SAndroid Build Coastguard Worker <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT, no copy is 131*8975f5c5SAndroid Build Coastguard Worker performed and an INVALID_OPERATION error is generated. 132*8975f5c5SAndroid Build Coastguard Worker 133*8975f5c5SAndroid Build Coastguard Worker If SAMPLE_BUFFERS for the read framebuffer is greater than zero and 134*8975f5c5SAndroid Build Coastguard Worker the format of the read and draw framebuffers are not identical, no 135*8975f5c5SAndroid Build Coastguard Worker copy is performed and an INVALID_OPERATION error is generated. 136*8975f5c5SAndroid Build Coastguard Worker 137*8975f5c5SAndroid Build Coastguard Worker If SAMPLE_BUFFERS for the read framebuffer is greater than zero, the 138*8975f5c5SAndroid Build Coastguard Worker dimensions of the source and destination rectangles provided to 139*8975f5c5SAndroid Build Coastguard Worker BlitFramebufferANGLE must be identical and must specify the complete 140*8975f5c5SAndroid Build Coastguard Worker source and destination buffers, otherwise no copy is performed and 141*8975f5c5SAndroid Build Coastguard Worker an INVALID_OPERATION error is generated." 142*8975f5c5SAndroid Build Coastguard Worker 143*8975f5c5SAndroid Build Coastguard Worker Modification to 4.4.3 (Renderbuffer Objects) 144*8975f5c5SAndroid Build Coastguard Worker 145*8975f5c5SAndroid Build Coastguard Worker Add, just above the definition of RenderbufferStorage: 146*8975f5c5SAndroid Build Coastguard Worker 147*8975f5c5SAndroid Build Coastguard Worker "The command 148*8975f5c5SAndroid Build Coastguard Worker 149*8975f5c5SAndroid Build Coastguard Worker void RenderbufferStorageMultisampleANGLE( 150*8975f5c5SAndroid Build Coastguard Worker enum target, sizei samples, 151*8975f5c5SAndroid Build Coastguard Worker enum internalformat, 152*8975f5c5SAndroid Build Coastguard Worker sizei width, sizei height); 153*8975f5c5SAndroid Build Coastguard Worker 154*8975f5c5SAndroid Build Coastguard Worker establishes the data storage, format, dimensions, and number of 155*8975f5c5SAndroid Build Coastguard Worker samples of a renderbuffer object's image. <target> must be 156*8975f5c5SAndroid Build Coastguard Worker RENDERBUFFER. <internalformat> must be one of the color-renderable, 157*8975f5c5SAndroid Build Coastguard Worker depth-renderable, or stencil-renderable formats described in table 4.5. 158*8975f5c5SAndroid Build Coastguard Worker <width> and <height> are the dimensions in pixels of the renderbuffer. If 159*8975f5c5SAndroid Build Coastguard Worker either <width> or <height> is greater than the value of 160*8975f5c5SAndroid Build Coastguard Worker MAX_RENDERBUFFER_SIZE, or if <samples> is greater than MAX_SAMPLES_ANGLE, 161*8975f5c5SAndroid Build Coastguard Worker then the error INVALID_VALUE is generated. If OpenGL ES is unable to 162*8975f5c5SAndroid Build Coastguard Worker create a data store of the requested size, the error OUT_OF_MEMORY 163*8975f5c5SAndroid Build Coastguard Worker is generated. 164*8975f5c5SAndroid Build Coastguard Worker 165*8975f5c5SAndroid Build Coastguard Worker Upon success, RenderbufferStorageMultisampleANGLE deletes any existing 166*8975f5c5SAndroid Build Coastguard Worker data store for the renderbuffer image and the contents of the data 167*8975f5c5SAndroid Build Coastguard Worker store after calling RenderbufferStorageMultisampleANGLE are undefined. 168*8975f5c5SAndroid Build Coastguard Worker RENDERBUFFER_WIDTH is set to <width>, RENDERBUFFER_HEIGHT is 169*8975f5c5SAndroid Build Coastguard Worker set to <height>, and RENDERBUFFER_INTERNAL_FORMAT is set to 170*8975f5c5SAndroid Build Coastguard Worker <internalformat>. 171*8975f5c5SAndroid Build Coastguard Worker 172*8975f5c5SAndroid Build Coastguard Worker If <samples> is zero, then RENDERBUFFER_SAMPLES_ANGLE is set to zero. 173*8975f5c5SAndroid Build Coastguard Worker Otherwise <samples> represents a request for a desired minimum 174*8975f5c5SAndroid Build Coastguard Worker number of samples. Since different implementations may support 175*8975f5c5SAndroid Build Coastguard Worker different sample counts for multisampled rendering, the actual 176*8975f5c5SAndroid Build Coastguard Worker number of samples allocated for the renderbuffer image is 177*8975f5c5SAndroid Build Coastguard Worker implementation dependent. However, the resulting value for 178*8975f5c5SAndroid Build Coastguard Worker RENDERBUFFER_SAMPLES_ANGLE is guaranteed to be greater than or equal 179*8975f5c5SAndroid Build Coastguard Worker to <samples> and no more than the next larger sample count supported 180*8975f5c5SAndroid Build Coastguard Worker by the implementation. 181*8975f5c5SAndroid Build Coastguard Worker 182*8975f5c5SAndroid Build Coastguard Worker An OpenGL ES implementation may vary its allocation of internal component 183*8975f5c5SAndroid Build Coastguard Worker resolution based on any RenderbufferStorageMultisampleANGLE parameter (except 184*8975f5c5SAndroid Build Coastguard Worker target), but the allocation and chosen internal format must not be a 185*8975f5c5SAndroid Build Coastguard Worker function of any other state and cannot be changed once they are 186*8975f5c5SAndroid Build Coastguard Worker established. The actual resolution in bits of each component of the 187*8975f5c5SAndroid Build Coastguard Worker allocated image can be queried with GetRenderbufferParameteriv." 188*8975f5c5SAndroid Build Coastguard Worker 189*8975f5c5SAndroid Build Coastguard Worker Modify the definiton of RenderbufferStorage as follows: 190*8975f5c5SAndroid Build Coastguard Worker 191*8975f5c5SAndroid Build Coastguard Worker "The command 192*8975f5c5SAndroid Build Coastguard Worker 193*8975f5c5SAndroid Build Coastguard Worker void RenderbufferStorage(enum target, enum internalformat, 194*8975f5c5SAndroid Build Coastguard Worker sizei width, sizei height); 195*8975f5c5SAndroid Build Coastguard Worker 196*8975f5c5SAndroid Build Coastguard Worker is equivalent to calling RenderbufferStorageMultisampleANGLE with 197*8975f5c5SAndroid Build Coastguard Worker <samples> equal to zero." 198*8975f5c5SAndroid Build Coastguard Worker 199*8975f5c5SAndroid Build Coastguard Worker In section 4.4.5 (Framebuffer Completeness) in the subsection 200*8975f5c5SAndroid Build Coastguard Worker titled "Framebuffer Completeness" add an entry to the bullet list: 201*8975f5c5SAndroid Build Coastguard Worker 202*8975f5c5SAndroid Build Coastguard Worker * The value of RENDERBUFFER_SAMPLES_ANGLE is the same for all attached 203*8975f5c5SAndroid Build Coastguard Worker images. 204*8975f5c5SAndroid Build Coastguard Worker { FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE } 205*8975f5c5SAndroid Build Coastguard Worker 206*8975f5c5SAndroid Build Coastguard Worker Also add a paragraph to the end of the section after the definition 207*8975f5c5SAndroid Build Coastguard Worker of CheckFramebufferStatus: 208*8975f5c5SAndroid Build Coastguard Worker 209*8975f5c5SAndroid Build Coastguard Worker "The values of SAMPLE_BUFFERS and SAMPLES are derived from the 210*8975f5c5SAndroid Build Coastguard Worker attachments of the currently bound framebuffer object. If the 211*8975f5c5SAndroid Build Coastguard Worker current DRAW_FRAMEBUFFER_BINDING_ANGLE is not "framebuffer complete", 212*8975f5c5SAndroid Build Coastguard Worker then both SAMPLE_BUFFERS and SAMPLES are undefined. Otherwise, 213*8975f5c5SAndroid Build Coastguard Worker SAMPLES is equal to the value of RENDERBUFFER_SAMPLES_ANGLE for the 214*8975f5c5SAndroid Build Coastguard Worker attached images (which all must have the same value for 215*8975f5c5SAndroid Build Coastguard Worker RENDERBUFFER_SAMPLES_ANGLE). Further, SAMPLE_BUFFERS is one if 216*8975f5c5SAndroid Build Coastguard Worker SAMPLES is non-zero. Otherwise, SAMPLE_BUFFERS is zero. 217*8975f5c5SAndroid Build Coastguard Worker 218*8975f5c5SAndroid Build Coastguard WorkerAdditions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions) 219*8975f5c5SAndroid Build Coastguard Worker 220*8975f5c5SAndroid Build Coastguard Worker 221*8975f5c5SAndroid Build Coastguard WorkerAdditions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State 222*8975f5c5SAndroid Build Coastguard WorkerRequests) 223*8975f5c5SAndroid Build Coastguard Worker 224*8975f5c5SAndroid Build Coastguard Worker In section 6.1.3 (Enumeraged Queries), modify the third paragraph 225*8975f5c5SAndroid Build Coastguard Worker of the description of GetRenderbufferParameteriv as follows: 226*8975f5c5SAndroid Build Coastguard Worker 227*8975f5c5SAndroid Build Coastguard Worker "Upon successful return from GetRenderbufferParameteriv, if 228*8975f5c5SAndroid Build Coastguard Worker <pname> is RENDERBUFFER_WIDTH, RENDERBUFFER_HEIGHT, 229*8975f5c5SAndroid Build Coastguard Worker RENDERBUFFER_INTERNAL_FORMAT, or RENDERBUFFER_SAMPLES_ANGLE, then <params> 230*8975f5c5SAndroid Build Coastguard Worker will contain the width in pixels, height in pixels, internal format, or 231*8975f5c5SAndroid Build Coastguard Worker number of samples, respectively, of the image of the renderbuffer 232*8975f5c5SAndroid Build Coastguard Worker currently bound to <target>." 233*8975f5c5SAndroid Build Coastguard Worker 234*8975f5c5SAndroid Build Coastguard Worker 235*8975f5c5SAndroid Build Coastguard WorkerDependencies on ANGLE_framebuffer_blit 236*8975f5c5SAndroid Build Coastguard Worker 237*8975f5c5SAndroid Build Coastguard Worker ANGLE_framebuffer_blit is required. Technically, ANGLE_framebuffer_blit 238*8975f5c5SAndroid Build Coastguard Worker would not be required to support multisampled rendering, except for 239*8975f5c5SAndroid Build Coastguard Worker the fact that it provides the only method of doing a multisample 240*8975f5c5SAndroid Build Coastguard Worker resovle from a multisample renderbuffer. 241*8975f5c5SAndroid Build Coastguard Worker 242*8975f5c5SAndroid Build Coastguard WorkerDependencies on OES_texture_3D 243*8975f5c5SAndroid Build Coastguard Worker 244*8975f5c5SAndroid Build Coastguard Worker On an OpenGL ES implementation, in the absense of OES_texture_3D, 245*8975f5c5SAndroid Build Coastguard Worker omit references to CopyTexSubImage3DOES. 246*8975f5c5SAndroid Build Coastguard Worker 247*8975f5c5SAndroid Build Coastguard WorkerErrors 248*8975f5c5SAndroid Build Coastguard Worker 249*8975f5c5SAndroid Build Coastguard Worker The error INVALID_OPERATION is generated if ReadPixels or 250*8975f5c5SAndroid Build Coastguard Worker CopyTex{Sub}Image* is called while READ_FRAMEBUFFER_BINDING_ANGLE 251*8975f5c5SAndroid Build Coastguard Worker is non-zero, the read framebuffer is framebuffer complete, and the 252*8975f5c5SAndroid Build Coastguard Worker value of SAMPLE_BUFFERS for the read framebuffer is greater than 253*8975f5c5SAndroid Build Coastguard Worker zero. 254*8975f5c5SAndroid Build Coastguard Worker 255*8975f5c5SAndroid Build Coastguard Worker If both the draw and read framebuffers are framebuffer complete and 256*8975f5c5SAndroid Build Coastguard Worker the draw framebuffer has a value of SAMPLE_BUFFERS that is greater 257*8975f5c5SAndroid Build Coastguard Worker than zero, then the error INVALID_OPERATION is generated if 258*8975f5c5SAndroid Build Coastguard Worker BlitFramebufferANGLE is called. 259*8975f5c5SAndroid Build Coastguard Worker 260*8975f5c5SAndroid Build Coastguard Worker If both the draw and read framebuffers are framebuffer complete and 261*8975f5c5SAndroid Build Coastguard Worker the read framebuffer has a value of SAMPLE_BUFFERS that is greater 262*8975f5c5SAndroid Build Coastguard Worker than zero, the error INVALID_OPERATION is generated if 263*8975f5c5SAndroid Build Coastguard Worker BlitFramebufferANGLE is called and any of the following conditions 264*8975f5c5SAndroid Build Coastguard Worker are true: 265*8975f5c5SAndroid Build Coastguard Worker - <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT. 266*8975f5c5SAndroid Build Coastguard Worker - the source or destination rectangles do not specify the entire 267*8975f5c5SAndroid Build Coastguard Worker source or destination buffer. 268*8975f5c5SAndroid Build Coastguard Worker 269*8975f5c5SAndroid Build Coastguard Worker If both the draw and read framebuffers are framebuffer complete and 270*8975f5c5SAndroid Build Coastguard Worker either has a value of SAMPLE_BUFFERS that is greater than zero, then 271*8975f5c5SAndroid Build Coastguard Worker the error INVALID_OPERATION is generated if BlitFramebufferANGLE is 272*8975f5c5SAndroid Build Coastguard Worker called and the formats of the draw and read framebuffers are not 273*8975f5c5SAndroid Build Coastguard Worker identical. 274*8975f5c5SAndroid Build Coastguard Worker 275*8975f5c5SAndroid Build Coastguard Worker If either the draw or read framebuffer is framebuffer complete and 276*8975f5c5SAndroid Build Coastguard Worker has a value of SAMPLE_BUFFERS that is greater than zero, then the 277*8975f5c5SAndroid Build Coastguard Worker error INVALID_OPERATION is generated if BlitFramebufferANGLE is called 278*8975f5c5SAndroid Build Coastguard Worker and the specified source and destination dimensions are not 279*8975f5c5SAndroid Build Coastguard Worker identical. 280*8975f5c5SAndroid Build Coastguard Worker 281*8975f5c5SAndroid Build Coastguard Worker If RenderbufferStorageMultisampleANGLE is called with <target> not 282*8975f5c5SAndroid Build Coastguard Worker equal to RENDERBUFFER, the error INVALID_ENUM is generated. 283*8975f5c5SAndroid Build Coastguard Worker 284*8975f5c5SAndroid Build Coastguard Worker If RenderbufferStorageMultisampleANGLE is called with an 285*8975f5c5SAndroid Build Coastguard Worker <internalformat> that is not listed as one of the color-, depth- 286*8975f5c5SAndroid Build Coastguard Worker or stencil-renderable formats in Table 4.5, then the error 287*8975f5c5SAndroid Build Coastguard Worker INVALID_ENUM is generated. 288*8975f5c5SAndroid Build Coastguard Worker 289*8975f5c5SAndroid Build Coastguard Worker If RenderbufferStorageMultisampleANGLE is called with <width> or 290*8975f5c5SAndroid Build Coastguard Worker <height> greater than MAX_RENDERBUFFER_SIZE, then the error 291*8975f5c5SAndroid Build Coastguard Worker INVALID_VALUE is generated. 292*8975f5c5SAndroid Build Coastguard Worker 293*8975f5c5SAndroid Build Coastguard Worker If RenderbufferStorageMultisampleANGLE is called with a value of 294*8975f5c5SAndroid Build Coastguard Worker <samples> that is greater than MAX_SAMPLES_ANGLE or less than zero, 295*8975f5c5SAndroid Build Coastguard Worker then the error INVALID_VALUE is generated. 296*8975f5c5SAndroid Build Coastguard Worker 297*8975f5c5SAndroid Build Coastguard Worker The error OUT_OF_MEMORY is generated when 298*8975f5c5SAndroid Build Coastguard Worker RenderbufferStorageMultisampleANGLE cannot create storage of the 299*8975f5c5SAndroid Build Coastguard Worker specified size. 300*8975f5c5SAndroid Build Coastguard Worker 301*8975f5c5SAndroid Build Coastguard WorkerNew State 302*8975f5c5SAndroid Build Coastguard Worker 303*8975f5c5SAndroid Build Coastguard Worker Add to table 6.22 (Renderbuffer State) 304*8975f5c5SAndroid Build Coastguard Worker 305*8975f5c5SAndroid Build Coastguard Worker Get Value Type Get Command Initial Value Description Section 306*8975f5c5SAndroid Build Coastguard Worker ------------------------------- ------ -------------------------- ------------- -------------------- ------- 307*8975f5c5SAndroid Build Coastguard Worker RENDERBUFFER_SAMPLES_ANGLE Z+ GetRenderbufferParameteriv 0 number of samples 4.4.3 308*8975f5c5SAndroid Build Coastguard Worker 309*8975f5c5SAndroid Build Coastguard Worker 310*8975f5c5SAndroid Build Coastguard Worker Add to table 6.yy (Framebuffer Dependent Vaues) (added by 311*8975f5c5SAndroid Build Coastguard Worker ANGLE_framebuffer_blit), the following new framebuffer dependent state. 312*8975f5c5SAndroid Build Coastguard Worker 313*8975f5c5SAndroid Build Coastguard Worker Get Value Type Get Command Minimum Value Description Section 314*8975f5c5SAndroid Build Coastguard Worker ----------------- ---- ----------- ------------- ------------------- ------- 315*8975f5c5SAndroid Build Coastguard Worker MAX_SAMPLES_ANGLE Z+ GetIntegerv 1 Maximum number of 4.4.3 316*8975f5c5SAndroid Build Coastguard Worker samples supported 317*8975f5c5SAndroid Build Coastguard Worker for multisampling 318*8975f5c5SAndroid Build Coastguard Worker 319*8975f5c5SAndroid Build Coastguard Worker 320*8975f5c5SAndroid Build Coastguard Worker 321*8975f5c5SAndroid Build Coastguard WorkerIssues 322*8975f5c5SAndroid Build Coastguard Worker 323*8975f5c5SAndroid Build Coastguard Worker Issues from EXT_framebuffer_multisample have been removed. 324*8975f5c5SAndroid Build Coastguard Worker 325*8975f5c5SAndroid Build Coastguard Worker 1) What should we call this extension? 326*8975f5c5SAndroid Build Coastguard Worker 327*8975f5c5SAndroid Build Coastguard Worker Resolved: ANGLE_framebuffer_blit. 328*8975f5c5SAndroid Build Coastguard Worker 329*8975f5c5SAndroid Build Coastguard Worker This extension is a result of a collaboration between Google and 330*8975f5c5SAndroid Build Coastguard Worker TransGaming for the open-source ANGLE project. Typically one would 331*8975f5c5SAndroid Build Coastguard Worker label a multi-vendor extension as EXT, but EXT_framebuffer_mulitsample 332*8975f5c5SAndroid Build Coastguard Worker is already the name for this on Desktop GL. Additionally this 333*8975f5c5SAndroid Build Coastguard Worker isn't truely a multi-vendor extension because there is only one 334*8975f5c5SAndroid Build Coastguard Worker implementation of this. We'll follow the example of the open-source 335*8975f5c5SAndroid Build Coastguard Worker MESA project which uses the project name for the vendor suffix. 336*8975f5c5SAndroid Build Coastguard Worker 337*8975f5c5SAndroid Build Coastguard Worker 2) How does this extension differ from EXT_framebuffer_multisample? 338*8975f5c5SAndroid Build Coastguard Worker 339*8975f5c5SAndroid Build Coastguard Worker This is designed to be a proper subset of EXT_framebuffer_multisample 340*8975f5c5SAndroid Build Coastguard Worker functionality as applicable to OpenGL ES 2.0. 341*8975f5c5SAndroid Build Coastguard Worker 342*8975f5c5SAndroid Build Coastguard Worker Functionality that is unchanged: 343*8975f5c5SAndroid Build Coastguard Worker - creation of multisample renderbuffers. 344*8975f5c5SAndroid Build Coastguard Worker - whole buffer multi-sample->single-sample resolve. 345*8975f5c5SAndroid Build Coastguard Worker - no format conversions, stretching or flipping supported on multisample blits. 346*8975f5c5SAndroid Build Coastguard Worker 347*8975f5c5SAndroid Build Coastguard Worker Additional restrictions on BlitFramebufferANGLE: 348*8975f5c5SAndroid Build Coastguard Worker - multisample resolve is only supported on color buffers. 349*8975f5c5SAndroid Build Coastguard Worker - no blits to multisample destinations (no single->multi or multi-multi). 350*8975f5c5SAndroid Build Coastguard Worker - only entire buffers can be resolved. 351*8975f5c5SAndroid Build Coastguard Worker 352*8975f5c5SAndroid Build Coastguard WorkerRevision History 353*8975f5c5SAndroid Build Coastguard Worker 354*8975f5c5SAndroid Build Coastguard Worker Revision 1, 2010/07/08 355*8975f5c5SAndroid Build Coastguard Worker - copied from revision 7 of EXT_framebuffer_multisample 356*8975f5c5SAndroid Build Coastguard Worker - removed language that was not relevant to ES2 357*8975f5c5SAndroid Build Coastguard Worker - rebase changes against the Open GL ES 2.0 specification 358*8975f5c5SAndroid Build Coastguard Worker - added ANGLE-specific restrictions 359*8975f5c5SAndroid Build Coastguard Worker Revision 2, 2010/07/19 360*8975f5c5SAndroid Build Coastguard Worker - fix missing error code 361*8975f5c5SAndroid Build Coastguard Worker Revision 3, 2010/08/06 362*8975f5c5SAndroid Build Coastguard Worker - add additional contributors, update implementation status 363*8975f5c5SAndroid Build Coastguard Worker - disallow negative samples 364