-
Notifications
You must be signed in to change notification settings - Fork 1
/
ANGLE_robust_client_memory.txt
180 lines (136 loc) · 10.8 KB
/
ANGLE_robust_client_memory.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
Name
ANGLE_robust_client_memory
Name Strings
GL_ANGLE_robust_client_memory
Contributors
Geoff Lang, Google
Contacts
Geoff Lang, Google (geofflang 'at' google.com)
Status
Draft
Version
Version 4, March 30, 2017
Number
OpenGL ES Extension #??
Dependencies
OpenGL ES 2.0 is required.
This extension is written against the wording of the OpenGL ES
3.2 specification.
Interacts with GL_KHR_debug, GL_EXT_disjoint_timer_queries,
GL_KHR_robustness.
Overview
This extension adds overloads of many OpenGL ES functions that read from
and write to client memory to ensure that all reads and writes done by the
OpenGL ES implementation are safe. When the OpenGL ES API is exposed to
users through complex bindings such as WebGL, allowing undefined behaviour
that may result in crashing the implementation is not acceptable.
New Types
None
New Procedures and Functions
void GetBooleanvRobustANGLE(enum pname, sizei bufSize, sizei *length, boolean *data)
void GetBufferParameterivRobustANGLE(enum target, enum pname, sizei bufSize, sizei *length, int *params)
void GetFloatvRobustANGLE(enum pname, sizei bufSize, sizei *length, float *data)
void GetFramebufferAttachmentParameterivRobustANGLE(enum target, enum attachment, enum pname, sizei bufSize, sizei *length, int *params)
void GetIntegervRobustANGLE(enum pname, sizei bufSize, sizei *length, int *data)
void GetProgramivRobustANGLE(uint program, enum pname, sizei bufSize, sizei *length, int *params)
void GetRenderbufferParameterivRobustANGLE(enum target, enum pname, sizei bufSize, sizei *length, int *params)
void GetShaderivRobustANGLE(uint shader, enum pname, sizei bufSize, sizei *length, int *params)
void GetTexParameterfvRobustANGLE(enum target, enum pname, sizei bufSize, sizei *length, float *params)
void GetTexParameterivRobustANGLE(enum target, enum pname, sizei bufSize, sizei *length, int *params)
void GetUniformfvRobustANGLE(uint program, int location, sizei bufSize, sizei *length, float *params)
void GetUniformivRobustANGLE(uint program, int location, sizei bufSize, sizei *length, int *params)
void GetVertexAttribfvRobustANGLE(uint index, enum pname, sizei bufSize, sizei *length, float *params)
void GetVertexAttribivRobustANGLE(uint index, enum pname, sizei bufSize, sizei *length, int *params)
void GetVertexAttribPointervRobustANGLE(uint index, enum pname, sizei bufSize, sizei *length, void **pointer)
void ReadPixelsRobustANGLE(int x, int y, sizei width, sizei height, enum format, enum type, sizei bufSize, sizei *length, sizei *columns, sizei *rows, void *pixels)
void TexImage2DRobustANGLE(enum target, int level, int internalformat, sizei width, sizei height, int border, enum format, enum type, sizei bufSize, const void *pixels)
void TexParameterfvRobustANGLE(enum target, enum pname, sizei bufSize, const GLfloat *params)
void TexParameterivRobustANGLE(enum target, enum pname, sizei bufSize, const GLint *params)
void TexSubImage2DRobustANGLE(enum target, int level, int xoffset, int yoffset, sizei width, sizei height, enum format, enum type, sizei bufSize, const void *pixels)
void CompressedTexImage2D(enum target, int level, enum internalformat, sizei width, sizei height, int border, sizei imageSize, sizei bufSize, const void* data)
void CompressedTexSubImage2D(enum target, int level, int xoffset, int yoffset, sizei width, sizei height, enum format, sizei imageSize, sizei bufSize, const void* data)
void CompressedTexImage3D(enum target, int level, enum internalformat, sizei width, sizei height, sizei depth, int border, sizei imageSize, sizei bufSize, const void* data)
void CompressedTexSubImage3D(enum target, int level, int xoffset, int yoffset, int zoffset, sizei width, sizei height, sizei depth, enum format, sizei imageSize, sizei bufSize, const void* data)
void TexImage3DRobustANGLE(enum target, int level, int internalformat, sizei width, sizei height, sizei depth, int border, enum format, enum type, sizei bufSize, const void *pixels);
void TexSubImage3DRobustANGLE(enum target, int level, int xoffset, int yoffset, int zoffset, sizei width, sizei height, sizei depth, enum format, enum type, sizei bufSize, const void *pixels);
void GetQueryivRobustANGLE(enum target, enum pname, sizei bufSize, sizei *length, int *params)
void GetQueryObjectuivRobustANGLE(uint id, enum pname, sizei bufSize, sizei *length, uint *params)
void GetBufferPointervRobustANGLE(enum target, enum pname, sizei bufSize, sizei *length, void **params)
void GetIntegeri_vRobustANGLE(enum target, uint index, sizei bufSize, sizei *length, int *data)
void GetInternalformativRobustANGLE(enum target, enum internalformat, enum pname, sizei bufSize, sizei *length, int *params)
void GetVertexAttribIivRobustANGLE(uint index, enum pname, sizei bufSize, sizei *length, int *params)
void GetVertexAttribIuivRobustANGLE(uint index, enum pname, sizei bufSize, sizei *length, uint *params)
void GetUniformuivRobustANGLE(uint program, int location, sizei bufSize, sizei *length, uint *params)
void GetActiveUniformBlockivRobustANGLE(uint program, uint uniformBlockIndex, enum pname, sizei bufSize, sizei *length, int *params)
void GetInteger64vRobustANGLE(enum pname, sizei bufSize, sizei *length, int64 *data)
void GetInteger64i_vRobustANGLE(enum target, uint index, sizei bufSize, sizei *length, int64 *data)
void GetBufferParameteri64vRobustANGLE(enum target, enum pname, sizei bufSize, sizei *length, int64 *params)
void SamplerParameterivRobustANGLE(uint sampler, enum pname, sizei bufSize, const GLint *param)
void SamplerParameterfvRobustANGLE(uint sampler, enum pname, sizei bufSize, const GLfloat *param)
void GetSamplerParameterivRobustANGLE(uint sampler, enum pname, sizei bufSize, sizei *length, int *params)
void GetSamplerParameterfvRobustANGLE(uint sampler, enum pname, sizei bufSize, sizei *length, float *params)
void GetFramebufferParameterivRobustANGLE(enum target, enum pname, sizei bufSize, sizei *length, int *params)
void GetProgramInterfaceivRobustANGLE(uint program, enum programInterface, enum pname, sizei bufSize, sizei *length, int *params)
void GetBooleani_vRobustANGLE(enum target, uint index, sizei bufSize, sizei *length, boolean *data)
void GetMultisamplefvRobustANGLE(enum pname, uint index, sizei bufSize, sizei *length, float *val)
void GetTexLevelParameterivRobustANGLE(enum target, int level, enum pname, sizei bufSize, sizei *length, int *params)
void GetTexLevelParameterfvRobustANGLE(enum target, int level, enum pname, sizei bufSize, sizei *length, float *params)
void GetPointervRobustANGLERobustANGLE(enum pname, sizei bufSize, sizei *length, void **params)
void ReadnPixelsRobustANGLE(int x, int y, sizei width, sizei height, enum format, enum type, sizei bufSize, sizei *length, sizei *columns, sizei *rows, void *data)
void GetnUniformfvRobustANGLE(uint program, int location, sizei bufSize, sizei *length, float *params)
void GetnUniformivRobustANGLE(uint program, int location, sizei bufSize, sizei *length, int *params)
void GetnUniformuivRobustANGLE(uint program, int location, sizei bufSize, sizei *length, uint *params)
void TexParameterIivRobustANGLE(enum target, enum pname, sizei bufSize, const GLint *params)
void TexParameterIuivRobustANGLE(enum target, enum pname, sizei bufSize, const GLuint *params)
void GetTexParameterIivRobustANGLE(enum target, enum pname, sizei bufSize, sizei *length, int *params)
void GetTexParameterIuivRobustANGLE(enum target, enum pname, sizei bufSize, sizei *length, uint *params)
void SamplerParameterIivRobustANGLE(uint sampler, enum pname, sizei bufSize, const GLint *param)
void SamplerParameterIuivRobustANGLE(uint sampler, enum pname, sizei bufSize, const GLuint *param)
void GetSamplerParameterIivRobustANGLE(uint sampler, enum pname, sizei bufSize, sizei *length, int *params)
void GetSamplerParameterIuivRobustANGLE(uint sampler, enum pname, sizei bufSize, sizei *length, uint *params)
void GetQueryObjectivRobustANGLE(uint id, enum pname, sizei bufSize, sizei *length, int *params)
void GetQueryObjecti64vRobustANGLE(uint id, enum pname, sizei bufSize, sizei *length, int64 *params)
void GetQueryObjectui64vRobustANGLE(uint id, enum pname, sizei bufSize, sizei *length, uint64 *params)
New Tokens
None
Additions to the OpenGL ES Specification:
The xRobustANGLE entry points perform additional validation using <bufSize>
to indicate the maximum number of values that can be read from or written
to the provided buffer. INVALID_OPERATION is generated if <bufSize> is not
large enough. The optional <length> specifies an address of a variable to
recieve the number of values written to the buffer. When an error is
generated nothing will be written to <length>.
The <columns> and <rows> parameters of ReadPixelsRobustANGLE and
ReadnPixelsRobustANGLE specify addresses of variables to recieve the number
of columns and rows of pixels written to the buffer which may be less than
the <width> and <height> parameters if they would have read outside of the
framebuffer.
Calls to "xRobustANGLE" will generate errors under the same conditions as
"x". Any instances of undefined behaviour in "x" will also be undefined in
"xRobustANGLE". For example, it is invalid to call
GetPointervRobustANGLERobustANGLE without first verifying that the context
is at least OpenGL ES version 3.2 or the GL_KHR_debug extension is present.
Issues
1) Should additional entry points be added to specify sizes of client side
data provided to the VertexAttribPointer functions?
2) Should <length> be allowed to be null?
RESOLVED: Yes, <length> will not be written to when it is a null
pointer.
3) Should <bufSize> be specified in bytes or values (uint, int, float,
etc)?
There is no consistancy in current entry points for this. For example,
glGetnUniformuiv indicates that bufSize is in bytes while GetSynciv
uses values despite GetnUniformuiv having a clear value type.
RESOLOVED: <bufSize> always indicates size in values. Functions that
specify data by void* such as TexImage2DRobustANGLE treat the client
data as bytes.
4) Should <length> be written to if an error is generated?
RESOLVED: No, using the prescedent set by glGetSynciv.
Revision History
Rev. Date Author Changes
---- ------------- --------- -------------------------------------------
1 Sept 26, 2016 geofflang Initial version
2 Sept 28, 2016 geofflang Changed name from ANGLE_robust_queries to
ANGLE_robust_client_memory, added issue 3.
3 Oct 7, 2016 geofflang Added and resolved issue 4.
4 Mar 30, 2017 geofflang Added columns and rows to ReadPixels.