| 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <proposal href="proposals/WEBGL_subarray_uploads/"> |
| 3 | <name>WEBGL_subarray_uploads</name> |
| 4 | |
| 5 | <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL |
| 6 | working group</a> (public_webgl 'at' khronos.org) </contact> |
| 7 | |
| 8 | <contributors> |
| 9 | <contributor>Jeff Gilbert (jgilbert 'at' mozilla.com)</contributor> |
| 10 | </contributors> |
| 11 | |
| 12 | <number>k</number> |
| 13 | |
| 14 | <depends> |
| 15 | <api version="1.0"/> |
| 16 | </depends> |
| 17 | |
| 18 | <overview> |
| 19 | <features> |
| 20 | <feature> |
| 21 | Though no-copy slicing of TypedArrays is already possible, it can still generate |
| 22 | considerable garbage, incuring GC load. Allowing for specification of subarray |
| 23 | offset and size can eliminate this source of garbage. |
| 24 | </feature> |
| 25 | </features> |
| 26 | </overview> |
| 27 | |
| 28 | <idl xml:space="preserve"> |
| 29 | [NoInterfaceObject] |
| 30 | interface WEBGL_subarray_uploads { |
| 31 | void bufferSubData(GLenum target, GLsizeiptr bufferOffset, GLsizeiptr subarrayOffset, |
| 32 | GLsizeiptr subarraySize, (ArrayBuffer or SharedArrayBuffer) data); |
| 33 | |
| 34 | void compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, |
| 35 | GLsizei width, GLsizei height, GLenum sizedFormat, |
| 36 | GLsizeiptr subarrayOffset, GLsizeiptr subarraySize, |
| 37 | (ArrayBuffer or SharedArrayBuffer) data); |
| 38 | |
| 39 | void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, |
| 40 | GLsizei width, GLsizei height, GLenum format, GLenum type, |
| 41 | GLsizeiptr subarrayOffset, GLsizeiptr subarraySize, |
| 42 | (ArrayBuffer or SharedArrayBuffer) data); |
| 43 | }; |
| 44 | </idl> |
| 45 | |
| 46 | <newfun> |
| 47 | <function name="bufferSubData" type="void"> |
| 48 | <param name="target" type="GLenum"/> |
| 49 | <param name="bufferOffset" type="GLsizeiptr"/> |
| 50 | <param name="subarrayOffset" type="GLsizeiptr"/> |
| 51 | <param name="subarraySize" type="GLsizeiptr"/> |
| 52 | <param name="data" type="ArrayBuffer or SharedArrayBuffer"/> |
| 53 | Upload data from a subarray of an ArrayBuffer or SharedArrayBuffer. |
| 54 | </function> |
| 55 | |
| 56 | <function name="compressedTexSubImage2D" type="void"> |
| 57 | <param name="target" type="GLenum"/> |
| 58 | <param name="level" type="GLint"/> |
| 59 | <param name="xoffset" type="GLint"/> |
| 60 | <param name="yoffset" type="GLint"/> |
| 61 | <param name="width" type="GLsizei"/> |
| 62 | <param name="height" type="GLsizei"/> |
| 63 | <param name="sizedFormat" type="GLenum"/> |
| 64 | <param name="subarrayOffset" type="GLsizeiptr"/> |
| 65 | <param name="subarraySize" type="GLsizeiptr"/> |
| 66 | <param name="data" type="ArrayBuffer or SharedArrayBuffer"/> |
| 67 | Upload data from a subarray of an ArrayBuffer or SharedArrayBuffer. |
| 68 | </function> |
| 69 | |
| 70 | <function name="texSubImage2D" type="void"> |
| 71 | <param name="target" type="GLenum"/> |
| 72 | <param name="level" type="GLint"/> |
| 73 | <param name="xoffset" type="GLint"/> |
| 74 | <param name="yoffset" type="GLint"/> |
| 75 | <param name="width" type="GLsizei"/> |
| 76 | <param name="height" type="GLsizei"/> |
| 77 | <param name="format" type="GLenum"/> |
| 78 | <param name="type" type="GLenum"/> |
| 79 | <param name="subarrayOffset" type="GLsizeiptr"/> |
| 80 | <param name="subarraySize" type="GLsizeiptr"/> |
| 81 | <param name="data" type="ArrayBuffer or SharedArrayBuffer"/> |
| 82 | Upload data from a subarray of an ArrayBuffer or SharedArrayBuffer. |
| 83 | </function> |
| 84 | </newfun> |
| 85 | |
| 86 | <history> |
| 87 | <revision date="2016/06/07"> |
| 88 | <change>Initial revision</change> |
| 89 | </revision> |
| 90 | </history> |
| 91 | </proposal> |