diff options
author | daniel@transgaming.com <daniel@transgaming.com@736b8ea6-26fd-11df-bfd4-992fa37f6226> | 2011-04-06 18:45:47 +0000 |
---|---|---|
committer | daniel@transgaming.com <daniel@transgaming.com@736b8ea6-26fd-11df-bfd4-992fa37f6226> | 2011-04-06 18:45:47 +0000 |
commit | 6cfe67878619269473b2ee7091d611d953074294 (patch) | |
tree | 2ea92f770c7711fdd8903dbd6d03e91d3103cb56 /extensions | |
parent | 0b8d4eb260eec6b3b2c32b88a2bfe400f1cfb0c0 (diff) | |
download | angle-6cfe67878619269473b2ee7091d611d953074294.tar.gz |
Add ANGLE extension specifications
git-svn-id: https://angleproject.googlecode.com/svn/trunk@608 736b8ea6-26fd-11df-bfd4-992fa37f6226
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/ANGLE_framebuffer_blit.txt | 427 | ||||
-rw-r--r-- | extensions/ANGLE_framebuffer_multisample.txt | 363 | ||||
-rw-r--r-- | extensions/EGL_ANGLE_query_surface_pointer.txt | 88 | ||||
-rw-r--r-- | extensions/EGL_ANGLE_surface_d3d_texture_2d_share_handle.txt | 95 |
4 files changed, 973 insertions, 0 deletions
diff --git a/extensions/ANGLE_framebuffer_blit.txt b/extensions/ANGLE_framebuffer_blit.txt new file mode 100644 index 00000000..71a7f580 --- /dev/null +++ b/extensions/ANGLE_framebuffer_blit.txt @@ -0,0 +1,427 @@ +Name + + ANGLE_framebuffer_blit + +Name Strings + + GL_ANGLE_framebuffer_blit + +Contributors + + Contributors to EXT_framebuffer_blit + Daniel Koch, TransGaming Inc. + Shannon Woods, TransGaming Inc. + Kenneth Russell, Google Inc. + Vangelis Kokkevis, Google Inc. + +Contact + + Daniel Koch, TransGaming Inc. (daniel 'at' transgaming 'dot' com) + +Status + + Implemented in ANGLE ES2 + +Version + + Last Modified Date: Aug 6, 2010 + Author Revision: 3 + +Number + + OpenGL ES Extension #83 + +Dependencies + + OpenGL ES 2.0 is required. + + The extension is written against the OpenGL ES 2.0 specification. + + OES_texture_3D affects the definition of this extension. + +Overview + + This extension modifies framebuffer objects by splitting the + framebuffer object binding point into separate DRAW and READ + bindings. This allows copying directly from one framebuffer to + another. In addition, a new high performance blit function is + added to facilitate these blits and perform some data conversion + where allowed. + +IP Status + + No known IP claims. + +New Procedures and Functions + + void BlitFramebufferANGLE(int srcX0, int srcY0, int srcX1, int srcY1, + int dstX0, int dstY0, int dstX1, int dstY1, + bitfield mask, enum filter); + +New Tokens + + Accepted by the <target> parameter of BindFramebuffer, + CheckFramebufferStatus, FramebufferTexture2D, FramebufferTexture3DOES, + FramebufferRenderbuffer, and + GetFramebufferAttachmentParameteriv: + + // (reusing the tokens from EXT_framebuffer_blit) + READ_FRAMEBUFFER_ANGLE 0x8CA8 + DRAW_FRAMEBUFFER_ANGLE 0x8CA9 + + Accepted by the <pname> parameters of GetIntegerv and GetFloatv: + + // (reusing the tokens from EXT_framebuffer_blit) + DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 // alias FRAMEBUFFER_BINDING + READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA + + +Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization) + + Change the last paragraph of section 3.7.2 (Alternate Texture Image + Specification Commands) to: + + "Calling CopyTexSubImage3DOES, CopyTexImage2D or CopyTexSubImage2D will + result in an INVALID_FRAMEBUFFER_OPERATION error if the object bound + to READ_FRAMEBUFFER_BINDING_ANGLE is not "framebuffer complete" + (section 4.4.4.2)." + +Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment +Operations and the Framebuffer) + + Change the first word of Chapter 4 from "The" to "A". + + Append to the introduction of Chapter 4: + + "Conceptually, the GL has two active framebuffers; the draw + framebuffer is the destination for rendering operations, and the + read framebuffer is the source for readback operations. The same + framebuffer may be used for both drawing and reading. Section + 4.4.1 describes the mechanism for controlling framebuffer usage." + + Modify the first sentence of the last paragraph of section 4.1.1 as follows: + + "While an application-created framebuffer object is bound to + DRAW_FRAMEBUFFER_ANGLE, the pixel ownership test always passes." + + Add to 4.3.1 (Reading Pixels), right before the subsection titled + "Obtaining Pixels from the Framebuffer": + + "Calling ReadPixels generates INVALID_FRAMEBUFFER_OPERATION if + the object bound to READ_FRAMEBUFFER_BINDING_ANGLE is not "framebuffer + complete" (section 4.4.4.2)." + + Insert a new section 4.3.2 titled "Copying Pixels" and renumber the + subsequent sections. Add the following text: + + "BlitFramebufferANGLE transfers a rectangle of pixel values from one + region of the read framebuffer to another in the draw framebuffer. + + BlitFramebufferANGLE(int srcX0, int srcY0, int srcX1, int srcY1, + int dstX0, int dstY0, int dstX1, int dstY1, + bitfield mask, enum filter); + + <mask> is the bitwise OR of a number of values indicating which + buffers are to be copied. The values are COLOR_BUFFER_BIT, + DEPTH_BUFFER_BIT, and STENCIL_BUFFER_BIT, which are described in + section 4.2.3. The pixels corresponding to these buffers are + copied from the source rectangle, bound by the locations (srcX0, + srcY0) and (srcX1, srcY1), to the destination rectangle, bound by + the locations (dstX0, dstY0) and (dstX1, dstY1). The lower bounds + of the rectangle are inclusive, while the upper bounds are + exclusive. + + The actual region taken from the read framebuffer is limited to the + intersection of the source buffers being transferred, which may include + the color buffer, the depth buffer, and/or the stencil buffer depending on + <mask>. The actual region written to the draw framebuffer is limited to the + intersection of the destination buffers being written, which may include + the color buffer, the depth buffer, and/or the stencil buffer + depending on <mask>. Whether or not the source or destination regions are + altered due to these limits, the offset applied to pixels being transferred + is performed as though no such limits were present. + + Stretching and scaling during a copy are not supported. If the source + and destination rectangle dimensions do not match, no copy is + performed and an INVALID_OPERATION error is generated. + Because stretching is not supported, <filter> must be NEAREST and + no filtering is applied. + + Flipping during a copy is not supported. If either the source or + destination rectangle specifies a negative dimension, the error + INVALID_OPERATION is generated. If both the source and + destination rectangles specify a negative dimension for the same + direction, no reversal is required and the operation is supported. + + If the source and destination buffers are identical, and the + source and destination rectangles overlap, the result of the blit + operation is undefined. + + The pixel copy bypasses the fragment pipeline. The only fragment + operations which affect the blit are the pixel ownership test and + the scissor test. + + If a buffer is specified in <mask> and does not exist in both the + read and draw framebuffers, the corresponding bit is silently + ignored. + + Calling BlitFramebufferANGLE will result in an + INVALID_FRAMEBUFFER_OPERATION error if the objects bound to + DRAW_FRAMEBUFFER_BINDING_ANGLE and READ_FRAMEBUFFER_BINDING_ANGLE are + not "framebuffer complete" (section 4.4.4.2)." + + Calling BlitFramebufferANGLE will result in an INVALID_OPERATION + error if <mask> includes COLOR_BUFFER_BIT and the source and + destination color formats to not match. + + Calling BlitFramebufferANGLE will result in an INVALID_OPERATION + error if <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT + and the source and destination depth and stencil buffer formats do + not match. + + If <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT, only + complete buffers can be copied. If the source rectangle does not + specify the complete source buffer or the destination rectangle + (after factoring the scissor region, if applicable) does not specify + the complete destination buffer, an INVALID_OPERATION + error is generated. + + Modify the beginning of section 4.4.1 as follows: + + "The default framebuffer for rendering and readback operations is + provided by the windowing system. In addition, named framebuffer + objects can be created and operated upon. The namespace for + framebuffer objects is the unsigned integers, with zero reserved + by the GL for the default framebuffer. + + A framebuffer object is created by binding an unused name to + DRAW_FRAMEBUFFER_ANGLE or READ_FRAMEBUFFER_ANGLE. The binding is + effected by calling + + void BindFramebuffer(enum target, uint framebuffer); + + with <target> set to the desired framebuffer target and + <framebuffer> set to the unused name. The resulting framebuffer + object is a new state vector, comprising one set of the state values + listed in table 6.23 for each attachment point of the + framebuffer, set to the same initial values. There is one + color attachment point, plus one each + for the depth and stencil attachment points. + + BindFramebuffer may also be used to bind an existing + framebuffer object to DRAW_FRAMEBUFFER_ANGLE or + READ_FRAMEBUFFER_ANGLE. If the bind is successful no change is made + to the state of the bound framebuffer object, and any previous + binding to <target> is broken. + + If a framebuffer object is bound to DRAW_FRAMEBUFFER_ANGLE or + READ_FRAMEBUFFER_ANGLE, it becomes the target for rendering or + readback operations, respectively, until it is deleted or another + framebuffer is bound to the corresponding bind point. Calling + BindFramebuffer with <target> set to FRAMEBUFFER binds the + framebuffer to both DRAW_FRAMEBUFFER_ANGLE and READ_FRAMEBUFFER_ANGLE. + + While a framebuffer object is bound, GL operations on the target + to which it is bound affect the images attached to the bound + framebuffer object, and queries of the target to which it is bound + return state from the bound object. Queries of the values + specified in table 6.20 (Implementation Dependent Pixel Depths) + and table 6.yy (Framebuffer Dependent Values) are + derived from the framebuffer object bound to DRAW_FRAMEBUFFER_ANGLE. + + The initial state of DRAW_FRAMEBUFFER_ANGLE and READ_FRAMEBUFFER_ANGLE + refers to the default framebuffer provided by the windowing + system. In order that access to the default framebuffer is not + lost, it is treated as a framebuffer object with the name of 0. + The default framebuffer is therefore rendered to and read from + while 0 is bound to the corresponding targets. On some + implementations, the properties of the default framebuffer can + change over time (e.g., in response to windowing system events + such as attaching the context to a new windowing system drawable.)" + + Change the description of DeleteFramebuffers as follows: + + "<framebuffers> contains <n> names of framebuffer objects to be + deleted. After a framebuffer object is deleted, it has no + attachments, and its name is again unused. If a framebuffer that + is currently bound to one or more of the targets + DRAW_FRAMEBUFFER_ANGLE or READ_FRAMEBUFFER_ANGLE is deleted, it is as + though BindFramebuffer had been executed with the corresponding + <target> and <framebuffer> zero. Unused names in <framebuffers> + are silently ignored, as is the value zero." + + + In section 4.4.3 (Renderbuffer Objects), modify the first two sentences + of the description of FramebufferRenderbuffer as follows: + + "<target> must be DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE, or + FRAMEBUFFER. If <target> is FRAMEBUFFER, it behaves as + though DRAW_FRAMEBUFFER_ANGLE was specified. The INVALID_OPERATION + error is generated if the value of the corresponding binding is zero." + + In section 4.4.3 (Renderbuffer Objects), modify the first two sentences + of the description of FramebufferTexture2D as follows: + + "<target> must be DRAW_FRAMEBUFFER_ANGLE, + READ_FRAMEBUFFER_ANGLE, or FRAMEBUFFER. If <target> is + FRAMEBUFFER, it behaves as though DRAW_FRAMEBUFFER_ANGLE was + specified. The INVALID_OPERATION error is generated if the value of the + corresponding binding is zero." + + In section 4.4.5 (Framebuffer Completeness), modify the first sentence + of the description of CheckFramebufferStatus as follows: + + "If <target> is not DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE or + FRAMEBUFFER, the error INVALID_ENUM is generated. If <target> is + FRAMEBUFFER, it behaves as though DRAW_FRAMEBUFFER_ANGLE was + specified." + + Modify the first sentence of the subsection titled "Effects of Framebuffer + Completeness on Framebuffer Operations" to be: + + "Attempting to render to or read from a framebuffer which is not + framebuffer complete will generate an + INVALID_FRAMEBUFFER_OPERATION error." + + + +Additions to Chapter 6 of the OpenGL 1.5 Specification (State and State +Requests) + + In section 6.1.3, modify the first sentence of the description of + GetFramebufferAttachmentParameteriv as follows: + + "<target> must be DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE or + FRAMEBUFFER. If <target> is FRAMEBUFFER, it behaves as + though DRAW_FRAMEBUFFER_ANGLE was specified." + + Modify the title of Table 6.23 (Framebuffer State) to be "Framebuffer + (state per attachment point)". + + +Dependencies on OES_texture_3D + + On an OpenGL ES implementation, in the absense of OES_texture_3D, + omit references to FramebufferTexture3DOES and CopyTexSubImage3DOES. + +Errors + + The error INVALID_FRAMEBUFFER_OPERATION is generated if + BlitFramebufferANGLE is called while the + draw framebuffer is not framebuffer complete. + + The error INVALID_FRAMEBUFFER_OPERATION is generated if + BlitFramebufferANGLE, ReadPixels, CopyTex{Sub}Image*, is called while the + read framebuffer is not framebuffer complete. + + The error INVALID_VALUE is generated by BlitFramebufferANGLE if + <mask> has any bits set other than those named by + COLOR_BUFFER_BIT, DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT. + + The error INVALID_OPERATION is generated if BlitFramebufferANGLE is + called and <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT + and the source and destination depth or stencil buffer formats do + not match. + + The error INVALID_OPERATION is generated if BlitFramebufferANGLE is + called and any of the following conditions are true: + - the source and destination rectangle dimensions do not match + (ie scaling or flipping is required). + - <mask> includes COLOR_BUFFER_BIT and the source and destination + buffer formats do not match. + - <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT and the + source or destination rectangles do not specify the entire source + or destination buffer (after applying any scissor region). + + The error INVALID_ENUM is generated by BlitFramebufferANGLE if + <filter> is not NEAREST. + + The error INVALID_ENUM is generated if BindFramebuffer, + CheckFramebufferStatus, FramebufferTexture{2D|3DOES}, + FramebufferRenderbuffer, or + GetFramebufferAttachmentParameteriv is called and <target> is + not DRAW_FRAMEBUFFER_ANGLE, READ_FRAMEBUFFER_ANGLE or FRAMEBUFFER. + +New State + + (Add a new table 6.xx, "Framebuffer (state per framebuffer target binding point)") + + Get Value Type Get Command Initial Value Description Section + ------------------------------ ---- ----------- -------------- ------------------- ------------ + DRAW_FRAMEBUFFER_BINDING_ANGLE Z+ GetIntegerv 0 framebuffer object bound 4.4.1 + to DRAW_FRAMEBUFFER_ANGLE + READ_FRAMEBUFFER_BINDING_ANGLE Z+ GetIntegerv 0 framebuffer object 4.4.1 + to READ_FRAMEBUFFER_ANGLE + + Remove reference to FRAMEBUFFER_BINDING from Table 6.23. + + (Add a new table 6.yy, "Framebuffer Dependent Values") + + Get Value Type Get Command Initial Value Description Section + ---------------------------- ---- ----------- -------------- ------------------- ------------ + SAMPLE_BUFFERS Z+ GetIntegerv 0 Number of multisample 3.2 + buffers + SAMPLES Z+ GetIntegerv 0 Coverage mask size 3.2 + + Remove the references to SAMPLE_BUFFERS and SAMPLES from Table 6.17. + + +Issues + + 1) What should we call this extension? + + Resolved: ANGLE_framebuffer_blit. + + This extension is a result of a collaboration between Google and + TransGaming for the open-source ANGLE project. Typically one would + label a multi-vendor extension as EXT, but EXT_framebuffer_blit + is already the name for this on Desktop GL. Additionally this + isn't truely a multi-vendor extension because there is only one + implementation of this. We'll follow the example of the open-source + MESA project which uses the project name for the vendor suffix. + + 2) Why is this done as a separate extension instead of just supporting + EXT_framebuffer_blit? + + To date, EXT_framebuffer_blit has not had interactions with OpenGL ES + specified and, as far as we know, it has not previously been exposed on + an ES 1.1 or ES 2.0 implementation. Because there are enough + differences between Desktop GL and OpenGL ES, and since OpenGL ES 2.0 + has already subsumed the EXT_framebuffer_object functionality (with + some changes) it was deemed a worthwhile exercise to fully specify the + interactions. Additionally, some of the choices in exactly which + functionality is supported by BlitFramebufferANGLE is dictated by + what is reasonable to support on a implementation which is + layered on Direct3D9. It is not expected that other implementations + will necessary have the same set of restrictions or requirements. + + 3) How does this extension differ from EXT_framebuffer_blit? + + This extension is designed to be a pure subset of the + EXT_framebuffer_blit functionality as applicable to OpenGL ES 2.0. + + Functionality that is unchanged: + - the split DRAW and READ framebuffer attachment points and related sematics. + - the token values for the DRAW/READ_FRAMEBUFFER and DRAW/READ_FRAMBUFFER_BINDING + - the signature of the BlitFramebuffer entry-point. + + Additional restrictions imposed by BlitFramebufferANGLE: + - no color conversions are supported + - no scaling, stretching or flipping are supported + - no filtering is supported (a consequence of no stretching) + - only whole depth and/or stencil buffers can be copied + +Revision History + + Revision 1, 2010/07/06 + - copied from revision 15 of EXT_framebuffer_object + - removed language that was clearly not relevant to ES2 + - rebased changes against the OpenGL ES 2.0 specification + - added ANGLE-specific restrictions + Revision 2, 2010/07/15 + - clarifications of implicit clamping to buffer sizes (from ARB_fbo) + - clarify that D/S restricts apply after the scissor is applied + - improve some error language + Revision 3, 2010/08/06 + - add additional contributors, update implementation status + diff --git a/extensions/ANGLE_framebuffer_multisample.txt b/extensions/ANGLE_framebuffer_multisample.txt new file mode 100644 index 00000000..cf5e4583 --- /dev/null +++ b/extensions/ANGLE_framebuffer_multisample.txt @@ -0,0 +1,363 @@ +Name + + ANGLE_framebuffer_multisample + +Name Strings + + GL_ANGLE_framebuffer_multisample + +Contributors + + Contributors to EXT_framebuffer_multisample + Daniel Koch, TransGaming Inc. + Shannon Woods, TransGaming Inc. + Kenneth Russell, Google Inc. + Vangelis Kokkevis, Google Inc. + +Contacts + + Daniel Koch, TransGaming Inc. (daniel 'at' transgaming 'dot' com) + +Status + + Implemented in ANGLE ES2 + +Version + + Last Modified Date: Aug 6, 2010 + Author Revision: #3 + +Number + + OpenGL ES Extension #84 + +Dependencies + + Requires OpenGL ES 2.0. + + Requires GL_ANGLE_framebuffer_blit (or equivalent functionality). + + The extension is written against the OpenGL ES 2.0 specification. + + OES_texture_3D affects the definition of this extension. + +Overview + + This extension extends the framebuffer object framework to + enable multisample rendering. + + The new operation RenderbufferStorageMultisampleANGLE() allocates + storage for a renderbuffer object that can be used as a multisample + buffer. A multisample render buffer image differs from a + single-sample render buffer image in that a multisample image has a + number of SAMPLES that is greater than zero. No method is provided + for creating multisample texture images. + + All of the framebuffer-attachable images attached to a framebuffer + object must have the same number of SAMPLES or else the framebuffer + object is not "framebuffer complete". If a framebuffer object with + multisample attachments is "framebuffer complete", then the + framebuffer object behaves as if SAMPLE_BUFFERS is one. + + The resolve operation is affected by calling + BlitFramebufferANGLE (provided by the ANGLE_framebuffer_blit + extension) where the source is a multisample application-created + framebuffer object and the destination is a single-sample + framebuffer object (either application-created or window-system + provided). + +New Procedures and Functions + + void RenderbufferStorageMultisampleANGLE( + enum target, sizei samples, + enum internalformat, + sizei width, sizei height); + +New Types + + None. + +New Tokens + + Accepted by the <pname> parameter of GetRenderbufferParameteriv: + + RENDERBUFFER_SAMPLES_ANGLE 0x8CAB + + Returned by CheckFramebufferStatus: + + FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56 + + Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + and GetFloatv: + + MAX_SAMPLES_ANGLE 0x8D57 + +Additions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL Operation) + +Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization) + + Add to the last paragraph of 3.7.2 (Alternate Texture Image Specification) + (as modified by ANGLE_framebuffer_blit) the following: + + "Calling CopyTexSubImage3DOES, CopyTexImage2D or CopyTexSubImage2D will + result in INVALID_OPERATION being generated if the object bound to + READ_FRAMEBUFFER_BINDING_ANGLE is "framebuffer complete" and the value + of SAMPLE_BUFFERS is greater than zero." + +Additions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment +Operations and the Framebuffer) + + Add to 4.3.1 (Reading Pixels), right before the subsection titled + "Obtaining Pixels from the Framebuffer": + + "ReadPixels generates INVALID_OPERATION if READ_FRAMEBUFFER_BINDING_ANGLE + (section 4.4) is non-zero, the read framebuffer is framebuffer + complete, and the value of SAMPLE_BUFFERS for the read framebuffer + is greater than zero." + + In 4.3.2 (Copying Pixels), add to the section describing BlitFramebuffer + that was added by ANGLE_framebuffer_blit. + + "If SAMPLE_BUFFERS for the read framebuffer is greater than zero and + SAMPLE_BUFFERS for the draw framebuffer is zero, the samples + corresponding to each pixel location in the source are converted to + a single sample before being written to the destination. + + If SAMPLE_BUFFERS for the draw framebuffer is greater than zero, + no copy is performed and an INVALID_OPERATION error is generated. + + If SAMPLE_BUFFERS for the read framebuffer is greater than zero and + <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT, no copy is + performed and an INVALID_OPERATION error is generated. + + If SAMPLE_BUFFERS for the read framebuffer is greater than zero and + the format of the read and draw framebuffers are not identical, no + copy is performed and an INVALID_OPERATION error is generated. + + If SAMPLE_BUFFERS for the read framebuffer is greater than zero, the + dimensions of the source and destination rectangles provided to + BlitFramebufferANGLE must be identical and must specify the complete + source and destination buffers, otherwise no copy is performed and + an INVALID_OPERATION error is generated." + + Modification to 4.4.3 (Renderbuffer Objects) + + Add, just above the definition of RenderbufferStorage: + + "The command + + void RenderbufferStorageMultisampleANGLE( + enum target, sizei samples, + enum internalformat, + sizei width, sizei height); + + establishes the data storage, format, dimensions, and number of + samples of a renderbuffer object's image. <target> must be + RENDERBUFFER. <internalformat> must be one of the color-renderable, + depth-renderable, or stencil-renderable formats described in table 4.5. + <width> and <height> are the dimensions in pixels of the renderbuffer. If + either <width> or <height> is greater than the value of + MAX_RENDERBUFFER_SIZE, or if <samples> is greater than MAX_SAMPLES_ANGLE, + then the error INVALID_VALUE is generated. If OpenGL ES is unable to + create a data store of the requested size, the error OUT_OF_MEMORY + is generated. + + Upon success, RenderbufferStorageMultisampleANGLE deletes any existing + data store for the renderbuffer image and the contents of the data + store after calling RenderbufferStorageMultisampleANGLE are undefined. + RENDERBUFFER_WIDTH is set to <width>, RENDERBUFFER_HEIGHT is + set to <height>, and RENDERBUFFER_INTERNAL_FORMAT is set to + <internalformat>. + + If <samples> is zero, then RENDERBUFFER_SAMPLES_ANGLE is set to zero. + Otherwise <samples> represents a request for a desired minimum + number of samples. Since different implementations may support + different sample counts for multisampled rendering, the actual + number of samples allocated for the renderbuffer image is + implementation dependent. However, the resulting value for + RENDERBUFFER_SAMPLES_ANGLE is guaranteed to be greater than or equal + to <samples> and no more than the next larger sample count supported + by the implementation. + + An OpenGL ES implementation may vary its allocation of internal component + resolution based on any RenderbufferStorageMultisampleANGLE parameter (except + target), but the allocation and chosen internal format must not be a + function of any other state and cannot be changed once they are + established. The actual resolution in bits of each component of the + allocated image can be queried with GetRenderbufferParameteriv." + + Modify the definiton of RenderbufferStorage as follows: + + "The command + + void RenderbufferStorage(enum target, enum internalformat, + sizei width, sizei height); + + is equivalent to calling RenderbufferStorageMultisampleANGLE with + <samples> equal to zero." + + In section 4.4.5 (Framebuffer Completeness) in the subsection + titled "Framebuffer Completeness" add an entry to the bullet list: + + * The value of RENDERBUFFER_SAMPLES_ANGLE is the same for all attached + images. + { FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE } + + Also add a paragraph to the end of the section after the definition + of CheckFramebufferStatus: + + "The values of SAMPLE_BUFFERS and SAMPLES are derived from the + attachments of the currently bound framebuffer object. If the + current DRAW_FRAMEBUFFER_BINDING_ANGLE is not "framebuffer complete", + then both SAMPLE_BUFFERS and SAMPLES are undefined. Otherwise, + SAMPLES is equal to the value of RENDERBUFFER_SAMPLES_ANGLE for the + attached images (which all must have the same value for + RENDERBUFFER_SAMPLES_ANGLE). Further, SAMPLE_BUFFERS is one if + SAMPLES is non-zero. Otherwise, SAMPLE_BUFFERS is zero. + +Additions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions) + + +Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State +Requests) + + In section 6.1.3 (Enumeraged Queries), modify the third paragraph + of the description of GetRenderbufferParameteriv as follows: + + "Upon successful return from GetRenderbufferParameteriv, if + <pname> is RENDERBUFFER_WIDTH, RENDERBUFFER_HEIGHT, + RENDERBUFFER_INTERNAL_FORMAT, or RENDERBUFFER_SAMPLES_ANGLE, then <params> + will contain the width in pixels, height in pixels, internal format, or + number of samples, respectively, of the image of the renderbuffer + currently bound to <target>." + + +Dependencies on ANGLE_framebuffer_blit + + ANGLE_framebuffer_blit is required. Technically, ANGLE_framebuffer_blit + would not be required to support multisampled rendering, except for + the fact that it provides the only method of doing a multisample + resovle from a multisample renderbuffer. + +Dependencies on OES_texture_3D + + On an OpenGL ES implementation, in the absense of OES_texture_3D, + omit references to CopyTexSubImage3DOES. + +Errors + + The error INVALID_OPERATION is generated if ReadPixels or + CopyTex{Sub}Image* is called while READ_FRAMEBUFFER_BINDING_ANGLE + is non-zero, the read framebuffer is framebuffer complete, and the + value of SAMPLE_BUFFERS for the read framebuffer is greater than + zero. + + If both the draw and read framebuffers are framebuffer complete and + the draw framebuffer has a value of SAMPLE_BUFFERS that is greater + than zero, then the error INVALID_OPERATION is generated if + BlitFramebufferANGLE is called. + + If both the draw and read framebuffers are framebuffer complete and + the read framebuffer has a value of SAMPLE_BUFFERS that is greater + than zero, the error INVALID_OPERATION is generated if + BlitFramebufferANGLE is called and any of the following conditions + are true: + - <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT. + - the source or destination rectangles do not specify the entire + source or destination buffer. + + If both the draw and read framebuffers are framebuffer complete and + either has a value of SAMPLE_BUFFERS that is greater than zero, then + the error INVALID_OPERATION is generated if BlitFramebufferANGLE is + called and the formats of the draw and read framebuffers are not + identical. + + If either the draw or read framebuffer is framebuffer complete and + has a value of SAMPLE_BUFFERS that is greater than zero, then the + error INVALID_OPERATION is generated if BlitFramebufferANGLE is called + and the specified source and destination dimensions are not + identical. + + If RenderbufferStorageMultisampleANGLE is called with <target> not + equal to RENDERBUFFER, the error INVALID_ENUM is generated. + + If RenderbufferStorageMultisampleANGLE is called with an + <internalformat> that is not listed as one of the color-, depth- + or stencil-renderable formats in Table 4.5, then the error + INVALID_ENUM is generated. + + If RenderbufferStorageMultisampleANGLE is called with <width> or + <height> greater than MAX_RENDERBUFFER_SIZE, then the error + INVALID_VALUE is generated. + + If RenderbufferStorageMultisampleANGLE is called with a value of + <samples> that is greater than MAX_SAMPLES_ANGLE or less than zero, + then the error INVALID_VALUE is generated. + + The error OUT_OF_MEMORY is generated when + RenderbufferStorageMultisampleANGLE cannot create storage of the + specified size. + +New State + + Add to table 6.22 (Renderbuffer State) + + Get Value Type Get Command Initial Value Description Section + ------------------------------- ------ -------------------------- ------------- -------------------- ------- + RENDERBUFFER_SAMPLES_ANGLE Z+ GetRenderbufferParameteriv 0 number of samples 4.4.3 + + + Add to table 6.yy (Framebuffer Dependent Vaues) (added by + ANGLE_framebuffer_blit), the following new framebuffer dependent state. + + Get Value Type Get Command Minimum Value Description Section + ----------------- ---- ----------- ------------- ------------------- ------- + MAX_SAMPLES_ANGLE Z+ GetIntegerv 1 Maximum number of 4.4.3 + samples supported + for multisampling + + + +Issues + + Issues from EXT_framebuffer_multisample have been removed. + + 1) What should we call this extension? + + Resolved: ANGLE_framebuffer_blit. + + This extension is a result of a collaboration between Google and + TransGaming for the open-source ANGLE project. Typically one would + label a multi-vendor extension as EXT, but EXT_framebuffer_mulitsample + is already the name for this on Desktop GL. Additionally this + isn't truely a multi-vendor extension because there is only one + implementation of this. We'll follow the example of the open-source + MESA project which uses the project name for the vendor suffix. + + 2) How does this extension differ from EXT_framebuffer_multisample? + + This is designed to be a proper subset of EXT_framebuffer_multisample + functionality as applicable to OpenGL ES 2.0. + + Functionality that is unchanged: + - creation of multisample renderbuffers. + - whole buffer multi-sample->single-sample resolve. + - no format conversions, stretching or flipping supported on multisample blits. + + Additional restrictions on BlitFramebufferANGLE: + - multisample resolve is only supported on color buffers. + - no blits to multisample destinations (no single->multi or multi-multi). + - only entire buffers can be resolved. + +Revision History + + Revision 1, 2010/07/08 + - copied from revision 7 of EXT_framebuffer_multisample + - removed language that was not relevant to ES2 + - rebase changes against the Open GL ES 2.0 specification + - added ANGLE-specific restrictions + Revision 2, 2010/07/19 + - fix missing error code + Revision 3, 2010/08/06 + - add additional contributors, update implementation status + - disallow negative samples diff --git a/extensions/EGL_ANGLE_query_surface_pointer.txt b/extensions/EGL_ANGLE_query_surface_pointer.txt new file mode 100644 index 00000000..16b94f91 --- /dev/null +++ b/extensions/EGL_ANGLE_query_surface_pointer.txt @@ -0,0 +1,88 @@ +Name + + ANGLE_query_surface_pointer + +Name Strings + + EGL_ANGLE_query_surface_pointer + +Contributors + + Vladimir Vukicevic + Daniel Koch + +Contacts + + Vladimir Vukicevic (vladimir 'at' pobox.com) + +Status + + Complete + Implemented (ANGLE r558) + +Version + + Version 3, February 11, 2011 + +Number + + EGL Extension #?? + +Dependencies + + This extension is written against the wording of the EGL 1.4 + Specification. + +Overview + + This extension allows querying pointer-sized surface attributes, + thus avoiding problems with coercing 64-bit pointers into a 32-bit + integer. + +New Types + + None + +New Procedures and Functions + + EGLBoolean eglQuerySurfacePointerANGLE( + EGLDisplay dpy, + EGLSurface surface, + EGLint attribute, + void **value); + +New Tokens + + None + +Additions to Chapter 3 of the EGL 1.4 Specification (EGL Functions and Errors) + + Add to the end of the paragraph starting with "To query an + attribute associated with an EGLSurface" in section 3.5.6, + "Surface Attributes": + + "If the attribute type in table 3.5 is 'pointer', then + eglQuerySurface returns EGL_FALSE and an EGL_BAD_PARAMETER error + is generated. To query pointer attributes, call: + + EGLBoolean eglQuerySurfacePointerANGLE( + EGLDisplay dpy, + EGLSurface surface, + EGLint attribute, + void **value); + + eglQuerySurfacePointerANGLE behaves identically to eglQuerySurface, + except that only attributes of type 'pointer' can be queried. + If an attribute queried via eglQuerySurfacePointerANGLE is not + of type 'pointer', then eglQuerySurfacePointer returns EGL_FALSE + and an EGL_BAD_PARAMETER error is generated." + +Issues + +Revision History + + Version 3, 2011/02/11 - publish + + Version 2, 2010/12/21 - fix typos. + + Version 1, 2010/12/07 - first draft. diff --git a/extensions/EGL_ANGLE_surface_d3d_texture_2d_share_handle.txt b/extensions/EGL_ANGLE_surface_d3d_texture_2d_share_handle.txt new file mode 100644 index 00000000..7f0e503f --- /dev/null +++ b/extensions/EGL_ANGLE_surface_d3d_texture_2d_share_handle.txt @@ -0,0 +1,95 @@ +Name + + ANGLE_surface_d3d_texture_2d_share_handle + +Name Strings + + EGL_ANGLE_surface_d3d_texture_2d_share_handle + +Contributors + + Vladimir Vukicevic + Daniel Koch + +Contacts + + Vladimir Vukicevic (vladimir 'at' pobox.com) + +Status + + Complete + Implemented (ANGLE r558) + +Version + + Version 2, December 21, 2010 + +Number + + EGL Extension #?? + +Dependencies + + Requires the EGL_ANGLE_query_surface_pointer extension. + + This extension is written against the wording of the EGL 1.4 + Specification. + +Overview + + Some EGL implementations generate EGLSurface handles that are + backed by Direct3D 2D textures. For such surfaces, a D3D share + handle can be generated, allowing access to the same surface + from the Direct3D API. + +New Types + + None + +New Procedures and Functions + + None + +New Tokens + + Accepted in the <attribute> parameter of eglQuerySurfacePointerANGLE: + + EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200 + +Additions to Chapter 3 of the EGL 1.4 Specification (EGL Functions and Errors) + + Add to table 3.5, "Queryable surface attributes and types": + + Attribute Type Description + --------- ---- ----------- + EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE pointer Direct3D share handle + + Add before the last paragraph in section 3.5, "Surface attributes": + + "Querying EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE returns a Direct3D + share handle, or NULL if a share handle for the surface is not + available. The share handle must be queried using + eglQuerySurfaceAttribPointerANGLE. Before using a Direct3D surface + created with this share handle, ensure that all rendering + to the EGLSurface with EGL client APIs has completed. + + The Direct3D share handle may be passed as the pSharedHandle + parameter of the Direct3D9Ex CreateTexture function, or via the + Direct3D10 OpenSharedResource function. If used with Direct3D 9, + the level argument to CreateTexture must be 1, and the dimensions + must match the dimensions of the EGL surface. If used with + Direct3D 10, OpenSharedResource should be called with the + ID3D10Texture2D uuid to obtain an ID3D10Texture2D object. + +Issues + +Revision History + + Version 3, 2011/02/11 - publish + + Version 2, 2010/12/21 + - renamed token to EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE (adding "2D") + - renamed extension to ANGLE_surface_d3d_texture_2d_share_handle + - added language about supported usage of the shared handle from D3D + + Version 1, 2010/12/07 - first draft. |