OLD | NEW |
---|---|
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h" |
6 | 6 |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 | 8 |
9 namespace gpu { | 9 namespace gpu { |
10 namespace gles2 { | 10 namespace gles2 { |
11 | 11 |
12 namespace { | |
13 | |
14 template <typename ClientType, typename ServiceType, typename GenFunction> | |
15 error::Error GenHelper(GLsizei n, | |
16 const volatile ClientType* client_ids, | |
17 ClientServiceMap<ClientType, ServiceType>* id_map, | |
18 GenFunction gen_function) { | |
19 std::vector<ClientType> client_ids_copy(client_ids, client_ids + n); | |
20 for (GLsizei ii = 0; ii < n; ++ii) { | |
21 if (id_map->GetServiceID(client_ids_copy[ii], nullptr)) { | |
22 return error::kInvalidArguments; | |
23 } | |
24 } | |
piman
2016/09/13 21:16:50
There's one other condition that you may want to c
Geoff Lang
2016/09/14 17:43:37
Done.
| |
25 | |
26 std::vector<ServiceType> service_ids(n, 0); | |
27 gen_function(n, service_ids.data()); | |
28 for (GLsizei ii = 0; ii < n; ++ii) { | |
29 id_map->SetIDMapping(client_ids_copy[ii], service_ids[ii]); | |
30 } | |
31 | |
32 return error::kNoError; | |
33 } | |
34 | |
35 template <typename ClientType, typename ServiceType, typename GenFunction> | |
36 error::Error CreateHelper(ClientType client_id, | |
37 ClientServiceMap<ClientType, ServiceType>* id_map, | |
38 GenFunction create_function) { | |
39 if (id_map->GetServiceID(client_id, nullptr)) { | |
40 return error::kInvalidArguments; | |
41 } | |
42 ServiceType service_id = create_function(); | |
43 id_map->SetIDMapping(client_id, service_id); | |
44 return error::kNoError; | |
45 } | |
46 | |
47 template <typename ClientType, typename ServiceType, typename DeleteFunction> | |
48 error::Error DeleteHelper(GLsizei n, | |
49 const volatile ClientType* client_ids, | |
50 ClientServiceMap<ClientType, ServiceType>* id_map, | |
51 DeleteFunction delete_function) { | |
52 std::vector<ServiceType> service_ids(n, 0); | |
53 for (GLsizei ii = 0; ii < n; ++ii) { | |
54 ClientType client_id = client_ids[ii]; | |
55 service_ids[ii] = id_map->GetServiceIDOrReserve(client_id); | |
56 id_map->RemoveClientID(client_id); | |
57 } | |
58 | |
59 delete_function(n, service_ids.data()); | |
60 | |
61 return error::kNoError; | |
62 } | |
63 | |
64 template <typename ClientType, typename ServiceType, typename DeleteFunction> | |
65 error::Error DeleteHelper(ClientType client_id, | |
66 ClientServiceMap<ClientType, ServiceType>* id_map, | |
67 DeleteFunction delete_function) { | |
68 delete_function(id_map->GetServiceIDOrReserve(client_id)); | |
69 id_map->RemoveClientID(client_id); | |
70 return error::kNoError; | |
71 } | |
72 | |
73 template <typename T> | |
74 void InsertValueIntoBuffer(std::vector<uint8_t>* data, | |
75 const T& value, | |
76 size_t offset) { | |
77 DCHECK_LE(offset + sizeof(T), data->size()); | |
78 memcpy(data->data() + offset, &value, sizeof(T)); | |
79 } | |
80 | |
81 template <typename T> | |
82 void AppendValueToBuffer(std::vector<uint8_t>* data, const T& value) { | |
83 size_t old_size = data->size(); | |
84 data->resize(old_size + sizeof(T)); | |
85 memcpy(data->data() + old_size, &value, sizeof(T)); | |
86 } | |
87 | |
88 void AppendStringToBuffer(std::vector<uint8_t>* data, | |
89 const char* str, | |
90 size_t len) { | |
91 size_t old_size = data->size(); | |
92 data->resize(old_size + len); | |
93 memcpy(data->data() + old_size, str, len); | |
94 } | |
95 | |
96 } // anonymous namespace | |
97 | |
12 // Implementations of commands | 98 // Implementations of commands |
13 error::Error GLES2DecoderPassthroughImpl::DoActiveTexture(GLenum texture) { | 99 error::Error GLES2DecoderPassthroughImpl::DoActiveTexture(GLenum texture) { |
100 glActiveTexture(texture); | |
101 active_texture_unit_ = static_cast<size_t>(texture) - GL_TEXTURE0; | |
14 return error::kNoError; | 102 return error::kNoError; |
15 } | 103 } |
16 | 104 |
17 error::Error GLES2DecoderPassthroughImpl::DoAttachShader(GLuint program, | 105 error::Error GLES2DecoderPassthroughImpl::DoAttachShader(GLuint program, |
18 GLuint shader) { | 106 GLuint shader) { |
107 glAttachShader(resources_->program_id_map.GetServiceIDOrReserve(program), | |
108 resources_->shader_id_map.GetServiceIDOrReserve(shader)); | |
19 return error::kNoError; | 109 return error::kNoError; |
20 } | 110 } |
21 | 111 |
22 error::Error GLES2DecoderPassthroughImpl::DoBindAttribLocation( | 112 error::Error GLES2DecoderPassthroughImpl::DoBindAttribLocation( |
23 GLuint program, | 113 GLuint program, |
24 GLuint index, | 114 GLuint index, |
25 const char* name) { | 115 const char* name) { |
116 glBindAttribLocation( | |
117 resources_->program_id_map.GetServiceIDOrReserve(program), index, name); | |
26 return error::kNoError; | 118 return error::kNoError; |
27 } | 119 } |
28 | 120 |
29 error::Error GLES2DecoderPassthroughImpl::DoBindBuffer(GLenum target, | 121 error::Error GLES2DecoderPassthroughImpl::DoBindBuffer(GLenum target, |
30 GLuint buffer) { | 122 GLuint buffer) { |
123 glBindBuffer(target, resources_->buffer_id_map.GetServiceIDOrReserve(buffer)); | |
31 return error::kNoError; | 124 return error::kNoError; |
32 } | 125 } |
33 | 126 |
34 error::Error GLES2DecoderPassthroughImpl::DoBindBufferBase(GLenum target, | 127 error::Error GLES2DecoderPassthroughImpl::DoBindBufferBase(GLenum target, |
35 GLuint index, | 128 GLuint index, |
36 GLuint buffer) { | 129 GLuint buffer) { |
130 glBindBufferBase(target, index, | |
131 resources_->buffer_id_map.GetServiceIDOrReserve(buffer)); | |
37 return error::kNoError; | 132 return error::kNoError; |
38 } | 133 } |
39 | 134 |
40 error::Error GLES2DecoderPassthroughImpl::DoBindBufferRange(GLenum target, | 135 error::Error GLES2DecoderPassthroughImpl::DoBindBufferRange(GLenum target, |
41 GLuint index, | 136 GLuint index, |
42 GLuint buffer, | 137 GLuint buffer, |
43 GLintptr offset, | 138 GLintptr offset, |
44 GLsizeiptr size) { | 139 GLsizeiptr size) { |
140 glBindBufferRange(target, index, | |
141 resources_->buffer_id_map.GetServiceIDOrReserve(buffer), | |
142 offset, size); | |
45 return error::kNoError; | 143 return error::kNoError; |
46 } | 144 } |
47 | 145 |
48 error::Error GLES2DecoderPassthroughImpl::DoBindFramebuffer( | 146 error::Error GLES2DecoderPassthroughImpl::DoBindFramebuffer( |
49 GLenum target, | 147 GLenum target, |
50 GLuint framebuffer) { | 148 GLuint framebuffer) { |
149 glBindFramebufferEXT(target, | |
150 framebuffer_id_map_.GetServiceIDOrReserve(framebuffer)); | |
51 return error::kNoError; | 151 return error::kNoError; |
52 } | 152 } |
53 | 153 |
54 error::Error GLES2DecoderPassthroughImpl::DoBindRenderbuffer( | 154 error::Error GLES2DecoderPassthroughImpl::DoBindRenderbuffer( |
55 GLenum target, | 155 GLenum target, |
56 GLuint renderbuffer) { | 156 GLuint renderbuffer) { |
157 glBindRenderbufferEXT( | |
158 target, | |
159 resources_->renderbuffer_id_map.GetServiceIDOrReserve(renderbuffer)); | |
57 return error::kNoError; | 160 return error::kNoError; |
58 } | 161 } |
59 | 162 |
60 error::Error GLES2DecoderPassthroughImpl::DoBindSampler(GLuint unit, | 163 error::Error GLES2DecoderPassthroughImpl::DoBindSampler(GLuint unit, |
61 GLuint sampler) { | 164 GLuint sampler) { |
165 glBindSampler(unit, | |
166 resources_->sampler_id_map.GetServiceIDOrReserve(sampler)); | |
62 return error::kNoError; | 167 return error::kNoError; |
63 } | 168 } |
64 | 169 |
65 error::Error GLES2DecoderPassthroughImpl::DoBindTexture(GLenum target, | 170 error::Error GLES2DecoderPassthroughImpl::DoBindTexture(GLenum target, |
66 GLuint texture) { | 171 GLuint texture) { |
172 glBindTexture(target, | |
173 resources_->texture_id_map.GetServiceIDOrReserve(texture)); | |
174 if (target == GL_TEXTURE_2D && | |
175 active_texture_unit_ < bound_textures_.size()) { | |
176 bound_textures_[active_texture_unit_] = texture; | |
177 } | |
67 return error::kNoError; | 178 return error::kNoError; |
68 } | 179 } |
69 | 180 |
70 error::Error GLES2DecoderPassthroughImpl::DoBindTransformFeedback( | 181 error::Error GLES2DecoderPassthroughImpl::DoBindTransformFeedback( |
71 GLenum target, | 182 GLenum target, |
72 GLuint transformfeedback) { | 183 GLuint transformfeedback) { |
184 glBindTransformFeedback( | |
185 target, | |
186 transform_feedback_id_map_.GetServiceIDOrReserve(transformfeedback)); | |
73 return error::kNoError; | 187 return error::kNoError; |
74 } | 188 } |
75 | 189 |
76 error::Error GLES2DecoderPassthroughImpl::DoBlendColor(GLclampf red, | 190 error::Error GLES2DecoderPassthroughImpl::DoBlendColor(GLclampf red, |
77 GLclampf green, | 191 GLclampf green, |
78 GLclampf blue, | 192 GLclampf blue, |
79 GLclampf alpha) { | 193 GLclampf alpha) { |
194 glBlendColor(red, green, blue, alpha); | |
80 return error::kNoError; | 195 return error::kNoError; |
81 } | 196 } |
82 | 197 |
83 error::Error GLES2DecoderPassthroughImpl::DoBlendEquation(GLenum mode) { | 198 error::Error GLES2DecoderPassthroughImpl::DoBlendEquation(GLenum mode) { |
199 glBlendEquation(mode); | |
84 return error::kNoError; | 200 return error::kNoError; |
85 } | 201 } |
86 | 202 |
87 error::Error GLES2DecoderPassthroughImpl::DoBlendEquationSeparate( | 203 error::Error GLES2DecoderPassthroughImpl::DoBlendEquationSeparate( |
88 GLenum modeRGB, | 204 GLenum modeRGB, |
89 GLenum modeAlpha) { | 205 GLenum modeAlpha) { |
206 glBlendEquationSeparate(modeRGB, modeAlpha); | |
90 return error::kNoError; | 207 return error::kNoError; |
91 } | 208 } |
92 | 209 |
93 error::Error GLES2DecoderPassthroughImpl::DoBlendFunc(GLenum sfactor, | 210 error::Error GLES2DecoderPassthroughImpl::DoBlendFunc(GLenum sfactor, |
94 GLenum dfactor) { | 211 GLenum dfactor) { |
212 glBlendFunc(sfactor, dfactor); | |
95 return error::kNoError; | 213 return error::kNoError; |
96 } | 214 } |
97 | 215 |
98 error::Error GLES2DecoderPassthroughImpl::DoBlendFuncSeparate(GLenum srcRGB, | 216 error::Error GLES2DecoderPassthroughImpl::DoBlendFuncSeparate(GLenum srcRGB, |
99 GLenum dstRGB, | 217 GLenum dstRGB, |
100 GLenum srcAlpha, | 218 GLenum srcAlpha, |
101 GLenum dstAlpha) { | 219 GLenum dstAlpha) { |
220 glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); | |
102 return error::kNoError; | 221 return error::kNoError; |
103 } | 222 } |
104 | 223 |
105 error::Error GLES2DecoderPassthroughImpl::DoBufferData(GLenum target, | 224 error::Error GLES2DecoderPassthroughImpl::DoBufferData(GLenum target, |
106 GLsizeiptr size, | 225 GLsizeiptr size, |
107 const void* data, | 226 const void* data, |
108 GLenum usage) { | 227 GLenum usage) { |
228 glBufferData(target, size, data, usage); | |
109 return error::kNoError; | 229 return error::kNoError; |
110 } | 230 } |
111 | 231 |
112 error::Error GLES2DecoderPassthroughImpl::DoBufferSubData(GLenum target, | 232 error::Error GLES2DecoderPassthroughImpl::DoBufferSubData(GLenum target, |
113 GLintptr offset, | 233 GLintptr offset, |
114 GLsizeiptr size, | 234 GLsizeiptr size, |
115 const void* data) { | 235 const void* data) { |
236 glBufferSubData(target, offset, size, data); | |
116 return error::kNoError; | 237 return error::kNoError; |
117 } | 238 } |
118 | 239 |
119 error::Error GLES2DecoderPassthroughImpl::DoCheckFramebufferStatus( | 240 error::Error GLES2DecoderPassthroughImpl::DoCheckFramebufferStatus( |
120 GLenum target, | 241 GLenum target, |
121 uint32_t* result) { | 242 uint32_t* result) { |
243 *result = glCheckFramebufferStatusEXT(target); | |
122 return error::kNoError; | 244 return error::kNoError; |
123 } | 245 } |
124 | 246 |
125 error::Error GLES2DecoderPassthroughImpl::DoClear(GLbitfield mask) { | 247 error::Error GLES2DecoderPassthroughImpl::DoClear(GLbitfield mask) { |
248 glClear(mask); | |
126 return error::kNoError; | 249 return error::kNoError; |
127 } | 250 } |
128 | 251 |
129 error::Error GLES2DecoderPassthroughImpl::DoClearBufferfi(GLenum buffer, | 252 error::Error GLES2DecoderPassthroughImpl::DoClearBufferfi(GLenum buffer, |
130 GLint drawbuffers, | 253 GLint drawbuffers, |
131 GLfloat depth, | 254 GLfloat depth, |
132 GLint stencil) { | 255 GLint stencil) { |
256 glClearBufferfi(buffer, drawbuffers, depth, stencil); | |
133 return error::kNoError; | 257 return error::kNoError; |
134 } | 258 } |
135 | 259 |
136 error::Error GLES2DecoderPassthroughImpl::DoClearBufferfv( | 260 error::Error GLES2DecoderPassthroughImpl::DoClearBufferfv( |
137 GLenum buffer, | 261 GLenum buffer, |
138 GLint drawbuffers, | 262 GLint drawbuffers, |
139 const volatile GLfloat* value) { | 263 const volatile GLfloat* value) { |
264 glClearBufferfv(buffer, drawbuffers, const_cast<const GLfloat*>(value)); | |
140 return error::kNoError; | 265 return error::kNoError; |
141 } | 266 } |
142 | 267 |
143 error::Error GLES2DecoderPassthroughImpl::DoClearBufferiv( | 268 error::Error GLES2DecoderPassthroughImpl::DoClearBufferiv( |
144 GLenum buffer, | 269 GLenum buffer, |
145 GLint drawbuffers, | 270 GLint drawbuffers, |
146 const volatile GLint* value) { | 271 const volatile GLint* value) { |
272 glClearBufferiv(buffer, drawbuffers, const_cast<const GLint*>(value)); | |
147 return error::kNoError; | 273 return error::kNoError; |
148 } | 274 } |
149 | 275 |
150 error::Error GLES2DecoderPassthroughImpl::DoClearBufferuiv( | 276 error::Error GLES2DecoderPassthroughImpl::DoClearBufferuiv( |
151 GLenum buffer, | 277 GLenum buffer, |
152 GLint drawbuffers, | 278 GLint drawbuffers, |
153 const volatile GLuint* value) { | 279 const volatile GLuint* value) { |
280 glClearBufferuiv(buffer, drawbuffers, const_cast<const GLuint*>(value)); | |
154 return error::kNoError; | 281 return error::kNoError; |
155 } | 282 } |
156 | 283 |
157 error::Error GLES2DecoderPassthroughImpl::DoClearColor(GLclampf red, | 284 error::Error GLES2DecoderPassthroughImpl::DoClearColor(GLclampf red, |
158 GLclampf green, | 285 GLclampf green, |
159 GLclampf blue, | 286 GLclampf blue, |
160 GLclampf alpha) { | 287 GLclampf alpha) { |
288 glClearColor(red, green, blue, alpha); | |
161 return error::kNoError; | 289 return error::kNoError; |
162 } | 290 } |
163 | 291 |
164 error::Error GLES2DecoderPassthroughImpl::DoClearDepthf(GLclampf depth) { | 292 error::Error GLES2DecoderPassthroughImpl::DoClearDepthf(GLclampf depth) { |
293 glClearDepthf(depth); | |
165 return error::kNoError; | 294 return error::kNoError; |
166 } | 295 } |
167 | 296 |
168 error::Error GLES2DecoderPassthroughImpl::DoClearStencil(GLint s) { | 297 error::Error GLES2DecoderPassthroughImpl::DoClearStencil(GLint s) { |
298 glClearStencil(s); | |
169 return error::kNoError; | 299 return error::kNoError; |
170 } | 300 } |
171 | 301 |
172 error::Error GLES2DecoderPassthroughImpl::DoClientWaitSync(GLuint sync, | 302 error::Error GLES2DecoderPassthroughImpl::DoClientWaitSync(GLuint sync, |
173 GLbitfield flags, | 303 GLbitfield flags, |
174 GLuint64 timeout, | 304 GLuint64 timeout, |
175 GLenum* result) { | 305 GLenum* result) { |
306 NOTIMPLEMENTED(); | |
176 return error::kNoError; | 307 return error::kNoError; |
177 } | 308 } |
178 | 309 |
179 error::Error GLES2DecoderPassthroughImpl::DoColorMask(GLboolean red, | 310 error::Error GLES2DecoderPassthroughImpl::DoColorMask(GLboolean red, |
180 GLboolean green, | 311 GLboolean green, |
181 GLboolean blue, | 312 GLboolean blue, |
182 GLboolean alpha) { | 313 GLboolean alpha) { |
314 glColorMask(red, green, blue, alpha); | |
183 return error::kNoError; | 315 return error::kNoError; |
184 } | 316 } |
185 | 317 |
186 error::Error GLES2DecoderPassthroughImpl::DoCompileShader(GLuint shader) { | 318 error::Error GLES2DecoderPassthroughImpl::DoCompileShader(GLuint shader) { |
319 glCompileShader(resources_->shader_id_map.GetServiceIDOrReserve(shader)); | |
187 return error::kNoError; | 320 return error::kNoError; |
188 } | 321 } |
189 | 322 |
190 error::Error GLES2DecoderPassthroughImpl::DoCompressedTexImage2D( | 323 error::Error GLES2DecoderPassthroughImpl::DoCompressedTexImage2D( |
191 GLenum target, | 324 GLenum target, |
192 GLint level, | 325 GLint level, |
193 GLenum internalformat, | 326 GLenum internalformat, |
194 GLsizei width, | 327 GLsizei width, |
195 GLsizei height, | 328 GLsizei height, |
196 GLint border, | 329 GLint border, |
197 GLsizei imageSize, | 330 GLsizei imageSize, |
198 const void* data) { | 331 const void* data) { |
332 NOTIMPLEMENTED(); | |
199 return error::kNoError; | 333 return error::kNoError; |
200 } | 334 } |
201 | 335 |
202 error::Error GLES2DecoderPassthroughImpl::DoCompressedTexSubImage2D( | 336 error::Error GLES2DecoderPassthroughImpl::DoCompressedTexSubImage2D( |
203 GLenum target, | 337 GLenum target, |
204 GLint level, | 338 GLint level, |
205 GLint xoffset, | 339 GLint xoffset, |
206 GLint yoffset, | 340 GLint yoffset, |
207 GLsizei width, | 341 GLsizei width, |
208 GLsizei height, | 342 GLsizei height, |
209 GLenum format, | 343 GLenum format, |
210 GLsizei imageSize, | 344 GLsizei imageSize, |
211 const void* data) { | 345 const void* data) { |
346 NOTIMPLEMENTED(); | |
212 return error::kNoError; | 347 return error::kNoError; |
213 } | 348 } |
214 | 349 |
215 error::Error GLES2DecoderPassthroughImpl::DoCompressedTexImage3D( | 350 error::Error GLES2DecoderPassthroughImpl::DoCompressedTexImage3D( |
216 GLenum target, | 351 GLenum target, |
217 GLint level, | 352 GLint level, |
218 GLenum internalformat, | 353 GLenum internalformat, |
219 GLsizei width, | 354 GLsizei width, |
220 GLsizei height, | 355 GLsizei height, |
221 GLsizei depth, | 356 GLsizei depth, |
222 GLint border, | 357 GLint border, |
223 GLsizei imageSize, | 358 GLsizei imageSize, |
224 const void* data) { | 359 const void* data) { |
360 NOTIMPLEMENTED(); | |
225 return error::kNoError; | 361 return error::kNoError; |
226 } | 362 } |
227 | 363 |
228 error::Error GLES2DecoderPassthroughImpl::DoCompressedTexSubImage3D( | 364 error::Error GLES2DecoderPassthroughImpl::DoCompressedTexSubImage3D( |
229 GLenum target, | 365 GLenum target, |
230 GLint level, | 366 GLint level, |
231 GLint xoffset, | 367 GLint xoffset, |
232 GLint yoffset, | 368 GLint yoffset, |
233 GLint zoffset, | 369 GLint zoffset, |
234 GLsizei width, | 370 GLsizei width, |
235 GLsizei height, | 371 GLsizei height, |
236 GLsizei depth, | 372 GLsizei depth, |
237 GLenum format, | 373 GLenum format, |
238 GLsizei imageSize, | 374 GLsizei imageSize, |
239 const void* data) { | 375 const void* data) { |
376 NOTIMPLEMENTED(); | |
240 return error::kNoError; | 377 return error::kNoError; |
241 } | 378 } |
242 | 379 |
243 error::Error GLES2DecoderPassthroughImpl::DoCopyBufferSubData( | 380 error::Error GLES2DecoderPassthroughImpl::DoCopyBufferSubData( |
244 GLenum readtarget, | 381 GLenum readtarget, |
245 GLenum writetarget, | 382 GLenum writetarget, |
246 GLintptr readoffset, | 383 GLintptr readoffset, |
247 GLintptr writeoffset, | 384 GLintptr writeoffset, |
248 GLsizeiptr size) { | 385 GLsizeiptr size) { |
386 glCopyBufferSubData(readtarget, writetarget, readoffset, writeoffset, size); | |
249 return error::kNoError; | 387 return error::kNoError; |
250 } | 388 } |
251 | 389 |
252 error::Error GLES2DecoderPassthroughImpl::DoCopyTexImage2D( | 390 error::Error GLES2DecoderPassthroughImpl::DoCopyTexImage2D( |
253 GLenum target, | 391 GLenum target, |
254 GLint level, | 392 GLint level, |
255 GLenum internalformat, | 393 GLenum internalformat, |
256 GLint x, | 394 GLint x, |
257 GLint y, | 395 GLint y, |
258 GLsizei width, | 396 GLsizei width, |
259 GLsizei height, | 397 GLsizei height, |
260 GLint border) { | 398 GLint border) { |
399 glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); | |
261 return error::kNoError; | 400 return error::kNoError; |
262 } | 401 } |
263 | 402 |
264 error::Error GLES2DecoderPassthroughImpl::DoCopyTexSubImage2D(GLenum target, | 403 error::Error GLES2DecoderPassthroughImpl::DoCopyTexSubImage2D(GLenum target, |
265 GLint level, | 404 GLint level, |
266 GLint xoffset, | 405 GLint xoffset, |
267 GLint yoffset, | 406 GLint yoffset, |
268 GLint x, | 407 GLint x, |
269 GLint y, | 408 GLint y, |
270 GLsizei width, | 409 GLsizei width, |
271 GLsizei height) { | 410 GLsizei height) { |
411 glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); | |
272 return error::kNoError; | 412 return error::kNoError; |
273 } | 413 } |
274 | 414 |
275 error::Error GLES2DecoderPassthroughImpl::DoCopyTexSubImage3D(GLenum target, | 415 error::Error GLES2DecoderPassthroughImpl::DoCopyTexSubImage3D(GLenum target, |
276 GLint level, | 416 GLint level, |
277 GLint xoffset, | 417 GLint xoffset, |
278 GLint yoffset, | 418 GLint yoffset, |
279 GLint zoffset, | 419 GLint zoffset, |
280 GLint x, | 420 GLint x, |
281 GLint y, | 421 GLint y, |
282 GLsizei width, | 422 GLsizei width, |
283 GLsizei height) { | 423 GLsizei height) { |
424 glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, | |
425 height); | |
284 return error::kNoError; | 426 return error::kNoError; |
285 } | 427 } |
286 | 428 |
287 error::Error GLES2DecoderPassthroughImpl::DoCreateProgram(GLuint client_id) { | 429 error::Error GLES2DecoderPassthroughImpl::DoCreateProgram(GLuint client_id) { |
288 return error::kNoError; | 430 return CreateHelper(client_id, &resources_->program_id_map, |
431 []() { return glCreateProgram(); }); | |
289 } | 432 } |
290 | 433 |
291 error::Error GLES2DecoderPassthroughImpl::DoCreateShader(GLenum type, | 434 error::Error GLES2DecoderPassthroughImpl::DoCreateShader(GLenum type, |
292 GLuint client_id) { | 435 GLuint client_id) { |
293 return error::kNoError; | 436 return CreateHelper(client_id, &resources_->shader_id_map, |
437 [type]() { return glCreateShader(type); }); | |
294 } | 438 } |
295 | 439 |
296 error::Error GLES2DecoderPassthroughImpl::DoCullFace(GLenum mode) { | 440 error::Error GLES2DecoderPassthroughImpl::DoCullFace(GLenum mode) { |
441 glCullFace(mode); | |
297 return error::kNoError; | 442 return error::kNoError; |
298 } | 443 } |
299 | 444 |
300 error::Error GLES2DecoderPassthroughImpl::DoDeleteBuffers( | 445 error::Error GLES2DecoderPassthroughImpl::DoDeleteBuffers( |
301 GLsizei n, | 446 GLsizei n, |
302 const volatile GLuint* buffers) { | 447 const volatile GLuint* buffers) { |
303 return error::kNoError; | 448 return DeleteHelper( |
449 n, buffers, &resources_->buffer_id_map, | |
450 [](GLsizei n, GLuint* buffers) { glDeleteBuffersARB(n, buffers); }); | |
304 } | 451 } |
305 | 452 |
306 error::Error GLES2DecoderPassthroughImpl::DoDeleteFramebuffers( | 453 error::Error GLES2DecoderPassthroughImpl::DoDeleteFramebuffers( |
307 GLsizei n, | 454 GLsizei n, |
308 const volatile GLuint* framebuffers) { | 455 const volatile GLuint* framebuffers) { |
309 return error::kNoError; | 456 return DeleteHelper(n, framebuffers, &framebuffer_id_map_, |
457 [](GLsizei n, GLuint* framebuffers) { | |
458 glDeleteFramebuffersEXT(n, framebuffers); | |
459 }); | |
310 } | 460 } |
311 | 461 |
312 error::Error GLES2DecoderPassthroughImpl::DoDeleteProgram(GLuint program) { | 462 error::Error GLES2DecoderPassthroughImpl::DoDeleteProgram(GLuint program) { |
313 return error::kNoError; | 463 return DeleteHelper(program, &resources_->program_id_map, |
464 [](GLuint program) { glDeleteProgram(program); }); | |
314 } | 465 } |
315 | 466 |
316 error::Error GLES2DecoderPassthroughImpl::DoDeleteRenderbuffers( | 467 error::Error GLES2DecoderPassthroughImpl::DoDeleteRenderbuffers( |
317 GLsizei n, | 468 GLsizei n, |
318 const volatile GLuint* renderbuffers) { | 469 const volatile GLuint* renderbuffers) { |
319 return error::kNoError; | 470 return DeleteHelper(n, renderbuffers, &resources_->renderbuffer_id_map, |
471 [](GLsizei n, GLuint* renderbuffers) { | |
472 glDeleteRenderbuffersEXT(n, renderbuffers); | |
473 }); | |
320 } | 474 } |
321 | 475 |
322 error::Error GLES2DecoderPassthroughImpl::DoDeleteSamplers( | 476 error::Error GLES2DecoderPassthroughImpl::DoDeleteSamplers( |
323 GLsizei n, | 477 GLsizei n, |
324 const volatile GLuint* samplers) { | 478 const volatile GLuint* samplers) { |
325 return error::kNoError; | 479 return DeleteHelper( |
480 n, samplers, &resources_->sampler_id_map, | |
481 [](GLsizei n, GLuint* samplers) { glDeleteSamplers(n, samplers); }); | |
326 } | 482 } |
327 | 483 |
328 error::Error GLES2DecoderPassthroughImpl::DoDeleteSync(GLuint sync) { | 484 error::Error GLES2DecoderPassthroughImpl::DoDeleteSync(GLuint sync) { |
329 return error::kNoError; | 485 return DeleteHelper(sync, &resources_->sync_id_map, [](uintptr_t sync) { |
486 glDeleteSync(reinterpret_cast<GLsync>(sync)); | |
487 }); | |
330 } | 488 } |
331 | 489 |
332 error::Error GLES2DecoderPassthroughImpl::DoDeleteShader(GLuint shader) { | 490 error::Error GLES2DecoderPassthroughImpl::DoDeleteShader(GLuint shader) { |
333 return error::kNoError; | 491 return DeleteHelper(shader, &resources_->shader_id_map, |
492 [](GLuint shader) { glDeleteShader(shader); }); | |
334 } | 493 } |
335 | 494 |
336 error::Error GLES2DecoderPassthroughImpl::DoDeleteTextures( | 495 error::Error GLES2DecoderPassthroughImpl::DoDeleteTextures( |
337 GLsizei n, | 496 GLsizei n, |
338 const volatile GLuint* textures) { | 497 const volatile GLuint* textures) { |
339 return error::kNoError; | 498 // Textures that are currently associated with a mailbox are stored in the |
499 // texture_object_map_ and are deleted automatically when they are | |
500 // unreferenced. Only delete textures that are not in this map. | |
501 std::vector<GLuint> non_mailbox_client_ids; | |
502 for (GLsizei ii = 0; ii < n; ++ii) { | |
503 GLuint client_id = textures[ii]; | |
504 auto texture_object_iter = resources_->texture_object_map.find(client_id); | |
505 if (texture_object_iter == resources_->texture_object_map.end()) { | |
506 // Delete with DeleteHelper | |
507 non_mailbox_client_ids.push_back(client_id); | |
508 } else { | |
509 // Deleted when unreferenced | |
510 resources_->texture_id_map.RemoveClientID(client_id); | |
511 resources_->texture_object_map.erase(client_id); | |
512 } | |
513 } | |
514 return DeleteHelper( | |
515 non_mailbox_client_ids.size(), non_mailbox_client_ids.data(), | |
516 &resources_->texture_id_map, | |
517 [](GLsizei n, GLuint* textures) { glDeleteTextures(n, textures); }); | |
340 } | 518 } |
341 | 519 |
342 error::Error GLES2DecoderPassthroughImpl::DoDeleteTransformFeedbacks( | 520 error::Error GLES2DecoderPassthroughImpl::DoDeleteTransformFeedbacks( |
343 GLsizei n, | 521 GLsizei n, |
344 const volatile GLuint* ids) { | 522 const volatile GLuint* ids) { |
345 return error::kNoError; | 523 return DeleteHelper(n, ids, &transform_feedback_id_map_, |
524 [](GLsizei n, GLuint* transform_feedbacks) { | |
525 glDeleteTransformFeedbacks(n, transform_feedbacks); | |
526 }); | |
346 } | 527 } |
347 | 528 |
348 error::Error GLES2DecoderPassthroughImpl::DoDepthFunc(GLenum func) { | 529 error::Error GLES2DecoderPassthroughImpl::DoDepthFunc(GLenum func) { |
530 glDepthFunc(func); | |
349 return error::kNoError; | 531 return error::kNoError; |
350 } | 532 } |
351 | 533 |
352 error::Error GLES2DecoderPassthroughImpl::DoDepthMask(GLboolean flag) { | 534 error::Error GLES2DecoderPassthroughImpl::DoDepthMask(GLboolean flag) { |
535 glDepthMask(flag); | |
353 return error::kNoError; | 536 return error::kNoError; |
354 } | 537 } |
355 | 538 |
356 error::Error GLES2DecoderPassthroughImpl::DoDepthRangef(GLclampf zNear, | 539 error::Error GLES2DecoderPassthroughImpl::DoDepthRangef(GLclampf zNear, |
357 GLclampf zFar) { | 540 GLclampf zFar) { |
541 glDepthRangef(zNear, zFar); | |
358 return error::kNoError; | 542 return error::kNoError; |
359 } | 543 } |
360 | 544 |
361 error::Error GLES2DecoderPassthroughImpl::DoDetachShader(GLuint program, | 545 error::Error GLES2DecoderPassthroughImpl::DoDetachShader(GLuint program, |
362 GLuint shader) { | 546 GLuint shader) { |
547 glDetachShader(resources_->program_id_map.GetServiceIDOrReserve(program), | |
548 resources_->shader_id_map.GetServiceIDOrReserve(shader)); | |
363 return error::kNoError; | 549 return error::kNoError; |
364 } | 550 } |
365 | 551 |
366 error::Error GLES2DecoderPassthroughImpl::DoDisable(GLenum cap) { | 552 error::Error GLES2DecoderPassthroughImpl::DoDisable(GLenum cap) { |
553 glDisable(cap); | |
367 return error::kNoError; | 554 return error::kNoError; |
368 } | 555 } |
369 | 556 |
370 error::Error GLES2DecoderPassthroughImpl::DoDisableVertexAttribArray( | 557 error::Error GLES2DecoderPassthroughImpl::DoDisableVertexAttribArray( |
371 GLuint index) { | 558 GLuint index) { |
559 glDisableVertexAttribArray(index); | |
372 return error::kNoError; | 560 return error::kNoError; |
373 } | 561 } |
374 | 562 |
375 error::Error GLES2DecoderPassthroughImpl::DoDrawArrays(GLenum mode, | 563 error::Error GLES2DecoderPassthroughImpl::DoDrawArrays(GLenum mode, |
376 GLint first, | 564 GLint first, |
377 GLsizei count) { | 565 GLsizei count) { |
566 glDrawArrays(mode, first, count); | |
378 return error::kNoError; | 567 return error::kNoError; |
379 } | 568 } |
380 | 569 |
381 error::Error GLES2DecoderPassthroughImpl::DoDrawElements(GLenum mode, | 570 error::Error GLES2DecoderPassthroughImpl::DoDrawElements(GLenum mode, |
382 GLsizei count, | 571 GLsizei count, |
383 GLenum type, | 572 GLenum type, |
384 const void* indices) { | 573 const void* indices) { |
574 glDrawElements(mode, count, type, indices); | |
385 return error::kNoError; | 575 return error::kNoError; |
386 } | 576 } |
387 | 577 |
388 error::Error GLES2DecoderPassthroughImpl::DoEnable(GLenum cap) { | 578 error::Error GLES2DecoderPassthroughImpl::DoEnable(GLenum cap) { |
579 glEnable(cap); | |
389 return error::kNoError; | 580 return error::kNoError; |
390 } | 581 } |
391 | 582 |
392 error::Error GLES2DecoderPassthroughImpl::DoEnableVertexAttribArray( | 583 error::Error GLES2DecoderPassthroughImpl::DoEnableVertexAttribArray( |
393 GLuint index) { | 584 GLuint index) { |
585 glEnableVertexAttribArray(index); | |
394 return error::kNoError; | 586 return error::kNoError; |
395 } | 587 } |
396 | 588 |
397 error::Error GLES2DecoderPassthroughImpl::DoFenceSync(GLenum condition, | 589 error::Error GLES2DecoderPassthroughImpl::DoFenceSync(GLenum condition, |
398 GLbitfield flags, | 590 GLbitfield flags, |
399 GLuint client_id) { | 591 GLuint client_id) { |
592 NOTIMPLEMENTED(); | |
400 return error::kNoError; | 593 return error::kNoError; |
401 } | 594 } |
402 | 595 |
403 error::Error GLES2DecoderPassthroughImpl::DoFinish() { | 596 error::Error GLES2DecoderPassthroughImpl::DoFinish() { |
597 glFinish(); | |
404 return error::kNoError; | 598 return error::kNoError; |
405 } | 599 } |
406 | 600 |
407 error::Error GLES2DecoderPassthroughImpl::DoFlush() { | 601 error::Error GLES2DecoderPassthroughImpl::DoFlush() { |
602 glFlush(); | |
408 return error::kNoError; | 603 return error::kNoError; |
409 } | 604 } |
410 | 605 |
411 error::Error GLES2DecoderPassthroughImpl::DoFramebufferRenderbuffer( | 606 error::Error GLES2DecoderPassthroughImpl::DoFramebufferRenderbuffer( |
412 GLenum target, | 607 GLenum target, |
413 GLenum attachment, | 608 GLenum attachment, |
414 GLenum renderbuffertarget, | 609 GLenum renderbuffertarget, |
415 GLuint renderbuffer) { | 610 GLuint renderbuffer) { |
611 // TODO(geofflang): Handle this case in ANGLE by adding a WebGL validation | |
612 // mode. | |
613 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) { | |
614 glFramebufferRenderbufferEXT( | |
615 target, GL_DEPTH_ATTACHMENT, renderbuffertarget, | |
616 resources_->renderbuffer_id_map.GetServiceIDOrReserve(renderbuffer)); | |
617 glFramebufferRenderbufferEXT( | |
618 target, GL_STENCIL_ATTACHMENT, renderbuffertarget, | |
619 resources_->renderbuffer_id_map.GetServiceIDOrReserve(renderbuffer)); | |
620 } else { | |
621 glFramebufferRenderbufferEXT( | |
622 target, attachment, renderbuffertarget, | |
623 resources_->renderbuffer_id_map.GetServiceIDOrReserve(renderbuffer)); | |
624 } | |
416 return error::kNoError; | 625 return error::kNoError; |
417 } | 626 } |
418 | 627 |
419 error::Error GLES2DecoderPassthroughImpl::DoFramebufferTexture2D( | 628 error::Error GLES2DecoderPassthroughImpl::DoFramebufferTexture2D( |
420 GLenum target, | 629 GLenum target, |
421 GLenum attachment, | 630 GLenum attachment, |
422 GLenum textarget, | 631 GLenum textarget, |
423 GLuint texture, | 632 GLuint texture, |
424 GLint level) { | 633 GLint level) { |
634 glFramebufferTexture2DEXT( | |
635 target, attachment, textarget, | |
636 resources_->texture_id_map.GetServiceIDOrReserve(texture), level); | |
425 return error::kNoError; | 637 return error::kNoError; |
426 } | 638 } |
427 | 639 |
428 error::Error GLES2DecoderPassthroughImpl::DoFramebufferTextureLayer( | 640 error::Error GLES2DecoderPassthroughImpl::DoFramebufferTextureLayer( |
429 GLenum target, | 641 GLenum target, |
430 GLenum attachment, | 642 GLenum attachment, |
431 GLuint texture, | 643 GLuint texture, |
432 GLint level, | 644 GLint level, |
433 GLint layer) { | 645 GLint layer) { |
646 glFramebufferTextureLayer( | |
647 target, attachment, | |
648 resources_->texture_id_map.GetServiceIDOrReserve(texture), level, layer); | |
434 return error::kNoError; | 649 return error::kNoError; |
435 } | 650 } |
436 | 651 |
437 error::Error GLES2DecoderPassthroughImpl::DoFrontFace(GLenum mode) { | 652 error::Error GLES2DecoderPassthroughImpl::DoFrontFace(GLenum mode) { |
653 glFrontFace(mode); | |
438 return error::kNoError; | 654 return error::kNoError; |
439 } | 655 } |
440 | 656 |
441 error::Error GLES2DecoderPassthroughImpl::DoGenBuffers( | 657 error::Error GLES2DecoderPassthroughImpl::DoGenBuffers( |
442 GLsizei n, | 658 GLsizei n, |
443 volatile GLuint* buffers) { | 659 volatile GLuint* buffers) { |
444 return error::kNoError; | 660 return GenHelper( |
661 n, buffers, &resources_->buffer_id_map, | |
662 [](GLsizei n, GLuint* buffers) { glGenBuffersARB(n, buffers); }); | |
445 } | 663 } |
446 | 664 |
447 error::Error GLES2DecoderPassthroughImpl::DoGenerateMipmap(GLenum target) { | 665 error::Error GLES2DecoderPassthroughImpl::DoGenerateMipmap(GLenum target) { |
666 glGenerateMipmapEXT(target); | |
448 return error::kNoError; | 667 return error::kNoError; |
449 } | 668 } |
450 | 669 |
451 error::Error GLES2DecoderPassthroughImpl::DoGenFramebuffers( | 670 error::Error GLES2DecoderPassthroughImpl::DoGenFramebuffers( |
452 GLsizei n, | 671 GLsizei n, |
453 volatile GLuint* framebuffers) { | 672 volatile GLuint* framebuffers) { |
454 return error::kNoError; | 673 return GenHelper(n, framebuffers, &framebuffer_id_map_, |
674 [](GLsizei n, GLuint* framebuffers) { | |
675 glGenFramebuffersEXT(n, framebuffers); | |
676 }); | |
455 } | 677 } |
456 | 678 |
457 error::Error GLES2DecoderPassthroughImpl::DoGenRenderbuffers( | 679 error::Error GLES2DecoderPassthroughImpl::DoGenRenderbuffers( |
458 GLsizei n, | 680 GLsizei n, |
459 volatile GLuint* renderbuffers) { | 681 volatile GLuint* renderbuffers) { |
460 return error::kNoError; | 682 return GenHelper(n, renderbuffers, &resources_->renderbuffer_id_map, |
683 [](GLsizei n, GLuint* renderbuffers) { | |
684 glGenRenderbuffersEXT(n, renderbuffers); | |
685 }); | |
461 } | 686 } |
462 | 687 |
463 error::Error GLES2DecoderPassthroughImpl::DoGenSamplers( | 688 error::Error GLES2DecoderPassthroughImpl::DoGenSamplers( |
464 GLsizei n, | 689 GLsizei n, |
465 volatile GLuint* samplers) { | 690 volatile GLuint* samplers) { |
466 return error::kNoError; | 691 return GenHelper( |
692 n, samplers, &resources_->sampler_id_map, | |
693 [](GLsizei n, GLuint* samplers) { glGenSamplers(n, samplers); }); | |
467 } | 694 } |
468 | 695 |
469 error::Error GLES2DecoderPassthroughImpl::DoGenTextures( | 696 error::Error GLES2DecoderPassthroughImpl::DoGenTextures( |
470 GLsizei n, | 697 GLsizei n, |
471 volatile GLuint* textures) { | 698 volatile GLuint* textures) { |
472 return error::kNoError; | 699 return GenHelper( |
700 n, textures, &resources_->texture_id_map, | |
701 [](GLsizei n, GLuint* textures) { glGenTextures(n, textures); }); | |
473 } | 702 } |
474 | 703 |
475 error::Error GLES2DecoderPassthroughImpl::DoGenTransformFeedbacks( | 704 error::Error GLES2DecoderPassthroughImpl::DoGenTransformFeedbacks( |
476 GLsizei n, | 705 GLsizei n, |
477 volatile GLuint* ids) { | 706 volatile GLuint* ids) { |
478 return error::kNoError; | 707 return GenHelper(n, ids, &transform_feedback_id_map_, |
708 [](GLsizei n, GLuint* transform_feedbacks) { | |
709 glGenTransformFeedbacks(n, transform_feedbacks); | |
710 }); | |
479 } | 711 } |
480 | 712 |
481 error::Error GLES2DecoderPassthroughImpl::DoGetActiveAttrib(GLuint program, | 713 error::Error GLES2DecoderPassthroughImpl::DoGetActiveAttrib(GLuint program, |
482 GLuint index, | 714 GLuint index, |
483 GLint* size, | 715 GLint* size, |
484 GLenum* type, | 716 GLenum* type, |
485 std::string* name) { | 717 std::string* name) { |
718 NOTIMPLEMENTED(); | |
486 return error::kNoError; | 719 return error::kNoError; |
487 } | 720 } |
488 | 721 |
489 error::Error GLES2DecoderPassthroughImpl::DoGetActiveUniform( | 722 error::Error GLES2DecoderPassthroughImpl::DoGetActiveUniform( |
490 GLuint program, | 723 GLuint program, |
491 GLuint index, | 724 GLuint index, |
492 GLint* size, | 725 GLint* size, |
493 GLenum* type, | 726 GLenum* type, |
494 std::string* name) { | 727 std::string* name) { |
728 NOTIMPLEMENTED(); | |
495 return error::kNoError; | 729 return error::kNoError; |
496 } | 730 } |
497 | 731 |
498 error::Error GLES2DecoderPassthroughImpl::DoGetActiveUniformBlockiv( | 732 error::Error GLES2DecoderPassthroughImpl::DoGetActiveUniformBlockiv( |
499 GLuint program, | 733 GLuint program, |
500 GLuint index, | 734 GLuint index, |
501 GLenum pname, | 735 GLenum pname, |
502 GLsizei bufSize, | 736 GLsizei bufSize, |
503 GLsizei* length, | 737 GLsizei* length, |
504 GLint* params) { | 738 GLint* params) { |
739 NOTIMPLEMENTED(); | |
505 return error::kNoError; | 740 return error::kNoError; |
506 } | 741 } |
507 | 742 |
508 error::Error GLES2DecoderPassthroughImpl::DoGetActiveUniformBlockName( | 743 error::Error GLES2DecoderPassthroughImpl::DoGetActiveUniformBlockName( |
509 GLuint program, | 744 GLuint program, |
510 GLuint index, | 745 GLuint index, |
511 std::string* name) { | 746 std::string* name) { |
747 NOTIMPLEMENTED(); | |
512 return error::kNoError; | 748 return error::kNoError; |
513 } | 749 } |
514 | 750 |
515 error::Error GLES2DecoderPassthroughImpl::DoGetActiveUniformsiv( | 751 error::Error GLES2DecoderPassthroughImpl::DoGetActiveUniformsiv( |
516 GLuint program, | 752 GLuint program, |
517 GLsizei count, | 753 GLsizei count, |
518 const GLuint* indices, | 754 const GLuint* indices, |
519 GLenum pname, | 755 GLenum pname, |
520 GLsizei bufSize, | 756 GLsizei bufSize, |
521 GLsizei* length, | 757 GLsizei* length, |
522 GLint* params) { | 758 GLint* params) { |
759 NOTIMPLEMENTED(); | |
523 return error::kNoError; | 760 return error::kNoError; |
524 } | 761 } |
525 | 762 |
526 error::Error GLES2DecoderPassthroughImpl::DoGetAttachedShaders( | 763 error::Error GLES2DecoderPassthroughImpl::DoGetAttachedShaders( |
527 GLuint program, | 764 GLuint program, |
528 GLsizei maxcount, | 765 GLsizei maxcount, |
529 GLsizei* count, | 766 GLsizei* count, |
530 GLuint* shaders) { | 767 GLuint* shaders) { |
768 NOTIMPLEMENTED(); | |
531 return error::kNoError; | 769 return error::kNoError; |
532 } | 770 } |
533 | 771 |
534 error::Error GLES2DecoderPassthroughImpl::DoGetAttribLocation(GLuint program, | 772 error::Error GLES2DecoderPassthroughImpl::DoGetAttribLocation(GLuint program, |
535 const char* name, | 773 const char* name, |
536 GLint* result) { | 774 GLint* result) { |
775 NOTIMPLEMENTED(); | |
537 return error::kNoError; | 776 return error::kNoError; |
538 } | 777 } |
539 | 778 |
540 error::Error GLES2DecoderPassthroughImpl::DoGetBooleanv(GLenum pname, | 779 error::Error GLES2DecoderPassthroughImpl::DoGetBooleanv(GLenum pname, |
541 GLsizei bufsize, | 780 GLsizei bufsize, |
542 GLsizei* length, | 781 GLsizei* length, |
543 GLboolean* params) { | 782 GLboolean* params) { |
783 // TODO(geofflang): new-style getter | |
784 glGetBooleanv(pname, params); | |
785 *length = 1; | |
544 return error::kNoError; | 786 return error::kNoError; |
545 } | 787 } |
546 | 788 |
547 error::Error GLES2DecoderPassthroughImpl::DoGetBufferParameteri64v( | 789 error::Error GLES2DecoderPassthroughImpl::DoGetBufferParameteri64v( |
548 GLenum target, | 790 GLenum target, |
549 GLenum pname, | 791 GLenum pname, |
550 GLsizei bufsize, | 792 GLsizei bufsize, |
551 GLsizei* length, | 793 GLsizei* length, |
552 GLint64* params) { | 794 GLint64* params) { |
795 NOTIMPLEMENTED(); | |
796 // TODO(geofflang): new-style getter | |
797 // TODO(geofflang): missing glGetBufferParameteri64v? | |
798 // glGetBufferParameteri64v(target, pname, params); | |
799 *length = 1; | |
553 return error::kNoError; | 800 return error::kNoError; |
554 } | 801 } |
555 | 802 |
556 error::Error GLES2DecoderPassthroughImpl::DoGetBufferParameteriv( | 803 error::Error GLES2DecoderPassthroughImpl::DoGetBufferParameteriv( |
557 GLenum target, | 804 GLenum target, |
558 GLenum pname, | 805 GLenum pname, |
559 GLsizei bufsize, | 806 GLsizei bufsize, |
560 GLsizei* length, | 807 GLsizei* length, |
561 GLint* params) { | 808 GLint* params) { |
809 // TODO(geofflang): new-style getter | |
810 glGetBufferParameteriv(target, pname, params); | |
811 *length = 1; | |
562 return error::kNoError; | 812 return error::kNoError; |
563 } | 813 } |
564 | 814 |
565 error::Error GLES2DecoderPassthroughImpl::DoGetError(uint32_t* result) { | 815 error::Error GLES2DecoderPassthroughImpl::DoGetError(uint32_t* result) { |
816 *result = glGetError(); | |
566 return error::kNoError; | 817 return error::kNoError; |
567 } | 818 } |
568 | 819 |
569 error::Error GLES2DecoderPassthroughImpl::DoGetFloatv(GLenum pname, | 820 error::Error GLES2DecoderPassthroughImpl::DoGetFloatv(GLenum pname, |
570 GLsizei bufsize, | 821 GLsizei bufsize, |
571 GLsizei* length, | 822 GLsizei* length, |
572 GLfloat* params) { | 823 GLfloat* params) { |
824 // TODO(geofflang): new-style getter | |
825 glGetFloatv(pname, params); | |
826 *length = 1; | |
573 return error::kNoError; | 827 return error::kNoError; |
574 } | 828 } |
575 | 829 |
576 error::Error GLES2DecoderPassthroughImpl::DoGetFragDataLocation( | 830 error::Error GLES2DecoderPassthroughImpl::DoGetFragDataLocation( |
577 GLuint program, | 831 GLuint program, |
578 const char* name, | 832 const char* name, |
579 GLint* result) { | 833 GLint* result) { |
834 NOTIMPLEMENTED(); | |
580 return error::kNoError; | 835 return error::kNoError; |
581 } | 836 } |
582 | 837 |
583 error::Error GLES2DecoderPassthroughImpl::DoGetFramebufferAttachmentParameteriv( | 838 error::Error GLES2DecoderPassthroughImpl::DoGetFramebufferAttachmentParameteriv( |
584 GLenum target, | 839 GLenum target, |
585 GLenum attachment, | 840 GLenum attachment, |
586 GLenum pname, | 841 GLenum pname, |
587 GLsizei bufsize, | 842 GLsizei bufsize, |
588 GLsizei* length, | 843 GLsizei* length, |
589 GLint* params) { | 844 GLint* params) { |
845 // TODO(geofflang): new-style getter | |
846 glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, params); | |
847 *length = 1; | |
590 return error::kNoError; | 848 return error::kNoError; |
591 } | 849 } |
592 | 850 |
593 error::Error GLES2DecoderPassthroughImpl::DoGetInteger64v(GLenum pname, | 851 error::Error GLES2DecoderPassthroughImpl::DoGetInteger64v(GLenum pname, |
594 GLsizei bufsize, | 852 GLsizei bufsize, |
595 GLsizei* length, | 853 GLsizei* length, |
596 GLint64* params) { | 854 GLint64* params) { |
855 // TODO(geofflang): new-style getter | |
856 glGetInteger64v(pname, params); | |
857 *length = 1; | |
597 return error::kNoError; | 858 return error::kNoError; |
598 } | 859 } |
599 | 860 |
600 error::Error GLES2DecoderPassthroughImpl::DoGetIntegeri_v(GLenum pname, | 861 error::Error GLES2DecoderPassthroughImpl::DoGetIntegeri_v(GLenum pname, |
601 GLuint index, | 862 GLuint index, |
602 GLsizei bufsize, | 863 GLsizei bufsize, |
603 GLsizei* length, | 864 GLsizei* length, |
604 GLint* data) { | 865 GLint* data) { |
866 // TODO(geofflang): new-style getter | |
867 glGetIntegeri_v(pname, index, data); | |
868 *length = 1; | |
605 return error::kNoError; | 869 return error::kNoError; |
606 } | 870 } |
607 | 871 |
608 error::Error GLES2DecoderPassthroughImpl::DoGetInteger64i_v(GLenum pname, | 872 error::Error GLES2DecoderPassthroughImpl::DoGetInteger64i_v(GLenum pname, |
609 GLuint index, | 873 GLuint index, |
610 GLsizei bufsize, | 874 GLsizei bufsize, |
611 GLsizei* length, | 875 GLsizei* length, |
612 GLint64* data) { | 876 GLint64* data) { |
877 // TODO(geofflang): new-style getter | |
878 glGetInteger64i_v(pname, index, data); | |
879 *length = 1; | |
613 return error::kNoError; | 880 return error::kNoError; |
614 } | 881 } |
615 | 882 |
616 error::Error GLES2DecoderPassthroughImpl::DoGetIntegerv(GLenum pname, | 883 error::Error GLES2DecoderPassthroughImpl::DoGetIntegerv(GLenum pname, |
617 GLsizei bufsize, | 884 GLsizei bufsize, |
618 GLsizei* length, | 885 GLsizei* length, |
619 GLint* params) { | 886 GLint* params) { |
887 // TODO(geofflang): new-style getter | |
888 glGetIntegerv(pname, params); | |
889 *length = 1; | |
890 // HACK: WebGL initialization requires this query | |
891 if (pname == GL_MAX_VIEWPORT_DIMS) { | |
892 *length = 2; | |
893 } | |
620 return error::kNoError; | 894 return error::kNoError; |
621 } | 895 } |
622 | 896 |
623 error::Error GLES2DecoderPassthroughImpl::DoGetInternalformativ(GLenum target, | 897 error::Error GLES2DecoderPassthroughImpl::DoGetInternalformativ(GLenum target, |
624 GLenum format, | 898 GLenum format, |
625 GLenum pname, | 899 GLenum pname, |
626 GLsizei bufSize, | 900 GLsizei bufSize, |
627 GLsizei* length, | 901 GLsizei* length, |
628 GLint* params) { | 902 GLint* params) { |
903 // TODO(geofflang): new-style getter | |
904 glGetInternalformativ(target, format, pname, bufSize, params); | |
905 *length = 1; | |
629 return error::kNoError; | 906 return error::kNoError; |
630 } | 907 } |
631 | 908 |
632 error::Error GLES2DecoderPassthroughImpl::DoGetProgramiv(GLuint program, | 909 error::Error GLES2DecoderPassthroughImpl::DoGetProgramiv(GLuint program, |
633 GLenum pname, | 910 GLenum pname, |
634 GLsizei bufsize, | 911 GLsizei bufsize, |
635 GLsizei* length, | 912 GLsizei* length, |
636 GLint* params) { | 913 GLint* params) { |
914 // TODO(geofflang): new-style getter | |
915 glGetProgramiv(resources_->program_id_map.GetServiceIDOrReserve(program), | |
916 pname, params); | |
917 *length = 1; | |
637 return error::kNoError; | 918 return error::kNoError; |
638 } | 919 } |
639 | 920 |
640 error::Error GLES2DecoderPassthroughImpl::DoGetProgramInfoLog( | 921 error::Error GLES2DecoderPassthroughImpl::DoGetProgramInfoLog( |
641 GLuint program, | 922 GLuint program, |
642 std::string* infolog) { | 923 std::string* infolog) { |
924 GLint info_log_len = 0; | |
925 glGetProgramiv(resources_->program_id_map.GetServiceIDOrReserve(program), | |
926 GL_INFO_LOG_LENGTH, &info_log_len); | |
927 | |
928 std::vector<char> buffer(info_log_len, 0); | |
929 glGetProgramInfoLog(resources_->program_id_map.GetServiceIDOrReserve(program), | |
930 info_log_len, nullptr, buffer.data()); | |
931 *infolog = std::string(buffer.data()); | |
643 return error::kNoError; | 932 return error::kNoError; |
644 } | 933 } |
645 | 934 |
646 error::Error GLES2DecoderPassthroughImpl::DoGetRenderbufferParameteriv( | 935 error::Error GLES2DecoderPassthroughImpl::DoGetRenderbufferParameteriv( |
647 GLenum target, | 936 GLenum target, |
648 GLenum pname, | 937 GLenum pname, |
649 GLsizei bufsize, | 938 GLsizei bufsize, |
650 GLsizei* length, | 939 GLsizei* length, |
651 GLint* params) { | 940 GLint* params) { |
941 NOTIMPLEMENTED(); | |
652 return error::kNoError; | 942 return error::kNoError; |
653 } | 943 } |
654 | 944 |
655 error::Error GLES2DecoderPassthroughImpl::DoGetSamplerParameterfv( | 945 error::Error GLES2DecoderPassthroughImpl::DoGetSamplerParameterfv( |
656 GLuint sampler, | 946 GLuint sampler, |
657 GLenum pname, | 947 GLenum pname, |
658 GLsizei bufsize, | 948 GLsizei bufsize, |
659 GLsizei* length, | 949 GLsizei* length, |
660 GLfloat* params) { | 950 GLfloat* params) { |
951 // TODO(geofflang): new-style getter | |
952 glGetSamplerParameterfv( | |
953 resources_->sampler_id_map.GetServiceIDOrReserve(sampler), pname, params); | |
954 *length = 1; | |
661 return error::kNoError; | 955 return error::kNoError; |
662 } | 956 } |
663 | 957 |
664 error::Error GLES2DecoderPassthroughImpl::DoGetSamplerParameteriv( | 958 error::Error GLES2DecoderPassthroughImpl::DoGetSamplerParameteriv( |
665 GLuint sampler, | 959 GLuint sampler, |
666 GLenum pname, | 960 GLenum pname, |
667 GLsizei bufsize, | 961 GLsizei bufsize, |
668 GLsizei* length, | 962 GLsizei* length, |
669 GLint* params) { | 963 GLint* params) { |
964 NOTIMPLEMENTED(); | |
965 // TODO(geofflang): new-style getter | |
966 // glGetRenderbufferParameterivEXT(target, pname, params); | |
967 *length = 1; | |
670 return error::kNoError; | 968 return error::kNoError; |
671 } | 969 } |
672 | 970 |
673 error::Error GLES2DecoderPassthroughImpl::DoGetShaderiv(GLuint shader, | 971 error::Error GLES2DecoderPassthroughImpl::DoGetShaderiv(GLuint shader, |
674 GLenum pname, | 972 GLenum pname, |
675 GLsizei bufsize, | 973 GLsizei bufsize, |
676 GLsizei* length, | 974 GLsizei* length, |
677 GLint* params) { | 975 GLint* params) { |
976 // TODO(geofflang): new-style getter | |
977 glGetShaderiv(resources_->shader_id_map.GetServiceIDOrReserve(shader), pname, | |
978 params); | |
979 *length = 1; | |
678 return error::kNoError; | 980 return error::kNoError; |
679 } | 981 } |
680 | 982 |
681 error::Error GLES2DecoderPassthroughImpl::DoGetShaderInfoLog( | 983 error::Error GLES2DecoderPassthroughImpl::DoGetShaderInfoLog( |
682 GLuint shader, | 984 GLuint shader, |
683 std::string* infolog) { | 985 std::string* infolog) { |
986 GLuint service_id = resources_->shader_id_map.GetServiceIDOrReserve(shader); | |
987 GLint info_log_len = 0; | |
988 glGetShaderiv(service_id, GL_INFO_LOG_LENGTH, &info_log_len); | |
989 std::vector<char> buffer(info_log_len, 0); | |
990 glGetShaderInfoLog(service_id, info_log_len, nullptr, buffer.data()); | |
991 *infolog = std::string(buffer.data()); | |
684 return error::kNoError; | 992 return error::kNoError; |
685 } | 993 } |
686 | 994 |
687 error::Error GLES2DecoderPassthroughImpl::DoGetShaderPrecisionFormat( | 995 error::Error GLES2DecoderPassthroughImpl::DoGetShaderPrecisionFormat( |
688 GLenum shadertype, | 996 GLenum shadertype, |
689 GLenum precisiontype, | 997 GLenum precisiontype, |
690 GLint* range, | 998 GLint* range, |
691 GLint* precision) { | 999 GLint* precision) { |
1000 glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); | |
692 return error::kNoError; | 1001 return error::kNoError; |
693 } | 1002 } |
694 | 1003 |
695 error::Error GLES2DecoderPassthroughImpl::DoGetShaderSource( | 1004 error::Error GLES2DecoderPassthroughImpl::DoGetShaderSource( |
696 GLuint shader, | 1005 GLuint shader, |
697 std::string* source) { | 1006 std::string* source) { |
1007 NOTIMPLEMENTED(); | |
698 return error::kNoError; | 1008 return error::kNoError; |
699 } | 1009 } |
700 | 1010 |
701 error::Error GLES2DecoderPassthroughImpl::DoGetString(GLenum name, | 1011 error::Error GLES2DecoderPassthroughImpl::DoGetString(GLenum name, |
702 const char** result) { | 1012 const char** result) { |
1013 // TODO(geofflang): Append additional CHROMIUM extension strings? | |
1014 *result = reinterpret_cast<const char*>(glGetString(name)); | |
703 return error::kNoError; | 1015 return error::kNoError; |
704 } | 1016 } |
705 | 1017 |
706 error::Error GLES2DecoderPassthroughImpl::DoGetSynciv(GLuint sync, | 1018 error::Error GLES2DecoderPassthroughImpl::DoGetSynciv(GLuint sync, |
707 GLenum pname, | 1019 GLenum pname, |
708 GLsizei bufsize, | 1020 GLsizei bufsize, |
709 GLsizei* length, | 1021 GLsizei* length, |
710 GLint* values) { | 1022 GLint* values) { |
1023 glGetSynciv(reinterpret_cast<GLsync>( | |
1024 resources_->sync_id_map.GetServiceIDOrReserve(sync)), | |
1025 pname, bufsize, length, values); | |
711 return error::kNoError; | 1026 return error::kNoError; |
712 } | 1027 } |
713 | 1028 |
714 error::Error GLES2DecoderPassthroughImpl::DoGetTexParameterfv(GLenum target, | 1029 error::Error GLES2DecoderPassthroughImpl::DoGetTexParameterfv(GLenum target, |
715 GLenum pname, | 1030 GLenum pname, |
716 GLsizei bufsize, | 1031 GLsizei bufsize, |
717 GLsizei* length, | 1032 GLsizei* length, |
718 GLfloat* params) { | 1033 GLfloat* params) { |
1034 // TODO(geofflang): new-style getter | |
1035 glGetTexParameterfv(target, pname, params); | |
1036 *length = 1; | |
719 return error::kNoError; | 1037 return error::kNoError; |
720 } | 1038 } |
721 | 1039 |
722 error::Error GLES2DecoderPassthroughImpl::DoGetTexParameteriv(GLenum target, | 1040 error::Error GLES2DecoderPassthroughImpl::DoGetTexParameteriv(GLenum target, |
723 GLenum pname, | 1041 GLenum pname, |
724 GLsizei bufsize, | 1042 GLsizei bufsize, |
725 GLsizei* length, | 1043 GLsizei* length, |
726 GLint* params) { | 1044 GLint* params) { |
1045 // TODO(geofflang): new-style getter | |
1046 glGetTexParameteriv(target, pname, params); | |
1047 *length = 1; | |
727 return error::kNoError; | 1048 return error::kNoError; |
728 } | 1049 } |
729 | 1050 |
730 error::Error GLES2DecoderPassthroughImpl::DoGetTransformFeedbackVarying( | 1051 error::Error GLES2DecoderPassthroughImpl::DoGetTransformFeedbackVarying( |
731 GLuint program, | 1052 GLuint program, |
732 GLuint index, | 1053 GLuint index, |
733 GLsizei* size, | 1054 GLsizei* size, |
734 GLenum* type, | 1055 GLenum* type, |
735 std::string* name) { | 1056 std::string* name) { |
1057 NOTIMPLEMENTED(); | |
736 return error::kNoError; | 1058 return error::kNoError; |
737 } | 1059 } |
738 | 1060 |
739 error::Error GLES2DecoderPassthroughImpl::DoGetUniformBlockIndex( | 1061 error::Error GLES2DecoderPassthroughImpl::DoGetUniformBlockIndex( |
740 GLuint program, | 1062 GLuint program, |
741 const char* name, | 1063 const char* name, |
742 GLint* index) { | 1064 GLint* index) { |
1065 NOTIMPLEMENTED(); | |
743 return error::kNoError; | 1066 return error::kNoError; |
744 } | 1067 } |
745 | 1068 |
746 error::Error GLES2DecoderPassthroughImpl::DoGetUniformfv(GLuint program, | 1069 error::Error GLES2DecoderPassthroughImpl::DoGetUniformfv(GLuint program, |
747 GLint location, | 1070 GLint location, |
748 GLsizei bufsize, | 1071 GLsizei bufsize, |
749 GLsizei* length, | 1072 GLsizei* length, |
750 GLfloat* params) { | 1073 GLfloat* params) { |
1074 // TODO(geofflang): new-style getter | |
1075 glGetUniformfv(resources_->program_id_map.GetServiceIDOrReserve(program), | |
1076 location, params); | |
1077 *length = 1; | |
751 return error::kNoError; | 1078 return error::kNoError; |
752 } | 1079 } |
753 | 1080 |
754 error::Error GLES2DecoderPassthroughImpl::DoGetUniformiv(GLuint program, | 1081 error::Error GLES2DecoderPassthroughImpl::DoGetUniformiv(GLuint program, |
755 GLint location, | 1082 GLint location, |
756 GLsizei bufsize, | 1083 GLsizei bufsize, |
757 GLsizei* length, | 1084 GLsizei* length, |
758 GLint* params) { | 1085 GLint* params) { |
1086 // TODO(geofflang): new-style getter | |
1087 glGetUniformiv(resources_->program_id_map.GetServiceIDOrReserve(program), | |
1088 location, params); | |
1089 *length = 1; | |
759 return error::kNoError; | 1090 return error::kNoError; |
760 } | 1091 } |
761 | 1092 |
762 error::Error GLES2DecoderPassthroughImpl::DoGetUniformuiv(GLuint program, | 1093 error::Error GLES2DecoderPassthroughImpl::DoGetUniformuiv(GLuint program, |
763 GLint location, | 1094 GLint location, |
764 GLsizei bufsize, | 1095 GLsizei bufsize, |
765 GLsizei* length, | 1096 GLsizei* length, |
766 GLuint* params) { | 1097 GLuint* params) { |
1098 // TODO(geofflang): new-style getter | |
1099 glGetUniformuiv(resources_->program_id_map.GetServiceIDOrReserve(program), | |
1100 location, params); | |
1101 *length = 1; | |
767 return error::kNoError; | 1102 return error::kNoError; |
768 } | 1103 } |
769 | 1104 |
770 error::Error GLES2DecoderPassthroughImpl::DoGetUniformIndices( | 1105 error::Error GLES2DecoderPassthroughImpl::DoGetUniformIndices( |
771 GLuint program, | 1106 GLuint program, |
772 GLsizei count, | 1107 GLsizei count, |
773 const char* const* names, | 1108 const char* const* names, |
774 GLsizei bufSize, | 1109 GLsizei bufSize, |
775 GLsizei* length, | 1110 GLsizei* length, |
776 GLuint* indices) { | 1111 GLuint* indices) { |
1112 NOTIMPLEMENTED(); | |
777 return error::kNoError; | 1113 return error::kNoError; |
778 } | 1114 } |
779 | 1115 |
780 error::Error GLES2DecoderPassthroughImpl::DoGetUniformLocation( | 1116 error::Error GLES2DecoderPassthroughImpl::DoGetUniformLocation( |
781 GLuint program, | 1117 GLuint program, |
782 const char* name, | 1118 const char* name, |
783 GLint* location) { | 1119 GLint* location) { |
1120 *location = glGetUniformLocation( | |
1121 resources_->program_id_map.GetServiceIDOrReserve(program), name); | |
784 return error::kNoError; | 1122 return error::kNoError; |
785 } | 1123 } |
786 | 1124 |
787 error::Error GLES2DecoderPassthroughImpl::DoGetVertexAttribfv(GLuint index, | 1125 error::Error GLES2DecoderPassthroughImpl::DoGetVertexAttribfv(GLuint index, |
788 GLenum pname, | 1126 GLenum pname, |
789 GLsizei bufsize, | 1127 GLsizei bufsize, |
790 GLsizei* length, | 1128 GLsizei* length, |
791 GLfloat* params) { | 1129 GLfloat* params) { |
1130 NOTIMPLEMENTED(); | |
792 return error::kNoError; | 1131 return error::kNoError; |
793 } | 1132 } |
794 | 1133 |
795 error::Error GLES2DecoderPassthroughImpl::DoGetVertexAttribiv(GLuint index, | 1134 error::Error GLES2DecoderPassthroughImpl::DoGetVertexAttribiv(GLuint index, |
796 GLenum pname, | 1135 GLenum pname, |
797 GLsizei bufsize, | 1136 GLsizei bufsize, |
798 GLsizei* length, | 1137 GLsizei* length, |
799 GLint* params) { | 1138 GLint* params) { |
1139 NOTIMPLEMENTED(); | |
800 return error::kNoError; | 1140 return error::kNoError; |
801 } | 1141 } |
802 | 1142 |
803 error::Error GLES2DecoderPassthroughImpl::DoGetVertexAttribIiv(GLuint index, | 1143 error::Error GLES2DecoderPassthroughImpl::DoGetVertexAttribIiv(GLuint index, |
804 GLenum pname, | 1144 GLenum pname, |
805 GLsizei bufsize, | 1145 GLsizei bufsize, |
806 GLsizei* length, | 1146 GLsizei* length, |
807 GLint* params) { | 1147 GLint* params) { |
1148 NOTIMPLEMENTED(); | |
808 return error::kNoError; | 1149 return error::kNoError; |
809 } | 1150 } |
810 | 1151 |
811 error::Error GLES2DecoderPassthroughImpl::DoGetVertexAttribIuiv( | 1152 error::Error GLES2DecoderPassthroughImpl::DoGetVertexAttribIuiv( |
812 GLuint index, | 1153 GLuint index, |
813 GLenum pname, | 1154 GLenum pname, |
814 GLsizei bufsize, | 1155 GLsizei bufsize, |
815 GLsizei* length, | 1156 GLsizei* length, |
816 GLuint* params) { | 1157 GLuint* params) { |
1158 NOTIMPLEMENTED(); | |
817 return error::kNoError; | 1159 return error::kNoError; |
818 } | 1160 } |
819 | 1161 |
820 error::Error GLES2DecoderPassthroughImpl::DoGetVertexAttribPointerv( | 1162 error::Error GLES2DecoderPassthroughImpl::DoGetVertexAttribPointerv( |
821 GLuint index, | 1163 GLuint index, |
822 GLenum pname, | 1164 GLenum pname, |
823 GLsizei bufsize, | 1165 GLsizei bufsize, |
824 GLsizei* length, | 1166 GLsizei* length, |
825 GLuint* pointer) { | 1167 GLuint* pointer) { |
1168 NOTIMPLEMENTED(); | |
826 return error::kNoError; | 1169 return error::kNoError; |
827 } | 1170 } |
828 | 1171 |
829 error::Error GLES2DecoderPassthroughImpl::DoHint(GLenum target, GLenum mode) { | 1172 error::Error GLES2DecoderPassthroughImpl::DoHint(GLenum target, GLenum mode) { |
1173 glHint(target, mode); | |
830 return error::kNoError; | 1174 return error::kNoError; |
831 } | 1175 } |
832 | 1176 |
833 error::Error GLES2DecoderPassthroughImpl::DoInvalidateFramebuffer( | 1177 error::Error GLES2DecoderPassthroughImpl::DoInvalidateFramebuffer( |
834 GLenum target, | 1178 GLenum target, |
835 GLsizei count, | 1179 GLsizei count, |
836 const volatile GLenum* attachments) { | 1180 const volatile GLenum* attachments) { |
1181 std::vector<GLenum> attachments_copy(attachments, attachments + count); | |
1182 glInvalidateFramebuffer(target, count, attachments_copy.data()); | |
837 return error::kNoError; | 1183 return error::kNoError; |
838 } | 1184 } |
839 | 1185 |
840 error::Error GLES2DecoderPassthroughImpl::DoInvalidateSubFramebuffer( | 1186 error::Error GLES2DecoderPassthroughImpl::DoInvalidateSubFramebuffer( |
841 GLenum target, | 1187 GLenum target, |
842 GLsizei count, | 1188 GLsizei count, |
843 const volatile GLenum* attachments, | 1189 const volatile GLenum* attachments, |
844 GLint x, | 1190 GLint x, |
845 GLint y, | 1191 GLint y, |
846 GLsizei width, | 1192 GLsizei width, |
847 GLsizei height) { | 1193 GLsizei height) { |
1194 std::vector<GLenum> attachments_copy(attachments, attachments + count); | |
1195 glInvalidateSubFramebuffer(target, count, attachments_copy.data(), x, y, | |
1196 width, height); | |
848 return error::kNoError; | 1197 return error::kNoError; |
849 } | 1198 } |
850 | 1199 |
851 error::Error GLES2DecoderPassthroughImpl::DoIsBuffer(GLuint buffer, | 1200 error::Error GLES2DecoderPassthroughImpl::DoIsBuffer(GLuint buffer, |
852 uint32_t* result) { | 1201 uint32_t* result) { |
1202 NOTIMPLEMENTED(); | |
1203 *result = glIsBuffer(resources_->buffer_id_map.GetServiceIDOrReserve(buffer)); | |
853 return error::kNoError; | 1204 return error::kNoError; |
854 } | 1205 } |
855 | 1206 |
856 error::Error GLES2DecoderPassthroughImpl::DoIsEnabled(GLenum cap, | 1207 error::Error GLES2DecoderPassthroughImpl::DoIsEnabled(GLenum cap, |
857 uint32_t* result) { | 1208 uint32_t* result) { |
1209 *result = glIsEnabled(cap); | |
858 return error::kNoError; | 1210 return error::kNoError; |
859 } | 1211 } |
860 | 1212 |
861 error::Error GLES2DecoderPassthroughImpl::DoIsFramebuffer(GLuint framebuffer, | 1213 error::Error GLES2DecoderPassthroughImpl::DoIsFramebuffer(GLuint framebuffer, |
862 uint32_t* result) { | 1214 uint32_t* result) { |
1215 *result = glIsFramebufferEXT( | |
1216 framebuffer_id_map_.GetServiceIDOrReserve(framebuffer)); | |
863 return error::kNoError; | 1217 return error::kNoError; |
864 } | 1218 } |
865 | 1219 |
866 error::Error GLES2DecoderPassthroughImpl::DoIsProgram(GLuint program, | 1220 error::Error GLES2DecoderPassthroughImpl::DoIsProgram(GLuint program, |
867 uint32_t* result) { | 1221 uint32_t* result) { |
1222 *result = | |
1223 glIsProgram(resources_->program_id_map.GetServiceIDOrReserve(program)); | |
868 return error::kNoError; | 1224 return error::kNoError; |
869 } | 1225 } |
870 | 1226 |
871 error::Error GLES2DecoderPassthroughImpl::DoIsRenderbuffer(GLuint renderbuffer, | 1227 error::Error GLES2DecoderPassthroughImpl::DoIsRenderbuffer(GLuint renderbuffer, |
872 uint32_t* result) { | 1228 uint32_t* result) { |
1229 NOTIMPLEMENTED(); | |
1230 *result = glIsRenderbufferEXT( | |
1231 resources_->buffer_id_map.GetServiceIDOrReserve(renderbuffer)); | |
873 return error::kNoError; | 1232 return error::kNoError; |
874 } | 1233 } |
875 | 1234 |
876 error::Error GLES2DecoderPassthroughImpl::DoIsSampler(GLuint sampler, | 1235 error::Error GLES2DecoderPassthroughImpl::DoIsSampler(GLuint sampler, |
877 uint32_t* result) { | 1236 uint32_t* result) { |
1237 *result = | |
1238 glIsSampler(resources_->sampler_id_map.GetServiceIDOrReserve(sampler)); | |
878 return error::kNoError; | 1239 return error::kNoError; |
879 } | 1240 } |
880 | 1241 |
881 error::Error GLES2DecoderPassthroughImpl::DoIsShader(GLuint shader, | 1242 error::Error GLES2DecoderPassthroughImpl::DoIsShader(GLuint shader, |
882 uint32_t* result) { | 1243 uint32_t* result) { |
1244 *result = glIsShader(resources_->shader_id_map.GetServiceIDOrReserve(shader)); | |
883 return error::kNoError; | 1245 return error::kNoError; |
884 } | 1246 } |
885 | 1247 |
886 error::Error GLES2DecoderPassthroughImpl::DoIsSync(GLuint sync, | 1248 error::Error GLES2DecoderPassthroughImpl::DoIsSync(GLuint sync, |
887 uint32_t* result) { | 1249 uint32_t* result) { |
1250 *result = glIsSync(reinterpret_cast<GLsync>( | |
1251 resources_->sync_id_map.GetServiceIDOrReserve(sync))); | |
888 return error::kNoError; | 1252 return error::kNoError; |
889 } | 1253 } |
890 | 1254 |
891 error::Error GLES2DecoderPassthroughImpl::DoIsTexture(GLuint texture, | 1255 error::Error GLES2DecoderPassthroughImpl::DoIsTexture(GLuint texture, |
892 uint32_t* result) { | 1256 uint32_t* result) { |
1257 *result = | |
1258 glIsTexture(resources_->texture_id_map.GetServiceIDOrReserve(texture)); | |
893 return error::kNoError; | 1259 return error::kNoError; |
894 } | 1260 } |
895 | 1261 |
896 error::Error GLES2DecoderPassthroughImpl::DoIsTransformFeedback( | 1262 error::Error GLES2DecoderPassthroughImpl::DoIsTransformFeedback( |
897 GLuint transformfeedback, | 1263 GLuint transformfeedback, |
898 uint32_t* result) { | 1264 uint32_t* result) { |
1265 *result = glIsTransformFeedback( | |
1266 transform_feedback_id_map_.GetServiceIDOrReserve(transformfeedback)); | |
899 return error::kNoError; | 1267 return error::kNoError; |
900 } | 1268 } |
901 | 1269 |
902 error::Error GLES2DecoderPassthroughImpl::DoLineWidth(GLfloat width) { | 1270 error::Error GLES2DecoderPassthroughImpl::DoLineWidth(GLfloat width) { |
1271 glLineWidth(width); | |
903 return error::kNoError; | 1272 return error::kNoError; |
904 } | 1273 } |
905 | 1274 |
906 error::Error GLES2DecoderPassthroughImpl::DoLinkProgram(GLuint program) { | 1275 error::Error GLES2DecoderPassthroughImpl::DoLinkProgram(GLuint program) { |
1276 glLinkProgram(resources_->program_id_map.GetServiceIDOrReserve(program)); | |
907 return error::kNoError; | 1277 return error::kNoError; |
908 } | 1278 } |
909 | 1279 |
910 error::Error GLES2DecoderPassthroughImpl::DoPauseTransformFeedback() { | 1280 error::Error GLES2DecoderPassthroughImpl::DoPauseTransformFeedback() { |
1281 glPauseTransformFeedback(); | |
911 return error::kNoError; | 1282 return error::kNoError; |
912 } | 1283 } |
913 | 1284 |
914 error::Error GLES2DecoderPassthroughImpl::DoPixelStorei(GLenum pname, | 1285 error::Error GLES2DecoderPassthroughImpl::DoPixelStorei(GLenum pname, |
915 GLint param) { | 1286 GLint param) { |
1287 glPixelStorei(pname, param); | |
916 return error::kNoError; | 1288 return error::kNoError; |
917 } | 1289 } |
918 | 1290 |
919 error::Error GLES2DecoderPassthroughImpl::DoPolygonOffset(GLfloat factor, | 1291 error::Error GLES2DecoderPassthroughImpl::DoPolygonOffset(GLfloat factor, |
920 GLfloat units) { | 1292 GLfloat units) { |
1293 glPolygonOffset(factor, units); | |
921 return error::kNoError; | 1294 return error::kNoError; |
922 } | 1295 } |
923 | 1296 |
924 error::Error GLES2DecoderPassthroughImpl::DoReadBuffer(GLenum src) { | 1297 error::Error GLES2DecoderPassthroughImpl::DoReadBuffer(GLenum src) { |
1298 glReadBuffer(src); | |
925 return error::kNoError; | 1299 return error::kNoError; |
926 } | 1300 } |
927 | 1301 |
928 error::Error GLES2DecoderPassthroughImpl::DoReadPixels(GLint x, | 1302 error::Error GLES2DecoderPassthroughImpl::DoReadPixels(GLint x, |
929 GLint y, | 1303 GLint y, |
930 GLsizei width, | 1304 GLsizei width, |
931 GLsizei height, | 1305 GLsizei height, |
932 GLenum format, | 1306 GLenum format, |
933 GLenum type, | 1307 GLenum type, |
934 GLsizei bufsize, | 1308 GLsizei bufsize, |
935 GLsizei* length, | 1309 GLsizei* length, |
936 void* pixels) { | 1310 void* pixels) { |
1311 glReadPixels(x, y, width, height, format, type, pixels); | |
1312 | |
1313 // HACK: Calculate the length here without taking into account the unpack | |
1314 // parameters. | |
1315 // Move into an ANGLE extension. | |
1316 size_t componentCount = 4; | |
1317 switch (format) { | |
1318 case GL_RGBA: | |
1319 componentCount = 4; | |
1320 break; | |
1321 case GL_RGB: | |
1322 componentCount = 3; | |
1323 break; | |
1324 case GL_RG: | |
1325 componentCount = 2; | |
1326 break; | |
1327 case GL_RED: | |
1328 componentCount = 1; | |
1329 break; | |
1330 } | |
1331 *length = width * height * componentCount * 4; | |
1332 | |
937 return error::kNoError; | 1333 return error::kNoError; |
938 } | 1334 } |
939 | 1335 |
940 error::Error GLES2DecoderPassthroughImpl::DoReleaseShaderCompiler() { | 1336 error::Error GLES2DecoderPassthroughImpl::DoReleaseShaderCompiler() { |
1337 glReleaseShaderCompiler(); | |
941 return error::kNoError; | 1338 return error::kNoError; |
942 } | 1339 } |
943 | 1340 |
944 error::Error GLES2DecoderPassthroughImpl::DoRenderbufferStorage( | 1341 error::Error GLES2DecoderPassthroughImpl::DoRenderbufferStorage( |
945 GLenum target, | 1342 GLenum target, |
946 GLenum internalformat, | 1343 GLenum internalformat, |
947 GLsizei width, | 1344 GLsizei width, |
948 GLsizei height) { | 1345 GLsizei height) { |
1346 glRenderbufferStorageEXT(target, internalformat, width, height); | |
949 return error::kNoError; | 1347 return error::kNoError; |
950 } | 1348 } |
951 | 1349 |
952 error::Error GLES2DecoderPassthroughImpl::DoResumeTransformFeedback() { | 1350 error::Error GLES2DecoderPassthroughImpl::DoResumeTransformFeedback() { |
1351 glResumeTransformFeedback(); | |
953 return error::kNoError; | 1352 return error::kNoError; |
954 } | 1353 } |
955 | 1354 |
956 error::Error GLES2DecoderPassthroughImpl::DoSampleCoverage(GLclampf value, | 1355 error::Error GLES2DecoderPassthroughImpl::DoSampleCoverage(GLclampf value, |
957 GLboolean invert) { | 1356 GLboolean invert) { |
1357 glSampleCoverage(value, invert); | |
958 return error::kNoError; | 1358 return error::kNoError; |
959 } | 1359 } |
960 | 1360 |
961 error::Error GLES2DecoderPassthroughImpl::DoSamplerParameterf(GLuint sampler, | 1361 error::Error GLES2DecoderPassthroughImpl::DoSamplerParameterf(GLuint sampler, |
962 GLenum pname, | 1362 GLenum pname, |
963 GLfloat param) { | 1363 GLfloat param) { |
1364 glSamplerParameterf(resources_->sampler_id_map.GetServiceIDOrReserve(sampler), | |
1365 pname, param); | |
964 return error::kNoError; | 1366 return error::kNoError; |
965 } | 1367 } |
966 | 1368 |
967 error::Error GLES2DecoderPassthroughImpl::DoSamplerParameterfv( | 1369 error::Error GLES2DecoderPassthroughImpl::DoSamplerParameterfv( |
968 GLuint sampler, | 1370 GLuint sampler, |
969 GLenum pname, | 1371 GLenum pname, |
970 const volatile GLfloat* params) { | 1372 const volatile GLfloat* params) { |
1373 // TODO(geofflang): new-style setter, needs to make only one copy | |
1374 glSamplerParameterfv( | |
1375 resources_->sampler_id_map.GetServiceIDOrReserve(sampler), pname, | |
1376 const_cast<const GLfloat*>(params)); | |
971 return error::kNoError; | 1377 return error::kNoError; |
972 } | 1378 } |
973 | 1379 |
974 error::Error GLES2DecoderPassthroughImpl::DoSamplerParameteri(GLuint sampler, | 1380 error::Error GLES2DecoderPassthroughImpl::DoSamplerParameteri(GLuint sampler, |
975 GLenum pname, | 1381 GLenum pname, |
976 GLint param) { | 1382 GLint param) { |
1383 glSamplerParameteri(resources_->sampler_id_map.GetServiceIDOrReserve(sampler), | |
1384 pname, param); | |
977 return error::kNoError; | 1385 return error::kNoError; |
978 } | 1386 } |
979 | 1387 |
980 error::Error GLES2DecoderPassthroughImpl::DoSamplerParameteriv( | 1388 error::Error GLES2DecoderPassthroughImpl::DoSamplerParameteriv( |
981 GLuint sampler, | 1389 GLuint sampler, |
982 GLenum pname, | 1390 GLenum pname, |
983 const volatile GLint* params) { | 1391 const volatile GLint* params) { |
1392 // TODO(geofflang): new-style setter, needs to make only one copy | |
1393 glSamplerParameteriv( | |
1394 resources_->sampler_id_map.GetServiceIDOrReserve(sampler), pname, | |
1395 const_cast<const GLint*>(params)); | |
984 return error::kNoError; | 1396 return error::kNoError; |
985 } | 1397 } |
986 | 1398 |
987 error::Error GLES2DecoderPassthroughImpl::DoScissor(GLint x, | 1399 error::Error GLES2DecoderPassthroughImpl::DoScissor(GLint x, |
988 GLint y, | 1400 GLint y, |
989 GLsizei width, | 1401 GLsizei width, |
990 GLsizei height) { | 1402 GLsizei height) { |
991 glScissor(x, y, width, height); | 1403 glScissor(x, y, width, height); |
992 return error::kNoError; | 1404 return error::kNoError; |
993 } | 1405 } |
994 | 1406 |
995 error::Error GLES2DecoderPassthroughImpl::DoShaderBinary(GLsizei n, | 1407 error::Error GLES2DecoderPassthroughImpl::DoShaderBinary(GLsizei n, |
996 const GLuint* shaders, | 1408 const GLuint* shaders, |
997 GLenum binaryformat, | 1409 GLenum binaryformat, |
998 const void* binary, | 1410 const void* binary, |
999 GLsizei length) { | 1411 GLsizei length) { |
1412 NOTIMPLEMENTED(); | |
1000 return error::kNoError; | 1413 return error::kNoError; |
1001 } | 1414 } |
1002 | 1415 |
1003 error::Error GLES2DecoderPassthroughImpl::DoShaderSource(GLuint shader, | 1416 error::Error GLES2DecoderPassthroughImpl::DoShaderSource(GLuint shader, |
1004 GLsizei count, | 1417 GLsizei count, |
1005 const char** string, | 1418 const char** string, |
1006 const GLint* length) { | 1419 const GLint* length) { |
1420 glShaderSource(resources_->shader_id_map.GetServiceIDOrReserve(shader), count, | |
1421 string, length); | |
1007 return error::kNoError; | 1422 return error::kNoError; |
1008 } | 1423 } |
1009 | 1424 |
1010 error::Error GLES2DecoderPassthroughImpl::DoStencilFunc(GLenum func, | 1425 error::Error GLES2DecoderPassthroughImpl::DoStencilFunc(GLenum func, |
1011 GLint ref, | 1426 GLint ref, |
1012 GLuint mask) { | 1427 GLuint mask) { |
1428 glStencilFunc(func, ref, mask); | |
1013 return error::kNoError; | 1429 return error::kNoError; |
1014 } | 1430 } |
1015 | 1431 |
1016 error::Error GLES2DecoderPassthroughImpl::DoStencilFuncSeparate(GLenum face, | 1432 error::Error GLES2DecoderPassthroughImpl::DoStencilFuncSeparate(GLenum face, |
1017 GLenum func, | 1433 GLenum func, |
1018 GLint ref, | 1434 GLint ref, |
1019 GLuint mask) { | 1435 GLuint mask) { |
1436 glStencilFuncSeparate(face, func, ref, mask); | |
1020 return error::kNoError; | 1437 return error::kNoError; |
1021 } | 1438 } |
1022 | 1439 |
1023 error::Error GLES2DecoderPassthroughImpl::DoStencilMask(GLuint mask) { | 1440 error::Error GLES2DecoderPassthroughImpl::DoStencilMask(GLuint mask) { |
1441 glStencilMask(mask); | |
1024 return error::kNoError; | 1442 return error::kNoError; |
1025 } | 1443 } |
1026 | 1444 |
1027 error::Error GLES2DecoderPassthroughImpl::DoStencilMaskSeparate(GLenum face, | 1445 error::Error GLES2DecoderPassthroughImpl::DoStencilMaskSeparate(GLenum face, |
1028 GLuint mask) { | 1446 GLuint mask) { |
1447 glStencilMaskSeparate(face, mask); | |
1029 return error::kNoError; | 1448 return error::kNoError; |
1030 } | 1449 } |
1031 | 1450 |
1032 error::Error GLES2DecoderPassthroughImpl::DoStencilOp(GLenum fail, | 1451 error::Error GLES2DecoderPassthroughImpl::DoStencilOp(GLenum fail, |
1033 GLenum zfail, | 1452 GLenum zfail, |
1034 GLenum zpass) { | 1453 GLenum zpass) { |
1454 glStencilOp(fail, zfail, zpass); | |
1035 return error::kNoError; | 1455 return error::kNoError; |
1036 } | 1456 } |
1037 | 1457 |
1038 error::Error GLES2DecoderPassthroughImpl::DoStencilOpSeparate(GLenum face, | 1458 error::Error GLES2DecoderPassthroughImpl::DoStencilOpSeparate(GLenum face, |
1039 GLenum fail, | 1459 GLenum fail, |
1040 GLenum zfail, | 1460 GLenum zfail, |
1041 GLenum zpass) { | 1461 GLenum zpass) { |
1462 glStencilOpSeparate(face, fail, zfail, zpass); | |
1042 return error::kNoError; | 1463 return error::kNoError; |
1043 } | 1464 } |
1044 | 1465 |
1045 error::Error GLES2DecoderPassthroughImpl::DoTexImage2D(GLenum target, | 1466 error::Error GLES2DecoderPassthroughImpl::DoTexImage2D(GLenum target, |
1046 GLint level, | 1467 GLint level, |
1047 GLint internalformat, | 1468 GLint internalformat, |
1048 GLsizei width, | 1469 GLsizei width, |
1049 GLsizei height, | 1470 GLsizei height, |
1050 GLint border, | 1471 GLint border, |
1051 GLenum format, | 1472 GLenum format, |
1052 GLenum type, | 1473 GLenum type, |
1053 GLsizei imagesize, | 1474 GLsizei imagesize, |
1054 const void* pixels) { | 1475 const void* pixels) { |
1476 // TODO(geofflang): validate using imagesize | |
1477 glTexImage2D(target, level, internalformat, width, height, border, format, | |
1478 type, pixels); | |
1055 return error::kNoError; | 1479 return error::kNoError; |
1056 } | 1480 } |
1057 | 1481 |
1058 error::Error GLES2DecoderPassthroughImpl::DoTexImage3D(GLenum target, | 1482 error::Error GLES2DecoderPassthroughImpl::DoTexImage3D(GLenum target, |
1059 GLint level, | 1483 GLint level, |
1060 GLint internalformat, | 1484 GLint internalformat, |
1061 GLsizei width, | 1485 GLsizei width, |
1062 GLsizei height, | 1486 GLsizei height, |
1063 GLsizei depth, | 1487 GLsizei depth, |
1064 GLint border, | 1488 GLint border, |
1065 GLenum format, | 1489 GLenum format, |
1066 GLenum type, | 1490 GLenum type, |
1067 GLsizei imagesize, | 1491 GLsizei imagesize, |
1068 const void* pixels) { | 1492 const void* pixels) { |
1493 // TODO(geofflang): validate using imagesize | |
1494 glTexImage3D(target, level, internalformat, width, height, depth, border, | |
1495 format, type, pixels); | |
1069 return error::kNoError; | 1496 return error::kNoError; |
1070 } | 1497 } |
1071 | 1498 |
1072 error::Error GLES2DecoderPassthroughImpl::DoTexParameterf(GLenum target, | 1499 error::Error GLES2DecoderPassthroughImpl::DoTexParameterf(GLenum target, |
1073 GLenum pname, | 1500 GLenum pname, |
1074 GLfloat param) { | 1501 GLfloat param) { |
1502 glTexParameterf(target, pname, param); | |
1075 return error::kNoError; | 1503 return error::kNoError; |
1076 } | 1504 } |
1077 | 1505 |
1078 error::Error GLES2DecoderPassthroughImpl::DoTexParameterfv( | 1506 error::Error GLES2DecoderPassthroughImpl::DoTexParameterfv( |
1079 GLenum target, | 1507 GLenum target, |
1080 GLenum pname, | 1508 GLenum pname, |
1081 const volatile GLfloat* params) { | 1509 const volatile GLfloat* params) { |
1510 // TODO(geofflang): new-style setter, needs to make only one copy | |
1511 glTexParameterfv(target, pname, const_cast<const GLfloat*>(params)); | |
1082 return error::kNoError; | 1512 return error::kNoError; |
1083 } | 1513 } |
1084 | 1514 |
1085 error::Error GLES2DecoderPassthroughImpl::DoTexParameteri(GLenum target, | 1515 error::Error GLES2DecoderPassthroughImpl::DoTexParameteri(GLenum target, |
1086 GLenum pname, | 1516 GLenum pname, |
1087 GLint param) { | 1517 GLint param) { |
1088 glTexParameteri(target, pname, param); | 1518 glTexParameteri(target, pname, param); |
1089 return error::kNoError; | 1519 return error::kNoError; |
1090 } | 1520 } |
1091 | 1521 |
1092 error::Error GLES2DecoderPassthroughImpl::DoTexParameteriv( | 1522 error::Error GLES2DecoderPassthroughImpl::DoTexParameteriv( |
1093 GLenum target, | 1523 GLenum target, |
1094 GLenum pname, | 1524 GLenum pname, |
1095 const volatile GLint* params) { | 1525 const volatile GLint* params) { |
1526 // TODO(geofflang): new-style setter, needs to make only one copy | |
1527 glTexParameteriv(target, pname, const_cast<const GLint*>(params)); | |
1096 return error::kNoError; | 1528 return error::kNoError; |
1097 } | 1529 } |
1098 | 1530 |
1099 error::Error GLES2DecoderPassthroughImpl::DoTexStorage3D(GLenum target, | 1531 error::Error GLES2DecoderPassthroughImpl::DoTexStorage3D(GLenum target, |
1100 GLsizei levels, | 1532 GLsizei levels, |
1101 GLenum internalFormat, | 1533 GLenum internalFormat, |
1102 GLsizei width, | 1534 GLsizei width, |
1103 GLsizei height, | 1535 GLsizei height, |
1104 GLsizei depth) { | 1536 GLsizei depth) { |
1537 glTexStorage3D(target, levels, internalFormat, width, height, depth); | |
1105 return error::kNoError; | 1538 return error::kNoError; |
1106 } | 1539 } |
1107 | 1540 |
1108 error::Error GLES2DecoderPassthroughImpl::DoTexSubImage2D(GLenum target, | 1541 error::Error GLES2DecoderPassthroughImpl::DoTexSubImage2D(GLenum target, |
1109 GLint level, | 1542 GLint level, |
1110 GLint xoffset, | 1543 GLint xoffset, |
1111 GLint yoffset, | 1544 GLint yoffset, |
1112 GLsizei width, | 1545 GLsizei width, |
1113 GLsizei height, | 1546 GLsizei height, |
1114 GLenum format, | 1547 GLenum format, |
1115 GLenum type, | 1548 GLenum type, |
1116 GLsizei imagesize, | 1549 GLsizei imagesize, |
1117 const void* pixels) { | 1550 const void* pixels) { |
1551 // TODO(geofflang): validate using imagesize | |
1552 glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, | |
1553 pixels); | |
1118 return error::kNoError; | 1554 return error::kNoError; |
1119 } | 1555 } |
1120 | 1556 |
1121 error::Error GLES2DecoderPassthroughImpl::DoTexSubImage3D(GLenum target, | 1557 error::Error GLES2DecoderPassthroughImpl::DoTexSubImage3D(GLenum target, |
1122 GLint level, | 1558 GLint level, |
1123 GLint xoffset, | 1559 GLint xoffset, |
1124 GLint yoffset, | 1560 GLint yoffset, |
1125 GLint zoffset, | 1561 GLint zoffset, |
1126 GLsizei width, | 1562 GLsizei width, |
1127 GLsizei height, | 1563 GLsizei height, |
1128 GLsizei depth, | 1564 GLsizei depth, |
1129 GLenum format, | 1565 GLenum format, |
1130 GLenum type, | 1566 GLenum type, |
1131 GLsizei imagesize, | 1567 GLsizei imagesize, |
1132 const void* pixels) { | 1568 const void* pixels) { |
1569 // TODO(geofflang): validate using imagesize | |
1570 glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, | |
1571 depth, format, type, pixels); | |
1133 return error::kNoError; | 1572 return error::kNoError; |
1134 } | 1573 } |
1135 | 1574 |
1136 error::Error GLES2DecoderPassthroughImpl::DoTransformFeedbackVaryings( | 1575 error::Error GLES2DecoderPassthroughImpl::DoTransformFeedbackVaryings( |
1137 GLuint program, | 1576 GLuint program, |
1138 GLsizei count, | 1577 GLsizei count, |
1139 const char** varyings, | 1578 const char** varyings, |
1140 GLenum buffermode) { | 1579 GLenum buffermode) { |
1580 glTransformFeedbackVaryings( | |
1581 resources_->program_id_map.GetServiceIDOrReserve(program), count, | |
1582 varyings, buffermode); | |
1141 return error::kNoError; | 1583 return error::kNoError; |
1142 } | 1584 } |
1143 | 1585 |
1144 error::Error GLES2DecoderPassthroughImpl::DoUniform1f(GLint location, | 1586 error::Error GLES2DecoderPassthroughImpl::DoUniform1f(GLint location, |
1145 GLfloat x) { | 1587 GLfloat x) { |
1588 glUniform1f(location, x); | |
1146 return error::kNoError; | 1589 return error::kNoError; |
1147 } | 1590 } |
1148 | 1591 |
1149 error::Error GLES2DecoderPassthroughImpl::DoUniform1fv( | 1592 error::Error GLES2DecoderPassthroughImpl::DoUniform1fv( |
1150 GLint location, | 1593 GLint location, |
1151 GLsizei count, | 1594 GLsizei count, |
1152 const volatile GLfloat* v) { | 1595 const volatile GLfloat* v) { |
1596 glUniform1fv(location, count, const_cast<const GLfloat*>(v)); | |
1153 return error::kNoError; | 1597 return error::kNoError; |
1154 } | 1598 } |
1155 | 1599 |
1156 error::Error GLES2DecoderPassthroughImpl::DoUniform1i(GLint location, GLint x) { | 1600 error::Error GLES2DecoderPassthroughImpl::DoUniform1i(GLint location, GLint x) { |
1601 glUniform1i(location, x); | |
1157 return error::kNoError; | 1602 return error::kNoError; |
1158 } | 1603 } |
1159 | 1604 |
1160 error::Error GLES2DecoderPassthroughImpl::DoUniform1iv( | 1605 error::Error GLES2DecoderPassthroughImpl::DoUniform1iv( |
1161 GLint location, | 1606 GLint location, |
1162 GLsizei count, | 1607 GLsizei count, |
1163 const volatile GLint* v) { | 1608 const volatile GLint* v) { |
1609 glUniform1iv(location, count, const_cast<const GLint*>(v)); | |
1164 return error::kNoError; | 1610 return error::kNoError; |
1165 } | 1611 } |
1166 | 1612 |
1167 error::Error GLES2DecoderPassthroughImpl::DoUniform1ui(GLint location, | 1613 error::Error GLES2DecoderPassthroughImpl::DoUniform1ui(GLint location, |
1168 GLuint x) { | 1614 GLuint x) { |
1615 glUniform1ui(location, x); | |
1169 return error::kNoError; | 1616 return error::kNoError; |
1170 } | 1617 } |
1171 | 1618 |
1172 error::Error GLES2DecoderPassthroughImpl::DoUniform1uiv( | 1619 error::Error GLES2DecoderPassthroughImpl::DoUniform1uiv( |
1173 GLint location, | 1620 GLint location, |
1174 GLsizei count, | 1621 GLsizei count, |
1175 const volatile GLuint* v) { | 1622 const volatile GLuint* v) { |
1623 glUniform1uiv(location, count, const_cast<const GLuint*>(v)); | |
1176 return error::kNoError; | 1624 return error::kNoError; |
1177 } | 1625 } |
1178 | 1626 |
1179 error::Error GLES2DecoderPassthroughImpl::DoUniform2f(GLint location, | 1627 error::Error GLES2DecoderPassthroughImpl::DoUniform2f(GLint location, |
1180 GLfloat x, | 1628 GLfloat x, |
1181 GLfloat y) { | 1629 GLfloat y) { |
1630 glUniform2f(location, x, y); | |
1182 return error::kNoError; | 1631 return error::kNoError; |
1183 } | 1632 } |
1184 | 1633 |
1185 error::Error GLES2DecoderPassthroughImpl::DoUniform2fv( | 1634 error::Error GLES2DecoderPassthroughImpl::DoUniform2fv( |
1186 GLint location, | 1635 GLint location, |
1187 GLsizei count, | 1636 GLsizei count, |
1188 const volatile GLfloat* v) { | 1637 const volatile GLfloat* v) { |
1638 glUniform2fv(location, count, const_cast<const GLfloat*>(v)); | |
1189 return error::kNoError; | 1639 return error::kNoError; |
1190 } | 1640 } |
1191 | 1641 |
1192 error::Error GLES2DecoderPassthroughImpl::DoUniform2i(GLint location, | 1642 error::Error GLES2DecoderPassthroughImpl::DoUniform2i(GLint location, |
1193 GLint x, | 1643 GLint x, |
1194 GLint y) { | 1644 GLint y) { |
1645 glUniform2i(location, x, y); | |
1195 return error::kNoError; | 1646 return error::kNoError; |
1196 } | 1647 } |
1197 | 1648 |
1198 error::Error GLES2DecoderPassthroughImpl::DoUniform2iv( | 1649 error::Error GLES2DecoderPassthroughImpl::DoUniform2iv( |
1199 GLint location, | 1650 GLint location, |
1200 GLsizei count, | 1651 GLsizei count, |
1201 const volatile GLint* v) { | 1652 const volatile GLint* v) { |
1653 glUniform2iv(location, count, const_cast<const GLint*>(v)); | |
1202 return error::kNoError; | 1654 return error::kNoError; |
1203 } | 1655 } |
1204 | 1656 |
1205 error::Error GLES2DecoderPassthroughImpl::DoUniform2ui(GLint location, | 1657 error::Error GLES2DecoderPassthroughImpl::DoUniform2ui(GLint location, |
1206 GLuint x, | 1658 GLuint x, |
1207 GLuint y) { | 1659 GLuint y) { |
1660 glUniform2ui(location, x, y); | |
1208 return error::kNoError; | 1661 return error::kNoError; |
1209 } | 1662 } |
1210 | 1663 |
1211 error::Error GLES2DecoderPassthroughImpl::DoUniform2uiv( | 1664 error::Error GLES2DecoderPassthroughImpl::DoUniform2uiv( |
1212 GLint location, | 1665 GLint location, |
1213 GLsizei count, | 1666 GLsizei count, |
1214 const volatile GLuint* v) { | 1667 const volatile GLuint* v) { |
1668 glUniform2uiv(location, count, const_cast<const GLuint*>(v)); | |
1215 return error::kNoError; | 1669 return error::kNoError; |
1216 } | 1670 } |
1217 | 1671 |
1218 error::Error GLES2DecoderPassthroughImpl::DoUniform3f(GLint location, | 1672 error::Error GLES2DecoderPassthroughImpl::DoUniform3f(GLint location, |
1219 GLfloat x, | 1673 GLfloat x, |
1220 GLfloat y, | 1674 GLfloat y, |
1221 GLfloat z) { | 1675 GLfloat z) { |
1676 glUniform3f(location, x, y, z); | |
1222 return error::kNoError; | 1677 return error::kNoError; |
1223 } | 1678 } |
1224 | 1679 |
1225 error::Error GLES2DecoderPassthroughImpl::DoUniform3fv( | 1680 error::Error GLES2DecoderPassthroughImpl::DoUniform3fv( |
1226 GLint location, | 1681 GLint location, |
1227 GLsizei count, | 1682 GLsizei count, |
1228 const volatile GLfloat* v) { | 1683 const volatile GLfloat* v) { |
1684 glUniform3fv(location, count, const_cast<const GLfloat*>(v)); | |
1229 return error::kNoError; | 1685 return error::kNoError; |
1230 } | 1686 } |
1231 | 1687 |
1232 error::Error GLES2DecoderPassthroughImpl::DoUniform3i(GLint location, | 1688 error::Error GLES2DecoderPassthroughImpl::DoUniform3i(GLint location, |
1233 GLint x, | 1689 GLint x, |
1234 GLint y, | 1690 GLint y, |
1235 GLint z) { | 1691 GLint z) { |
1692 glUniform3i(location, x, y, z); | |
1236 return error::kNoError; | 1693 return error::kNoError; |
1237 } | 1694 } |
1238 | 1695 |
1239 error::Error GLES2DecoderPassthroughImpl::DoUniform3iv( | 1696 error::Error GLES2DecoderPassthroughImpl::DoUniform3iv( |
1240 GLint location, | 1697 GLint location, |
1241 GLsizei count, | 1698 GLsizei count, |
1242 const volatile GLint* v) { | 1699 const volatile GLint* v) { |
1700 glUniform3iv(location, count, const_cast<const GLint*>(v)); | |
1243 return error::kNoError; | 1701 return error::kNoError; |
1244 } | 1702 } |
1245 | 1703 |
1246 error::Error GLES2DecoderPassthroughImpl::DoUniform3ui(GLint location, | 1704 error::Error GLES2DecoderPassthroughImpl::DoUniform3ui(GLint location, |
1247 GLuint x, | 1705 GLuint x, |
1248 GLuint y, | 1706 GLuint y, |
1249 GLuint z) { | 1707 GLuint z) { |
1708 glUniform3ui(location, x, y, z); | |
1250 return error::kNoError; | 1709 return error::kNoError; |
1251 } | 1710 } |
1252 | 1711 |
1253 error::Error GLES2DecoderPassthroughImpl::DoUniform3uiv( | 1712 error::Error GLES2DecoderPassthroughImpl::DoUniform3uiv( |
1254 GLint location, | 1713 GLint location, |
1255 GLsizei count, | 1714 GLsizei count, |
1256 const volatile GLuint* v) { | 1715 const volatile GLuint* v) { |
1716 glUniform3uiv(location, count, const_cast<const GLuint*>(v)); | |
1257 return error::kNoError; | 1717 return error::kNoError; |
1258 } | 1718 } |
1259 | 1719 |
1260 error::Error GLES2DecoderPassthroughImpl::DoUniform4f(GLint location, | 1720 error::Error GLES2DecoderPassthroughImpl::DoUniform4f(GLint location, |
1261 GLfloat x, | 1721 GLfloat x, |
1262 GLfloat y, | 1722 GLfloat y, |
1263 GLfloat z, | 1723 GLfloat z, |
1264 GLfloat w) { | 1724 GLfloat w) { |
1725 glUniform4f(location, x, y, z, w); | |
1265 return error::kNoError; | 1726 return error::kNoError; |
1266 } | 1727 } |
1267 | 1728 |
1268 error::Error GLES2DecoderPassthroughImpl::DoUniform4fv( | 1729 error::Error GLES2DecoderPassthroughImpl::DoUniform4fv( |
1269 GLint location, | 1730 GLint location, |
1270 GLsizei count, | 1731 GLsizei count, |
1271 const volatile GLfloat* v) { | 1732 const volatile GLfloat* v) { |
1733 glUniform4fv(location, count, const_cast<const GLfloat*>(v)); | |
1272 return error::kNoError; | 1734 return error::kNoError; |
1273 } | 1735 } |
1274 | 1736 |
1275 error::Error GLES2DecoderPassthroughImpl::DoUniform4i(GLint location, | 1737 error::Error GLES2DecoderPassthroughImpl::DoUniform4i(GLint location, |
1276 GLint x, | 1738 GLint x, |
1277 GLint y, | 1739 GLint y, |
1278 GLint z, | 1740 GLint z, |
1279 GLint w) { | 1741 GLint w) { |
1742 glUniform4i(location, x, y, z, w); | |
1280 return error::kNoError; | 1743 return error::kNoError; |
1281 } | 1744 } |
1282 | 1745 |
1283 error::Error GLES2DecoderPassthroughImpl::DoUniform4iv( | 1746 error::Error GLES2DecoderPassthroughImpl::DoUniform4iv( |
1284 GLint location, | 1747 GLint location, |
1285 GLsizei count, | 1748 GLsizei count, |
1286 const volatile GLint* v) { | 1749 const volatile GLint* v) { |
1750 glUniform4iv(location, count, const_cast<const GLint*>(v)); | |
1287 return error::kNoError; | 1751 return error::kNoError; |
1288 } | 1752 } |
1289 | 1753 |
1290 error::Error GLES2DecoderPassthroughImpl::DoUniform4ui(GLint location, | 1754 error::Error GLES2DecoderPassthroughImpl::DoUniform4ui(GLint location, |
1291 GLuint x, | 1755 GLuint x, |
1292 GLuint y, | 1756 GLuint y, |
1293 GLuint z, | 1757 GLuint z, |
1294 GLuint w) { | 1758 GLuint w) { |
1759 glUniform4ui(location, x, y, z, w); | |
1295 return error::kNoError; | 1760 return error::kNoError; |
1296 } | 1761 } |
1297 | 1762 |
1298 error::Error GLES2DecoderPassthroughImpl::DoUniform4uiv( | 1763 error::Error GLES2DecoderPassthroughImpl::DoUniform4uiv( |
1299 GLint location, | 1764 GLint location, |
1300 GLsizei count, | 1765 GLsizei count, |
1301 const volatile GLuint* v) { | 1766 const volatile GLuint* v) { |
1767 glUniform4uiv(location, count, const_cast<const GLuint*>(v)); | |
1302 return error::kNoError; | 1768 return error::kNoError; |
1303 } | 1769 } |
1304 | 1770 |
1305 error::Error GLES2DecoderPassthroughImpl::DoUniformBlockBinding( | 1771 error::Error GLES2DecoderPassthroughImpl::DoUniformBlockBinding( |
1306 GLuint program, | 1772 GLuint program, |
1307 GLuint index, | 1773 GLuint index, |
1308 GLuint binding) { | 1774 GLuint binding) { |
1775 glUniformBlockBinding( | |
1776 resources_->program_id_map.GetServiceIDOrReserve(program), index, | |
1777 binding); | |
1309 return error::kNoError; | 1778 return error::kNoError; |
1310 } | 1779 } |
1311 | 1780 |
1312 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix2fv( | 1781 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix2fv( |
1313 GLint location, | 1782 GLint location, |
1314 GLsizei count, | 1783 GLsizei count, |
1315 GLboolean transpose, | 1784 GLboolean transpose, |
1316 const volatile GLfloat* value) { | 1785 const volatile GLfloat* value) { |
1786 glUniformMatrix2fv(location, count, transpose, | |
1787 const_cast<const GLfloat*>(value)); | |
1317 return error::kNoError; | 1788 return error::kNoError; |
1318 } | 1789 } |
1319 | 1790 |
1320 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix2x3fv( | 1791 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix2x3fv( |
1321 GLint location, | 1792 GLint location, |
1322 GLsizei count, | 1793 GLsizei count, |
1323 GLboolean transpose, | 1794 GLboolean transpose, |
1324 const volatile GLfloat* value) { | 1795 const volatile GLfloat* value) { |
1796 glUniformMatrix2x3fv(location, count, transpose, | |
1797 const_cast<const GLfloat*>(value)); | |
1325 return error::kNoError; | 1798 return error::kNoError; |
1326 } | 1799 } |
1327 | 1800 |
1328 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix2x4fv( | 1801 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix2x4fv( |
1329 GLint location, | 1802 GLint location, |
1330 GLsizei count, | 1803 GLsizei count, |
1331 GLboolean transpose, | 1804 GLboolean transpose, |
1332 const volatile GLfloat* value) { | 1805 const volatile GLfloat* value) { |
1806 glUniformMatrix2x4fv(location, count, transpose, | |
1807 const_cast<const GLfloat*>(value)); | |
1333 return error::kNoError; | 1808 return error::kNoError; |
1334 } | 1809 } |
1335 | 1810 |
1336 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix3fv( | 1811 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix3fv( |
1337 GLint location, | 1812 GLint location, |
1338 GLsizei count, | 1813 GLsizei count, |
1339 GLboolean transpose, | 1814 GLboolean transpose, |
1340 const volatile GLfloat* value) { | 1815 const volatile GLfloat* value) { |
1816 glUniformMatrix3fv(location, count, transpose, | |
1817 const_cast<const GLfloat*>(value)); | |
1341 return error::kNoError; | 1818 return error::kNoError; |
1342 } | 1819 } |
1343 | 1820 |
1344 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix3x2fv( | 1821 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix3x2fv( |
1345 GLint location, | 1822 GLint location, |
1346 GLsizei count, | 1823 GLsizei count, |
1347 GLboolean transpose, | 1824 GLboolean transpose, |
1348 const volatile GLfloat* value) { | 1825 const volatile GLfloat* value) { |
1826 glUniformMatrix3x2fv(location, count, transpose, | |
1827 const_cast<const GLfloat*>(value)); | |
1349 return error::kNoError; | 1828 return error::kNoError; |
1350 } | 1829 } |
1351 | 1830 |
1352 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix3x4fv( | 1831 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix3x4fv( |
1353 GLint location, | 1832 GLint location, |
1354 GLsizei count, | 1833 GLsizei count, |
1355 GLboolean transpose, | 1834 GLboolean transpose, |
1356 const volatile GLfloat* value) { | 1835 const volatile GLfloat* value) { |
1836 glUniformMatrix3x4fv(location, count, transpose, | |
1837 const_cast<const GLfloat*>(value)); | |
1357 return error::kNoError; | 1838 return error::kNoError; |
1358 } | 1839 } |
1359 | 1840 |
1360 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix4fv( | 1841 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix4fv( |
1361 GLint location, | 1842 GLint location, |
1362 GLsizei count, | 1843 GLsizei count, |
1363 GLboolean transpose, | 1844 GLboolean transpose, |
1364 const volatile GLfloat* value) { | 1845 const volatile GLfloat* value) { |
1846 glUniformMatrix4fv(location, count, transpose, | |
1847 const_cast<const GLfloat*>(value)); | |
1365 return error::kNoError; | 1848 return error::kNoError; |
1366 } | 1849 } |
1367 | 1850 |
1368 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix4x2fv( | 1851 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix4x2fv( |
1369 GLint location, | 1852 GLint location, |
1370 GLsizei count, | 1853 GLsizei count, |
1371 GLboolean transpose, | 1854 GLboolean transpose, |
1372 const volatile GLfloat* value) { | 1855 const volatile GLfloat* value) { |
1856 glUniformMatrix4x2fv(location, count, transpose, | |
1857 const_cast<const GLfloat*>(value)); | |
1373 return error::kNoError; | 1858 return error::kNoError; |
1374 } | 1859 } |
1375 | 1860 |
1376 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix4x3fv( | 1861 error::Error GLES2DecoderPassthroughImpl::DoUniformMatrix4x3fv( |
1377 GLint location, | 1862 GLint location, |
1378 GLsizei count, | 1863 GLsizei count, |
1379 GLboolean transpose, | 1864 GLboolean transpose, |
1380 const volatile GLfloat* value) { | 1865 const volatile GLfloat* value) { |
1866 glUniformMatrix4x3fv(location, count, transpose, | |
1867 const_cast<const GLfloat*>(value)); | |
1381 return error::kNoError; | 1868 return error::kNoError; |
1382 } | 1869 } |
1383 | 1870 |
1384 error::Error GLES2DecoderPassthroughImpl::DoUseProgram(GLuint program) { | 1871 error::Error GLES2DecoderPassthroughImpl::DoUseProgram(GLuint program) { |
1872 glUseProgram(resources_->program_id_map.GetServiceIDOrReserve(program)); | |
1385 return error::kNoError; | 1873 return error::kNoError; |
1386 } | 1874 } |
1387 | 1875 |
1388 error::Error GLES2DecoderPassthroughImpl::DoValidateProgram(GLuint program) { | 1876 error::Error GLES2DecoderPassthroughImpl::DoValidateProgram(GLuint program) { |
1877 glValidateProgram(resources_->program_id_map.GetServiceIDOrReserve(program)); | |
1389 return error::kNoError; | 1878 return error::kNoError; |
1390 } | 1879 } |
1391 | 1880 |
1392 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib1f(GLuint indx, | 1881 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib1f(GLuint indx, |
1393 GLfloat x) { | 1882 GLfloat x) { |
1883 glVertexAttrib1f(indx, x); | |
1394 return error::kNoError; | 1884 return error::kNoError; |
1395 } | 1885 } |
1396 | 1886 |
1397 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib1fv( | 1887 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib1fv( |
1398 GLuint indx, | 1888 GLuint indx, |
1399 const volatile GLfloat* values) { | 1889 const volatile GLfloat* values) { |
1890 glVertexAttrib1fv(indx, const_cast<const GLfloat*>(values)); | |
1400 return error::kNoError; | 1891 return error::kNoError; |
1401 } | 1892 } |
1402 | 1893 |
1403 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib2f(GLuint indx, | 1894 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib2f(GLuint indx, |
1404 GLfloat x, | 1895 GLfloat x, |
1405 GLfloat y) { | 1896 GLfloat y) { |
1897 glVertexAttrib2f(indx, x, y); | |
1406 return error::kNoError; | 1898 return error::kNoError; |
1407 } | 1899 } |
1408 | 1900 |
1409 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib2fv( | 1901 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib2fv( |
1410 GLuint indx, | 1902 GLuint indx, |
1411 const volatile GLfloat* values) { | 1903 const volatile GLfloat* values) { |
1904 glVertexAttrib2fv(indx, const_cast<const GLfloat*>(values)); | |
1412 return error::kNoError; | 1905 return error::kNoError; |
1413 } | 1906 } |
1414 | 1907 |
1415 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib3f(GLuint indx, | 1908 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib3f(GLuint indx, |
1416 GLfloat x, | 1909 GLfloat x, |
1417 GLfloat y, | 1910 GLfloat y, |
1418 GLfloat z) { | 1911 GLfloat z) { |
1912 glVertexAttrib3f(indx, x, y, z); | |
1419 return error::kNoError; | 1913 return error::kNoError; |
1420 } | 1914 } |
1421 | 1915 |
1422 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib3fv( | 1916 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib3fv( |
1423 GLuint indx, | 1917 GLuint indx, |
1424 const volatile GLfloat* values) { | 1918 const volatile GLfloat* values) { |
1919 glVertexAttrib3fv(indx, const_cast<const GLfloat*>(values)); | |
1425 return error::kNoError; | 1920 return error::kNoError; |
1426 } | 1921 } |
1427 | 1922 |
1428 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib4f(GLuint indx, | 1923 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib4f(GLuint indx, |
1429 GLfloat x, | 1924 GLfloat x, |
1430 GLfloat y, | 1925 GLfloat y, |
1431 GLfloat z, | 1926 GLfloat z, |
1432 GLfloat w) { | 1927 GLfloat w) { |
1928 glVertexAttrib4f(indx, x, y, z, w); | |
1433 return error::kNoError; | 1929 return error::kNoError; |
1434 } | 1930 } |
1435 | 1931 |
1436 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib4fv( | 1932 error::Error GLES2DecoderPassthroughImpl::DoVertexAttrib4fv( |
1437 GLuint indx, | 1933 GLuint indx, |
1438 const volatile GLfloat* values) { | 1934 const volatile GLfloat* values) { |
1935 glVertexAttrib4fv(indx, const_cast<const GLfloat*>(values)); | |
1439 return error::kNoError; | 1936 return error::kNoError; |
1440 } | 1937 } |
1441 | 1938 |
1442 error::Error GLES2DecoderPassthroughImpl::DoVertexAttribI4i(GLuint indx, | 1939 error::Error GLES2DecoderPassthroughImpl::DoVertexAttribI4i(GLuint indx, |
1443 GLint x, | 1940 GLint x, |
1444 GLint y, | 1941 GLint y, |
1445 GLint z, | 1942 GLint z, |
1446 GLint w) { | 1943 GLint w) { |
1944 glVertexAttribI4i(indx, x, y, z, w); | |
1447 return error::kNoError; | 1945 return error::kNoError; |
1448 } | 1946 } |
1449 | 1947 |
1450 error::Error GLES2DecoderPassthroughImpl::DoVertexAttribI4iv( | 1948 error::Error GLES2DecoderPassthroughImpl::DoVertexAttribI4iv( |
1451 GLuint indx, | 1949 GLuint indx, |
1452 const volatile GLint* values) { | 1950 const volatile GLint* values) { |
1951 glVertexAttribI4iv(indx, const_cast<const GLint*>(values)); | |
1453 return error::kNoError; | 1952 return error::kNoError; |
1454 } | 1953 } |
1455 | 1954 |
1456 error::Error GLES2DecoderPassthroughImpl::DoVertexAttribI4ui(GLuint indx, | 1955 error::Error GLES2DecoderPassthroughImpl::DoVertexAttribI4ui(GLuint indx, |
1457 GLuint x, | 1956 GLuint x, |
1458 GLuint y, | 1957 GLuint y, |
1459 GLuint z, | 1958 GLuint z, |
1460 GLuint w) { | 1959 GLuint w) { |
1960 glVertexAttribI4ui(indx, x, y, z, w); | |
1461 return error::kNoError; | 1961 return error::kNoError; |
1462 } | 1962 } |
1463 | 1963 |
1464 error::Error GLES2DecoderPassthroughImpl::DoVertexAttribI4uiv( | 1964 error::Error GLES2DecoderPassthroughImpl::DoVertexAttribI4uiv( |
1465 GLuint indx, | 1965 GLuint indx, |
1466 const volatile GLuint* values) { | 1966 const volatile GLuint* values) { |
1967 glVertexAttribI4uiv(indx, const_cast<const GLuint*>(values)); | |
1467 return error::kNoError; | 1968 return error::kNoError; |
1468 } | 1969 } |
1469 | 1970 |
1470 error::Error GLES2DecoderPassthroughImpl::DoVertexAttribIPointer( | 1971 error::Error GLES2DecoderPassthroughImpl::DoVertexAttribIPointer( |
1471 GLuint indx, | 1972 GLuint indx, |
1472 GLint size, | 1973 GLint size, |
1473 GLenum type, | 1974 GLenum type, |
1474 GLsizei stride, | 1975 GLsizei stride, |
1475 const void* ptr) { | 1976 const void* ptr) { |
1977 glVertexAttribIPointer(indx, size, type, stride, ptr); | |
1476 return error::kNoError; | 1978 return error::kNoError; |
1477 } | 1979 } |
1478 | 1980 |
1479 error::Error GLES2DecoderPassthroughImpl::DoVertexAttribPointer( | 1981 error::Error GLES2DecoderPassthroughImpl::DoVertexAttribPointer( |
1480 GLuint indx, | 1982 GLuint indx, |
1481 GLint size, | 1983 GLint size, |
1482 GLenum type, | 1984 GLenum type, |
1483 GLboolean normalized, | 1985 GLboolean normalized, |
1484 GLsizei stride, | 1986 GLsizei stride, |
1485 const void* ptr) { | 1987 const void* ptr) { |
1988 glVertexAttribPointer(indx, size, type, normalized, stride, ptr); | |
1486 return error::kNoError; | 1989 return error::kNoError; |
1487 } | 1990 } |
1488 | 1991 |
1489 error::Error GLES2DecoderPassthroughImpl::DoViewport(GLint x, | 1992 error::Error GLES2DecoderPassthroughImpl::DoViewport(GLint x, |
1490 GLint y, | 1993 GLint y, |
1491 GLsizei width, | 1994 GLsizei width, |
1492 GLsizei height) { | 1995 GLsizei height) { |
1996 glViewport(x, y, width, height); | |
1493 return error::kNoError; | 1997 return error::kNoError; |
1494 } | 1998 } |
1495 | 1999 |
1496 error::Error GLES2DecoderPassthroughImpl::DoWaitSync(GLuint sync, | 2000 error::Error GLES2DecoderPassthroughImpl::DoWaitSync(GLuint sync, |
1497 GLbitfield flags, | 2001 GLbitfield flags, |
1498 GLuint64 timeout) { | 2002 GLuint64 timeout) { |
2003 NOTIMPLEMENTED(); | |
1499 return error::kNoError; | 2004 return error::kNoError; |
1500 } | 2005 } |
1501 | 2006 |
1502 error::Error GLES2DecoderPassthroughImpl::DoBlitFramebufferCHROMIUM( | 2007 error::Error GLES2DecoderPassthroughImpl::DoBlitFramebufferCHROMIUM( |
1503 GLint srcX0, | 2008 GLint srcX0, |
1504 GLint srcY0, | 2009 GLint srcY0, |
1505 GLint srcX1, | 2010 GLint srcX1, |
1506 GLint srcY1, | 2011 GLint srcY1, |
1507 GLint dstX0, | 2012 GLint dstX0, |
1508 GLint dstY0, | 2013 GLint dstY0, |
1509 GLint dstX1, | 2014 GLint dstX1, |
1510 GLint dstY1, | 2015 GLint dstY1, |
1511 GLbitfield mask, | 2016 GLbitfield mask, |
1512 GLenum filter) { | 2017 GLenum filter) { |
2018 glBlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, | |
2019 mask, filter); | |
1513 return error::kNoError; | 2020 return error::kNoError; |
1514 } | 2021 } |
1515 | 2022 |
1516 error::Error | 2023 error::Error |
1517 GLES2DecoderPassthroughImpl::DoRenderbufferStorageMultisampleCHROMIUM( | 2024 GLES2DecoderPassthroughImpl::DoRenderbufferStorageMultisampleCHROMIUM( |
1518 GLenum target, | 2025 GLenum target, |
1519 GLsizei samples, | 2026 GLsizei samples, |
1520 GLenum internalformat, | 2027 GLenum internalformat, |
1521 GLsizei width, | 2028 GLsizei width, |
1522 GLsizei height) { | 2029 GLsizei height) { |
2030 glRenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, | |
2031 height); | |
1523 return error::kNoError; | 2032 return error::kNoError; |
1524 } | 2033 } |
1525 | 2034 |
1526 error::Error GLES2DecoderPassthroughImpl::DoRenderbufferStorageMultisampleEXT( | 2035 error::Error GLES2DecoderPassthroughImpl::DoRenderbufferStorageMultisampleEXT( |
1527 GLenum target, | 2036 GLenum target, |
1528 GLsizei samples, | 2037 GLsizei samples, |
1529 GLenum internalformat, | 2038 GLenum internalformat, |
1530 GLsizei width, | 2039 GLsizei width, |
1531 GLsizei height) { | 2040 GLsizei height) { |
2041 glRenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, | |
2042 height); | |
1532 return error::kNoError; | 2043 return error::kNoError; |
1533 } | 2044 } |
1534 | 2045 |
1535 error::Error GLES2DecoderPassthroughImpl::DoFramebufferTexture2DMultisampleEXT( | 2046 error::Error GLES2DecoderPassthroughImpl::DoFramebufferTexture2DMultisampleEXT( |
1536 GLenum target, | 2047 GLenum target, |
1537 GLenum attachment, | 2048 GLenum attachment, |
1538 GLenum textarget, | 2049 GLenum textarget, |
1539 GLuint texture, | 2050 GLuint texture, |
1540 GLint level, | 2051 GLint level, |
1541 GLsizei samples) { | 2052 GLsizei samples) { |
2053 NOTIMPLEMENTED(); | |
1542 return error::kNoError; | 2054 return error::kNoError; |
1543 } | 2055 } |
1544 | 2056 |
1545 error::Error GLES2DecoderPassthroughImpl::DoTexStorage2DEXT( | 2057 error::Error GLES2DecoderPassthroughImpl::DoTexStorage2DEXT( |
1546 GLenum target, | 2058 GLenum target, |
1547 GLsizei levels, | 2059 GLsizei levels, |
1548 GLenum internalFormat, | 2060 GLenum internalFormat, |
1549 GLsizei width, | 2061 GLsizei width, |
1550 GLsizei height) { | 2062 GLsizei height) { |
1551 glTexStorage2DEXT(target, levels, internalFormat, width, height); | 2063 glTexStorage2DEXT(target, levels, internalFormat, width, height); |
1552 return error::kNoError; | 2064 return error::kNoError; |
1553 } | 2065 } |
1554 | 2066 |
1555 error::Error GLES2DecoderPassthroughImpl::DoGenQueriesEXT( | 2067 error::Error GLES2DecoderPassthroughImpl::DoGenQueriesEXT( |
1556 GLsizei n, | 2068 GLsizei n, |
1557 volatile GLuint* queries) { | 2069 volatile GLuint* queries) { |
1558 return error::kNoError; | 2070 return GenHelper(n, queries, &query_id_map_, [](GLsizei n, GLuint* queries) { |
2071 glGenQueries(n, queries); | |
2072 }); | |
1559 } | 2073 } |
1560 | 2074 |
1561 error::Error GLES2DecoderPassthroughImpl::DoDeleteQueriesEXT( | 2075 error::Error GLES2DecoderPassthroughImpl::DoDeleteQueriesEXT( |
1562 GLsizei n, | 2076 GLsizei n, |
1563 const volatile GLuint* queries) { | 2077 const volatile GLuint* queries) { |
1564 return error::kNoError; | 2078 return DeleteHelper( |
2079 n, queries, &query_id_map_, | |
2080 [](GLsizei n, GLuint* queries) { glDeleteQueries(n, queries); }); | |
1565 } | 2081 } |
1566 | 2082 |
1567 error::Error GLES2DecoderPassthroughImpl::DoQueryCounterEXT(GLuint id, | 2083 error::Error GLES2DecoderPassthroughImpl::DoQueryCounterEXT(GLuint id, |
1568 GLenum target) { | 2084 GLenum target) { |
2085 glQueryCounter(query_id_map_.GetServiceIDOrReserve(id), target); | |
1569 return error::kNoError; | 2086 return error::kNoError; |
1570 } | 2087 } |
1571 | 2088 |
1572 error::Error GLES2DecoderPassthroughImpl::DoBeginQueryEXT(GLenum target, | 2089 error::Error GLES2DecoderPassthroughImpl::DoBeginQueryEXT(GLenum target, |
1573 GLuint id) { | 2090 GLuint id) { |
2091 // TODO(geofflang): Track active queries | |
2092 glBeginQuery(target, query_id_map_.GetServiceIDOrReserve(id)); | |
1574 return error::kNoError; | 2093 return error::kNoError; |
1575 } | 2094 } |
1576 | 2095 |
1577 error::Error GLES2DecoderPassthroughImpl::DoBeginTransformFeedback( | 2096 error::Error GLES2DecoderPassthroughImpl::DoBeginTransformFeedback( |
1578 GLenum primitivemode) { | 2097 GLenum primitivemode) { |
2098 glBeginTransformFeedback(primitivemode); | |
1579 return error::kNoError; | 2099 return error::kNoError; |
1580 } | 2100 } |
1581 | 2101 |
1582 error::Error GLES2DecoderPassthroughImpl::DoEndQueryEXT(GLenum target) { | 2102 error::Error GLES2DecoderPassthroughImpl::DoEndQueryEXT(GLenum target) { |
2103 // TODO(geofflang): Track active queries | |
2104 glEndQuery(target); | |
1583 return error::kNoError; | 2105 return error::kNoError; |
1584 } | 2106 } |
1585 | 2107 |
1586 error::Error GLES2DecoderPassthroughImpl::DoEndTransformFeedback() { | 2108 error::Error GLES2DecoderPassthroughImpl::DoEndTransformFeedback() { |
2109 glEndTransformFeedback(); | |
1587 return error::kNoError; | 2110 return error::kNoError; |
1588 } | 2111 } |
1589 | 2112 |
1590 error::Error GLES2DecoderPassthroughImpl::DoSetDisjointValueSyncCHROMIUM( | 2113 error::Error GLES2DecoderPassthroughImpl::DoSetDisjointValueSyncCHROMIUM( |
1591 DisjointValueSync* sync) { | 2114 DisjointValueSync* sync) { |
2115 NOTIMPLEMENTED(); | |
1592 return error::kNoError; | 2116 return error::kNoError; |
1593 } | 2117 } |
1594 | 2118 |
1595 error::Error GLES2DecoderPassthroughImpl::DoInsertEventMarkerEXT( | 2119 error::Error GLES2DecoderPassthroughImpl::DoInsertEventMarkerEXT( |
1596 GLsizei length, | 2120 GLsizei length, |
1597 const char* marker) { | 2121 const char* marker) { |
2122 NOTIMPLEMENTED(); | |
1598 return error::kNoError; | 2123 return error::kNoError; |
1599 } | 2124 } |
1600 | 2125 |
1601 error::Error GLES2DecoderPassthroughImpl::DoPushGroupMarkerEXT( | 2126 error::Error GLES2DecoderPassthroughImpl::DoPushGroupMarkerEXT( |
1602 GLsizei length, | 2127 GLsizei length, |
1603 const char* marker) { | 2128 const char* marker) { |
2129 NOTIMPLEMENTED(); | |
1604 return error::kNoError; | 2130 return error::kNoError; |
1605 } | 2131 } |
1606 | 2132 |
1607 error::Error GLES2DecoderPassthroughImpl::DoPopGroupMarkerEXT() { | 2133 error::Error GLES2DecoderPassthroughImpl::DoPopGroupMarkerEXT() { |
2134 NOTIMPLEMENTED(); | |
1608 return error::kNoError; | 2135 return error::kNoError; |
1609 } | 2136 } |
1610 | 2137 |
1611 error::Error GLES2DecoderPassthroughImpl::DoGenVertexArraysOES( | 2138 error::Error GLES2DecoderPassthroughImpl::DoGenVertexArraysOES( |
1612 GLsizei n, | 2139 GLsizei n, |
1613 volatile GLuint* arrays) { | 2140 volatile GLuint* arrays) { |
1614 return error::kNoError; | 2141 return GenHelper( |
2142 n, arrays, &vertex_array_id_map_, | |
2143 [](GLsizei n, GLuint* arrays) { glGenVertexArraysOES(n, arrays); }); | |
1615 } | 2144 } |
1616 | 2145 |
1617 error::Error GLES2DecoderPassthroughImpl::DoDeleteVertexArraysOES( | 2146 error::Error GLES2DecoderPassthroughImpl::DoDeleteVertexArraysOES( |
1618 GLsizei n, | 2147 GLsizei n, |
1619 const volatile GLuint* arrays) { | 2148 const volatile GLuint* arrays) { |
1620 return error::kNoError; | 2149 return DeleteHelper( |
2150 n, arrays, &vertex_array_id_map_, | |
2151 [](GLsizei n, GLuint* arrays) { glDeleteVertexArraysOES(n, arrays); }); | |
1621 } | 2152 } |
1622 | 2153 |
1623 error::Error GLES2DecoderPassthroughImpl::DoIsVertexArrayOES(GLuint array, | 2154 error::Error GLES2DecoderPassthroughImpl::DoIsVertexArrayOES(GLuint array, |
1624 uint32_t* result) { | 2155 uint32_t* result) { |
2156 *result = | |
2157 glIsVertexArrayOES(vertex_array_id_map_.GetServiceIDOrReserve(array)); | |
1625 return error::kNoError; | 2158 return error::kNoError; |
1626 } | 2159 } |
1627 | 2160 |
1628 error::Error GLES2DecoderPassthroughImpl::DoBindVertexArrayOES(GLuint array) { | 2161 error::Error GLES2DecoderPassthroughImpl::DoBindVertexArrayOES(GLuint array) { |
2162 glBindVertexArrayOES(vertex_array_id_map_.GetServiceIDOrReserve(array)); | |
1629 return error::kNoError; | 2163 return error::kNoError; |
1630 } | 2164 } |
1631 | 2165 |
1632 error::Error GLES2DecoderPassthroughImpl::DoSwapBuffers() { | 2166 error::Error GLES2DecoderPassthroughImpl::DoSwapBuffers() { |
2167 gfx::SwapResult result = surface_->SwapBuffers(); | |
2168 if (result == gfx::SwapResult::SWAP_FAILED) { | |
2169 LOG(ERROR) << "Context lost because SwapBuffers failed."; | |
2170 } | |
2171 // TODO(geofflang): force the context loss? | |
1633 return error::kNoError; | 2172 return error::kNoError; |
1634 } | 2173 } |
1635 | 2174 |
1636 error::Error GLES2DecoderPassthroughImpl::DoGetMaxValueInBufferCHROMIUM( | 2175 error::Error GLES2DecoderPassthroughImpl::DoGetMaxValueInBufferCHROMIUM( |
1637 GLuint buffer_id, | 2176 GLuint buffer_id, |
1638 GLsizei count, | 2177 GLsizei count, |
1639 GLenum type, | 2178 GLenum type, |
1640 GLuint offset, | 2179 GLuint offset, |
1641 uint32_t* result) { | 2180 uint32_t* result) { |
2181 NOTIMPLEMENTED(); | |
1642 return error::kNoError; | 2182 return error::kNoError; |
1643 } | 2183 } |
1644 | 2184 |
1645 error::Error GLES2DecoderPassthroughImpl::DoEnableFeatureCHROMIUM( | 2185 error::Error GLES2DecoderPassthroughImpl::DoEnableFeatureCHROMIUM( |
1646 const char* feature) { | 2186 const char* feature) { |
2187 NOTIMPLEMENTED(); | |
1647 return error::kNoError; | 2188 return error::kNoError; |
1648 } | 2189 } |
1649 | 2190 |
1650 error::Error GLES2DecoderPassthroughImpl::DoMapBufferRange(GLenum target, | 2191 error::Error GLES2DecoderPassthroughImpl::DoMapBufferRange(GLenum target, |
1651 GLintptr offset, | 2192 GLintptr offset, |
1652 GLsizeiptr size, | 2193 GLsizeiptr size, |
1653 GLbitfield access, | 2194 GLbitfield access, |
1654 void** ptr) { | 2195 void** ptr) { |
2196 NOTIMPLEMENTED(); | |
1655 return error::kNoError; | 2197 return error::kNoError; |
1656 } | 2198 } |
1657 | 2199 |
1658 error::Error GLES2DecoderPassthroughImpl::DoUnmapBuffer(GLenum target) { | 2200 error::Error GLES2DecoderPassthroughImpl::DoUnmapBuffer(GLenum target) { |
2201 NOTIMPLEMENTED(); | |
1659 return error::kNoError; | 2202 return error::kNoError; |
1660 } | 2203 } |
1661 | 2204 |
1662 error::Error GLES2DecoderPassthroughImpl::DoResizeCHROMIUM(GLuint width, | 2205 error::Error GLES2DecoderPassthroughImpl::DoResizeCHROMIUM(GLuint width, |
1663 GLuint height, | 2206 GLuint height, |
1664 GLfloat scale_factor, | 2207 GLfloat scale_factor, |
1665 GLboolean alpha) { | 2208 GLboolean alpha) { |
2209 NOTIMPLEMENTED(); | |
1666 return error::kNoError; | 2210 return error::kNoError; |
1667 } | 2211 } |
1668 | 2212 |
1669 error::Error GLES2DecoderPassthroughImpl::DoGetRequestableExtensionsCHROMIUM( | 2213 error::Error GLES2DecoderPassthroughImpl::DoGetRequestableExtensionsCHROMIUM( |
1670 const char** extensions) { | 2214 const char** extensions) { |
2215 *extensions = ""; | |
2216 NOTIMPLEMENTED(); | |
1671 return error::kNoError; | 2217 return error::kNoError; |
1672 } | 2218 } |
1673 | 2219 |
1674 error::Error GLES2DecoderPassthroughImpl::DoRequestExtensionCHROMIUM( | 2220 error::Error GLES2DecoderPassthroughImpl::DoRequestExtensionCHROMIUM( |
1675 const char* extension) { | 2221 const char* extension) { |
2222 NOTIMPLEMENTED(); | |
1676 return error::kNoError; | 2223 return error::kNoError; |
1677 } | 2224 } |
1678 | 2225 |
1679 error::Error GLES2DecoderPassthroughImpl::DoGetProgramInfoCHROMIUM( | 2226 error::Error GLES2DecoderPassthroughImpl::DoGetProgramInfoCHROMIUM( |
1680 GLuint program, | 2227 GLuint program, |
1681 std::vector<uint8_t>* data) { | 2228 std::vector<uint8_t>* data) { |
2229 GLuint service_program = 0; | |
2230 if (!resources_->program_id_map.GetServiceID(program, &service_program)) { | |
2231 return error::kNoError; | |
2232 } | |
2233 | |
2234 GLint num_attributes = 0; | |
2235 glGetProgramiv(service_program, GL_ACTIVE_ATTRIBUTES, &num_attributes); | |
2236 | |
2237 GLint num_uniforms = 0; | |
2238 glGetProgramiv(service_program, GL_ACTIVE_UNIFORMS, &num_uniforms); | |
2239 | |
2240 data->resize(sizeof(ProgramInfoHeader) + | |
2241 ((num_attributes + num_uniforms) * sizeof(ProgramInput)), | |
2242 0); | |
2243 | |
2244 GLint link_status = 0; | |
2245 glGetProgramiv(service_program, GL_LINK_STATUS, &link_status); | |
2246 | |
2247 ProgramInfoHeader header; | |
2248 header.link_status = link_status; | |
2249 header.num_attribs = num_attributes; | |
2250 header.num_uniforms = num_uniforms; | |
2251 InsertValueIntoBuffer(data, header, 0); | |
2252 | |
2253 GLint active_attribute_max_length = 0; | |
2254 glGetProgramiv(service_program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, | |
2255 &active_attribute_max_length); | |
2256 | |
2257 std::vector<char> attrib_name_buf(active_attribute_max_length, 0); | |
2258 for (GLint attrib_index = 0; attrib_index < num_attributes; attrib_index++) { | |
2259 GLsizei length = 0; | |
2260 GLint size = 0; | |
2261 GLenum type = GL_NONE; | |
2262 glGetActiveAttrib(service_program, attrib_index, attrib_name_buf.size(), | |
2263 &length, &size, &type, attrib_name_buf.data()); | |
2264 | |
2265 ProgramInput input; | |
2266 input.size = size; | |
2267 input.type = type; | |
2268 | |
2269 int32_t location = | |
2270 glGetAttribLocation(service_program, attrib_name_buf.data()); | |
2271 input.location_offset = data->size(); | |
2272 AppendValueToBuffer(data, location); | |
2273 | |
2274 input.name_offset = data->size(); | |
2275 input.name_length = length; | |
2276 AppendStringToBuffer(data, attrib_name_buf.data(), length); | |
2277 | |
2278 InsertValueIntoBuffer( | |
2279 data, input, | |
2280 sizeof(ProgramInfoHeader) + (attrib_index * sizeof(ProgramInput))); | |
2281 } | |
2282 | |
2283 GLint active_uniform_max_length = 0; | |
2284 glGetProgramiv(service_program, GL_ACTIVE_UNIFORM_MAX_LENGTH, | |
2285 &active_uniform_max_length); | |
2286 | |
2287 std::vector<char> uniform_name_buf(active_uniform_max_length, 0); | |
2288 for (GLint uniform_index = 0; uniform_index < num_uniforms; uniform_index++) { | |
2289 GLsizei length = 0; | |
2290 GLint size = 0; | |
2291 GLenum type = GL_NONE; | |
2292 glGetActiveUniform(service_program, uniform_index, uniform_name_buf.size(), | |
2293 &length, &size, &type, uniform_name_buf.data()); | |
2294 | |
2295 ProgramInput input; | |
2296 input.size = size; | |
2297 input.type = type; | |
2298 | |
2299 input.location_offset = data->size(); | |
2300 int32_t base_location = | |
2301 glGetUniformLocation(service_program, uniform_name_buf.data()); | |
2302 AppendValueToBuffer(data, base_location); | |
2303 | |
2304 GLSLArrayName parsed_service_name(uniform_name_buf.data()); | |
2305 if (size > 1 || parsed_service_name.IsArrayName()) { | |
2306 for (GLint location_index = 1; location_index < size; location_index++) { | |
2307 std::string array_element_name = parsed_service_name.base_name() + "[" + | |
2308 base::IntToString(location_index) + | |
2309 "]"; | |
2310 int32_t element_location = | |
2311 glGetUniformLocation(service_program, array_element_name.c_str()); | |
2312 AppendValueToBuffer(data, element_location); | |
2313 } | |
2314 } | |
2315 | |
2316 input.name_offset = data->size(); | |
2317 input.name_length = length; | |
2318 AppendStringToBuffer(data, uniform_name_buf.data(), length); | |
2319 | |
2320 InsertValueIntoBuffer(data, input, sizeof(ProgramInfoHeader) + | |
2321 ((num_attributes + uniform_index) * | |
2322 sizeof(ProgramInput))); | |
2323 } | |
2324 | |
1682 return error::kNoError; | 2325 return error::kNoError; |
1683 } | 2326 } |
1684 | 2327 |
1685 error::Error GLES2DecoderPassthroughImpl::DoGetUniformBlocksCHROMIUM( | 2328 error::Error GLES2DecoderPassthroughImpl::DoGetUniformBlocksCHROMIUM( |
1686 GLuint program, | 2329 GLuint program, |
1687 std::vector<uint8_t>* data) { | 2330 std::vector<uint8_t>* data) { |
2331 NOTIMPLEMENTED(); | |
1688 return error::kNoError; | 2332 return error::kNoError; |
1689 } | 2333 } |
1690 | 2334 |
1691 error::Error | 2335 error::Error |
1692 GLES2DecoderPassthroughImpl::DoGetTransformFeedbackVaryingsCHROMIUM( | 2336 GLES2DecoderPassthroughImpl::DoGetTransformFeedbackVaryingsCHROMIUM( |
1693 GLuint program, | 2337 GLuint program, |
1694 std::vector<uint8_t>* data) { | 2338 std::vector<uint8_t>* data) { |
2339 NOTIMPLEMENTED(); | |
1695 return error::kNoError; | 2340 return error::kNoError; |
1696 } | 2341 } |
1697 | 2342 |
1698 error::Error GLES2DecoderPassthroughImpl::DoGetUniformsES3CHROMIUM( | 2343 error::Error GLES2DecoderPassthroughImpl::DoGetUniformsES3CHROMIUM( |
1699 GLuint program, | 2344 GLuint program, |
1700 std::vector<uint8_t>* data) { | 2345 std::vector<uint8_t>* data) { |
2346 NOTIMPLEMENTED(); | |
1701 return error::kNoError; | 2347 return error::kNoError; |
1702 } | 2348 } |
1703 | 2349 |
1704 error::Error GLES2DecoderPassthroughImpl::DoGetTranslatedShaderSourceANGLE( | 2350 error::Error GLES2DecoderPassthroughImpl::DoGetTranslatedShaderSourceANGLE( |
1705 GLuint shader, | 2351 GLuint shader, |
1706 std::string* source) { | 2352 std::string* source) { |
2353 NOTIMPLEMENTED(); | |
1707 return error::kNoError; | 2354 return error::kNoError; |
1708 } | 2355 } |
1709 | 2356 |
1710 error::Error GLES2DecoderPassthroughImpl::DoSwapBuffersWithDamageCHROMIUM( | 2357 error::Error GLES2DecoderPassthroughImpl::DoSwapBuffersWithDamageCHROMIUM( |
1711 GLint x, | 2358 GLint x, |
1712 GLint y, | 2359 GLint y, |
1713 GLint width, | 2360 GLint width, |
1714 GLint height) { | 2361 GLint height) { |
2362 gfx::SwapResult result = surface_->PostSubBuffer(x, y, width, height); | |
2363 if (result == gfx::SwapResult::SWAP_FAILED) { | |
2364 LOG(ERROR) << "Context lost because PostSubBuffer failed."; | |
2365 } | |
2366 // TODO(geofflang): force the context loss? | |
1715 return error::kNoError; | 2367 return error::kNoError; |
1716 } | 2368 } |
1717 | 2369 |
1718 error::Error GLES2DecoderPassthroughImpl::DoPostSubBufferCHROMIUM( | 2370 error::Error GLES2DecoderPassthroughImpl::DoPostSubBufferCHROMIUM( |
1719 GLint x, | 2371 GLint x, |
1720 GLint y, | 2372 GLint y, |
1721 GLint width, | 2373 GLint width, |
1722 GLint height) { | 2374 GLint height) { |
1723 return error::kNoError; | 2375 return error::kNoError; |
1724 } | 2376 } |
1725 | 2377 |
1726 error::Error GLES2DecoderPassthroughImpl::DoCopyTextureCHROMIUM( | 2378 error::Error GLES2DecoderPassthroughImpl::DoCopyTextureCHROMIUM( |
1727 GLenum source_id, | 2379 GLenum source_id, |
1728 GLenum dest_id, | 2380 GLenum dest_id, |
1729 GLint internalformat, | 2381 GLint internalformat, |
1730 GLenum dest_type, | 2382 GLenum dest_type, |
1731 GLboolean unpack_flip_y, | 2383 GLboolean unpack_flip_y, |
1732 GLboolean unpack_premultiply_alpha, | 2384 GLboolean unpack_premultiply_alpha, |
1733 GLboolean unpack_unmultiply_alpha) { | 2385 GLboolean unpack_unmultiply_alpha) { |
2386 glCopyTextureCHROMIUM( | |
2387 resources_->texture_id_map.GetServiceIDOrReserve(source_id), | |
2388 resources_->texture_id_map.GetServiceIDOrReserve(dest_id), internalformat, | |
2389 dest_type, unpack_flip_y, unpack_premultiply_alpha, | |
2390 unpack_unmultiply_alpha); | |
1734 return error::kNoError; | 2391 return error::kNoError; |
1735 } | 2392 } |
1736 | 2393 |
1737 error::Error GLES2DecoderPassthroughImpl::DoCopySubTextureCHROMIUM( | 2394 error::Error GLES2DecoderPassthroughImpl::DoCopySubTextureCHROMIUM( |
1738 GLenum source_id, | 2395 GLenum source_id, |
1739 GLenum dest_id, | 2396 GLenum dest_id, |
1740 GLint xoffset, | 2397 GLint xoffset, |
1741 GLint yoffset, | 2398 GLint yoffset, |
1742 GLint x, | 2399 GLint x, |
1743 GLint y, | 2400 GLint y, |
1744 GLsizei width, | 2401 GLsizei width, |
1745 GLsizei height, | 2402 GLsizei height, |
1746 GLboolean unpack_flip_y, | 2403 GLboolean unpack_flip_y, |
1747 GLboolean unpack_premultiply_alpha, | 2404 GLboolean unpack_premultiply_alpha, |
1748 GLboolean unpack_unmultiply_alpha) { | 2405 GLboolean unpack_unmultiply_alpha) { |
2406 glCopySubTextureCHROMIUM( | |
2407 resources_->texture_id_map.GetServiceIDOrReserve(source_id), | |
2408 resources_->texture_id_map.GetServiceIDOrReserve(dest_id), xoffset, | |
2409 yoffset, x, y, width, height, unpack_flip_y, unpack_premultiply_alpha, | |
2410 unpack_unmultiply_alpha); | |
1749 return error::kNoError; | 2411 return error::kNoError; |
1750 } | 2412 } |
1751 | 2413 |
1752 error::Error GLES2DecoderPassthroughImpl::DoCompressedCopyTextureCHROMIUM( | 2414 error::Error GLES2DecoderPassthroughImpl::DoCompressedCopyTextureCHROMIUM( |
1753 GLenum source_id, | 2415 GLenum source_id, |
1754 GLenum dest_id) { | 2416 GLenum dest_id) { |
2417 glCompressedCopyTextureCHROMIUM( | |
2418 resources_->texture_id_map.GetServiceIDOrReserve(source_id), | |
2419 resources_->texture_id_map.GetServiceIDOrReserve(dest_id)); | |
1755 return error::kNoError; | 2420 return error::kNoError; |
1756 } | 2421 } |
1757 | 2422 |
1758 error::Error GLES2DecoderPassthroughImpl::DoDrawArraysInstancedANGLE( | 2423 error::Error GLES2DecoderPassthroughImpl::DoDrawArraysInstancedANGLE( |
1759 GLenum mode, | 2424 GLenum mode, |
1760 GLint first, | 2425 GLint first, |
1761 GLsizei count, | 2426 GLsizei count, |
1762 GLsizei primcount) { | 2427 GLsizei primcount) { |
2428 glDrawArraysInstancedANGLE(mode, first, count, primcount); | |
1763 return error::kNoError; | 2429 return error::kNoError; |
1764 } | 2430 } |
1765 | 2431 |
1766 error::Error GLES2DecoderPassthroughImpl::DoDrawElementsInstancedANGLE( | 2432 error::Error GLES2DecoderPassthroughImpl::DoDrawElementsInstancedANGLE( |
1767 GLenum mode, | 2433 GLenum mode, |
1768 GLsizei count, | 2434 GLsizei count, |
1769 GLenum type, | 2435 GLenum type, |
1770 const void* indices, | 2436 const void* indices, |
1771 GLsizei primcount) { | 2437 GLsizei primcount) { |
2438 glDrawElementsInstancedANGLE(mode, count, type, indices, primcount); | |
1772 return error::kNoError; | 2439 return error::kNoError; |
1773 } | 2440 } |
1774 | 2441 |
1775 error::Error GLES2DecoderPassthroughImpl::DoVertexAttribDivisorANGLE( | 2442 error::Error GLES2DecoderPassthroughImpl::DoVertexAttribDivisorANGLE( |
1776 GLuint index, | 2443 GLuint index, |
1777 GLuint divisor) { | 2444 GLuint divisor) { |
2445 glVertexAttribDivisorANGLE(index, divisor); | |
1778 return error::kNoError; | 2446 return error::kNoError; |
1779 } | 2447 } |
1780 | 2448 |
1781 error::Error GLES2DecoderPassthroughImpl::DoProduceTextureCHROMIUM( | 2449 error::Error GLES2DecoderPassthroughImpl::DoProduceTextureCHROMIUM( |
1782 GLenum target, | 2450 GLenum target, |
1783 const volatile GLbyte* mailbox) { | 2451 const volatile GLbyte* mailbox) { |
2452 // TODO(geofflang): validation | |
2453 | |
2454 GLuint texture_client_id = bound_textures_[active_texture_unit_]; | |
2455 scoped_refptr<TexturePassthrough> texture; | |
2456 | |
2457 auto texture_object_iter = | |
2458 resources_->texture_object_map.find(texture_client_id); | |
2459 if (texture_object_iter != resources_->texture_object_map.end()) { | |
2460 texture = texture_object_iter->second.get(); | |
2461 } else { | |
2462 GLuint service_id = | |
2463 resources_->texture_id_map.GetServiceIDOrReserve(texture_client_id); | |
2464 texture = new TexturePassthrough(service_id); | |
2465 resources_->texture_object_map.insert( | |
2466 std::make_pair(texture_client_id, texture)); | |
2467 } | |
2468 | |
2469 const Mailbox& mb = Mailbox::FromVolatile( | |
2470 *reinterpret_cast<const volatile Mailbox*>(mailbox)); | |
2471 mailbox_manager_->ProduceTexture(mb, texture.get()); | |
1784 return error::kNoError; | 2472 return error::kNoError; |
1785 } | 2473 } |
1786 | 2474 |
1787 error::Error GLES2DecoderPassthroughImpl::DoProduceTextureDirectCHROMIUM( | 2475 error::Error GLES2DecoderPassthroughImpl::DoProduceTextureDirectCHROMIUM( |
1788 GLuint texture, | 2476 GLuint texture_client_id, |
1789 GLenum target, | 2477 GLenum target, |
1790 const volatile GLbyte* mailbox) { | 2478 const volatile GLbyte* mailbox) { |
2479 // TODO(geofflang): validation | |
2480 | |
2481 scoped_refptr<TexturePassthrough> texture; | |
2482 auto texture_object_iter = | |
2483 resources_->texture_object_map.find(texture_client_id); | |
2484 if (texture_object_iter != resources_->texture_object_map.end()) { | |
2485 texture = texture_object_iter->second.get(); | |
2486 } else { | |
2487 GLuint service_id = | |
2488 resources_->texture_id_map.GetServiceIDOrReserve(texture_client_id); | |
2489 texture = new TexturePassthrough(service_id); | |
2490 resources_->texture_object_map.insert( | |
2491 std::make_pair(texture_client_id, texture)); | |
2492 } | |
2493 | |
2494 const Mailbox& mb = Mailbox::FromVolatile( | |
2495 *reinterpret_cast<const volatile Mailbox*>(mailbox)); | |
2496 mailbox_manager_->ProduceTexture(mb, texture.get()); | |
1791 return error::kNoError; | 2497 return error::kNoError; |
1792 } | 2498 } |
1793 | 2499 |
1794 error::Error GLES2DecoderPassthroughImpl::DoConsumeTextureCHROMIUM( | 2500 error::Error GLES2DecoderPassthroughImpl::DoConsumeTextureCHROMIUM( |
1795 GLenum target, | 2501 GLenum target, |
1796 const volatile GLbyte* mailbox) { | 2502 const volatile GLbyte* mailbox) { |
2503 // TODO(geofflang): validation | |
2504 | |
2505 const Mailbox& mb = Mailbox::FromVolatile( | |
2506 *reinterpret_cast<const volatile Mailbox*>(mailbox)); | |
2507 scoped_refptr<TexturePassthrough> texture = static_cast<TexturePassthrough*>( | |
2508 group_->mailbox_manager()->ConsumeTexture(mb)); | |
2509 if (texture == nullptr) { | |
2510 // TODO(geofflang): error, missing mailbox | |
2511 return error::kNoError; | |
2512 } | |
2513 | |
2514 GLuint client_id = bound_textures_[active_texture_unit_]; | |
2515 resources_->texture_id_map.SetIDMapping(client_id, texture->service_id()); | |
2516 resources_->texture_object_map.erase(client_id); | |
2517 resources_->texture_object_map.insert(std::make_pair(client_id, texture)); | |
1797 return error::kNoError; | 2518 return error::kNoError; |
1798 } | 2519 } |
1799 | 2520 |
1800 error::Error GLES2DecoderPassthroughImpl::DoCreateAndConsumeTextureINTERNAL( | 2521 error::Error GLES2DecoderPassthroughImpl::DoCreateAndConsumeTextureINTERNAL( |
1801 GLenum target, | 2522 GLenum target, |
1802 GLuint texture, | 2523 GLuint texture_client_id, |
1803 const volatile GLbyte* mailbox) { | 2524 const volatile GLbyte* mailbox) { |
2525 // TODO(geofflang): validation | |
2526 | |
2527 if (resources_->texture_id_map.GetServiceID(texture_client_id, nullptr)) { | |
2528 return error::kInvalidArguments; | |
2529 } | |
2530 const Mailbox& mb = Mailbox::FromVolatile( | |
2531 *reinterpret_cast<const volatile Mailbox*>(mailbox)); | |
2532 scoped_refptr<TexturePassthrough> texture = static_cast<TexturePassthrough*>( | |
2533 group_->mailbox_manager()->ConsumeTexture(mb)); | |
2534 if (texture == nullptr) { | |
2535 // TODO(geofflang): error, missing mailbox | |
2536 return error::kNoError; | |
2537 } | |
2538 | |
2539 resources_->texture_id_map.SetIDMapping(texture_client_id, | |
2540 texture->service_id()); | |
2541 resources_->texture_object_map.erase(texture_client_id); | |
2542 resources_->texture_object_map.insert( | |
2543 std::make_pair(texture_client_id, texture)); | |
1804 return error::kNoError; | 2544 return error::kNoError; |
1805 } | 2545 } |
1806 | 2546 |
1807 error::Error GLES2DecoderPassthroughImpl::DoBindUniformLocationCHROMIUM( | 2547 error::Error GLES2DecoderPassthroughImpl::DoBindUniformLocationCHROMIUM( |
1808 GLuint program, | 2548 GLuint program, |
1809 GLint location, | 2549 GLint location, |
1810 const char* name) { | 2550 const char* name) { |
2551 glBindUniformLocationCHROMIUM( | |
2552 resources_->program_id_map.GetServiceIDOrReserve(program), location, | |
2553 name); | |
1811 return error::kNoError; | 2554 return error::kNoError; |
1812 } | 2555 } |
1813 | 2556 |
1814 error::Error GLES2DecoderPassthroughImpl::DoBindTexImage2DCHROMIUM( | 2557 error::Error GLES2DecoderPassthroughImpl::DoBindTexImage2DCHROMIUM( |
1815 GLenum target, | 2558 GLenum target, |
1816 GLint imageId) { | 2559 GLint imageId) { |
2560 // TODO(geofflang): error handling | |
2561 gl::GLImage* image = image_manager_->LookupImage(imageId); | |
2562 if (!image->BindTexImage(target)) { | |
2563 image->CopyTexImage(target); | |
2564 } | |
1817 return error::kNoError; | 2565 return error::kNoError; |
1818 } | 2566 } |
1819 | 2567 |
1820 error::Error GLES2DecoderPassthroughImpl::DoReleaseTexImage2DCHROMIUM( | 2568 error::Error GLES2DecoderPassthroughImpl::DoReleaseTexImage2DCHROMIUM( |
1821 GLenum target, | 2569 GLenum target, |
1822 GLint imageId) { | 2570 GLint imageId) { |
2571 // TODO(geofflang): error handling | |
2572 gl::GLImage* image = image_manager_->LookupImage(imageId); | |
2573 image->ReleaseTexImage(target); | |
1823 return error::kNoError; | 2574 return error::kNoError; |
1824 } | 2575 } |
1825 | 2576 |
1826 error::Error GLES2DecoderPassthroughImpl::DoTraceBeginCHROMIUM( | 2577 error::Error GLES2DecoderPassthroughImpl::DoTraceBeginCHROMIUM( |
1827 const char* category_name, | 2578 const char* category_name, |
1828 const char* trace_name) { | 2579 const char* trace_name) { |
2580 NOTIMPLEMENTED(); | |
1829 return error::kNoError; | 2581 return error::kNoError; |
1830 } | 2582 } |
1831 | 2583 |
1832 error::Error GLES2DecoderPassthroughImpl::DoTraceEndCHROMIUM() { | 2584 error::Error GLES2DecoderPassthroughImpl::DoTraceEndCHROMIUM() { |
2585 NOTIMPLEMENTED(); | |
1833 return error::kNoError; | 2586 return error::kNoError; |
1834 } | 2587 } |
1835 | 2588 |
1836 error::Error GLES2DecoderPassthroughImpl::DoDiscardFramebufferEXT( | 2589 error::Error GLES2DecoderPassthroughImpl::DoDiscardFramebufferEXT( |
1837 GLenum target, | 2590 GLenum target, |
1838 GLsizei count, | 2591 GLsizei count, |
1839 const volatile GLenum* attachments) { | 2592 const volatile GLenum* attachments) { |
2593 std::vector<GLenum> attachments_copy(attachments, attachments + count); | |
2594 glDiscardFramebufferEXT(target, count, attachments_copy.data()); | |
1840 return error::kNoError; | 2595 return error::kNoError; |
1841 } | 2596 } |
1842 | 2597 |
1843 error::Error GLES2DecoderPassthroughImpl::DoLoseContextCHROMIUM(GLenum current, | 2598 error::Error GLES2DecoderPassthroughImpl::DoLoseContextCHROMIUM(GLenum current, |
1844 GLenum other) { | 2599 GLenum other) { |
2600 NOTIMPLEMENTED(); | |
1845 return error::kNoError; | 2601 return error::kNoError; |
1846 } | 2602 } |
1847 | 2603 |
1848 error::Error GLES2DecoderPassthroughImpl::DoDescheduleUntilFinishedCHROMIUM() { | 2604 error::Error GLES2DecoderPassthroughImpl::DoDescheduleUntilFinishedCHROMIUM() { |
2605 NOTIMPLEMENTED(); | |
1849 return error::kNoError; | 2606 return error::kNoError; |
1850 } | 2607 } |
1851 | 2608 |
1852 error::Error GLES2DecoderPassthroughImpl::DoInsertFenceSyncCHROMIUM( | 2609 error::Error GLES2DecoderPassthroughImpl::DoInsertFenceSyncCHROMIUM( |
1853 GLuint64 release_count) { | 2610 GLuint64 release_count) { |
2611 if (!fence_sync_release_callback_.is_null()) | |
2612 fence_sync_release_callback_.Run(release_count); | |
1854 return error::kNoError; | 2613 return error::kNoError; |
1855 } | 2614 } |
1856 | 2615 |
1857 error::Error GLES2DecoderPassthroughImpl::DoWaitSyncTokenCHROMIUM( | 2616 error::Error GLES2DecoderPassthroughImpl::DoWaitSyncTokenCHROMIUM( |
1858 CommandBufferNamespace namespace_id, | 2617 CommandBufferNamespace namespace_id, |
1859 CommandBufferId command_buffer_id, | 2618 CommandBufferId command_buffer_id, |
1860 GLuint64 release_count) { | 2619 GLuint64 release_count) { |
1861 return error::kNoError; | 2620 if (wait_fence_sync_callback_.is_null()) { |
2621 return error::kNoError; | |
2622 } | |
2623 return wait_fence_sync_callback_.Run(namespace_id, command_buffer_id, | |
2624 release_count) | |
2625 ? error::kNoError | |
2626 : error::kDeferCommandUntilLater; | |
1862 } | 2627 } |
1863 | 2628 |
1864 error::Error GLES2DecoderPassthroughImpl::DoDrawBuffersEXT( | 2629 error::Error GLES2DecoderPassthroughImpl::DoDrawBuffersEXT( |
1865 GLsizei count, | 2630 GLsizei count, |
1866 const volatile GLenum* bufs) { | 2631 const volatile GLenum* bufs) { |
2632 std::vector<GLenum> bufs_copy(bufs, bufs + count); | |
2633 glDrawBuffersARB(count, bufs_copy.data()); | |
1867 return error::kNoError; | 2634 return error::kNoError; |
1868 } | 2635 } |
1869 | 2636 |
1870 error::Error GLES2DecoderPassthroughImpl::DoDiscardBackbufferCHROMIUM() { | 2637 error::Error GLES2DecoderPassthroughImpl::DoDiscardBackbufferCHROMIUM() { |
2638 NOTIMPLEMENTED(); | |
1871 return error::kNoError; | 2639 return error::kNoError; |
1872 } | 2640 } |
1873 | 2641 |
1874 error::Error GLES2DecoderPassthroughImpl::DoScheduleOverlayPlaneCHROMIUM( | 2642 error::Error GLES2DecoderPassthroughImpl::DoScheduleOverlayPlaneCHROMIUM( |
1875 GLint plane_z_order, | 2643 GLint plane_z_order, |
1876 GLenum plane_transform, | 2644 GLenum plane_transform, |
1877 GLuint overlay_texture_id, | 2645 GLuint overlay_texture_id, |
1878 GLint bounds_x, | 2646 GLint bounds_x, |
1879 GLint bounds_y, | 2647 GLint bounds_y, |
1880 GLint bounds_width, | 2648 GLint bounds_width, |
1881 GLint bounds_height, | 2649 GLint bounds_height, |
1882 GLfloat uv_x, | 2650 GLfloat uv_x, |
1883 GLfloat uv_y, | 2651 GLfloat uv_y, |
1884 GLfloat uv_width, | 2652 GLfloat uv_width, |
1885 GLfloat uv_height) { | 2653 GLfloat uv_height) { |
2654 NOTIMPLEMENTED(); | |
1886 return error::kNoError; | 2655 return error::kNoError; |
1887 } | 2656 } |
1888 | 2657 |
1889 error::Error GLES2DecoderPassthroughImpl::DoScheduleCALayerSharedStateCHROMIUM( | 2658 error::Error GLES2DecoderPassthroughImpl::DoScheduleCALayerSharedStateCHROMIUM( |
1890 GLfloat opacity, | 2659 GLfloat opacity, |
1891 GLboolean is_clipped, | 2660 GLboolean is_clipped, |
1892 const GLfloat* clip_rect, | 2661 const GLfloat* clip_rect, |
1893 GLint sorting_context_id, | 2662 GLint sorting_context_id, |
1894 const GLfloat* transform) { | 2663 const GLfloat* transform) { |
2664 NOTIMPLEMENTED(); | |
1895 return error::kNoError; | 2665 return error::kNoError; |
1896 } | 2666 } |
1897 | 2667 |
1898 error::Error GLES2DecoderPassthroughImpl::DoScheduleCALayerCHROMIUM( | 2668 error::Error GLES2DecoderPassthroughImpl::DoScheduleCALayerCHROMIUM( |
1899 GLuint contents_texture_id, | 2669 GLuint contents_texture_id, |
1900 const GLfloat* contents_rect, | 2670 const GLfloat* contents_rect, |
1901 GLuint background_color, | 2671 GLuint background_color, |
1902 GLuint edge_aa_mask, | 2672 GLuint edge_aa_mask, |
1903 const GLfloat* bounds_rect) { | 2673 const GLfloat* bounds_rect) { |
2674 NOTIMPLEMENTED(); | |
1904 return error::kNoError; | 2675 return error::kNoError; |
1905 } | 2676 } |
1906 | 2677 |
1907 error::Error GLES2DecoderPassthroughImpl::DoScheduleCALayerInUseQueryCHROMIUM( | 2678 error::Error GLES2DecoderPassthroughImpl::DoScheduleCALayerInUseQueryCHROMIUM( |
1908 GLuint n, | 2679 GLuint n, |
1909 const volatile GLuint* textures) { | 2680 const volatile GLuint* textures) { |
2681 NOTIMPLEMENTED(); | |
1910 return error::kNoError; | 2682 return error::kNoError; |
1911 } | 2683 } |
1912 | 2684 |
1913 error::Error GLES2DecoderPassthroughImpl::DoCommitOverlayPlanesCHROMIUM() { | 2685 error::Error GLES2DecoderPassthroughImpl::DoCommitOverlayPlanesCHROMIUM() { |
2686 NOTIMPLEMENTED(); | |
1914 return error::kNoError; | 2687 return error::kNoError; |
1915 } | 2688 } |
1916 | 2689 |
1917 error::Error GLES2DecoderPassthroughImpl::DoSwapInterval(GLint interval) { | 2690 error::Error GLES2DecoderPassthroughImpl::DoSwapInterval(GLint interval) { |
2691 context_->SetSwapInterval(interval); | |
1918 return error::kNoError; | 2692 return error::kNoError; |
1919 } | 2693 } |
1920 | 2694 |
1921 error::Error GLES2DecoderPassthroughImpl::DoFlushDriverCachesCHROMIUM() { | 2695 error::Error GLES2DecoderPassthroughImpl::DoFlushDriverCachesCHROMIUM() { |
2696 NOTIMPLEMENTED(); | |
1922 return error::kNoError; | 2697 return error::kNoError; |
1923 } | 2698 } |
1924 | 2699 |
1925 error::Error GLES2DecoderPassthroughImpl::DoMatrixLoadfCHROMIUM( | 2700 error::Error GLES2DecoderPassthroughImpl::DoMatrixLoadfCHROMIUM( |
1926 GLenum matrixMode, | 2701 GLenum matrixMode, |
1927 const volatile GLfloat* m) { | 2702 const volatile GLfloat* m) { |
2703 NOTIMPLEMENTED(); | |
1928 return error::kNoError; | 2704 return error::kNoError; |
1929 } | 2705 } |
1930 | 2706 |
1931 error::Error GLES2DecoderPassthroughImpl::DoMatrixLoadIdentityCHROMIUM( | 2707 error::Error GLES2DecoderPassthroughImpl::DoMatrixLoadIdentityCHROMIUM( |
1932 GLenum matrixMode) { | 2708 GLenum matrixMode) { |
2709 NOTIMPLEMENTED(); | |
1933 return error::kNoError; | 2710 return error::kNoError; |
1934 } | 2711 } |
1935 | 2712 |
1936 error::Error GLES2DecoderPassthroughImpl::DoGenPathsCHROMIUM(GLuint path, | 2713 error::Error GLES2DecoderPassthroughImpl::DoGenPathsCHROMIUM(GLuint path, |
1937 GLsizei range) { | 2714 GLsizei range) { |
2715 NOTIMPLEMENTED(); | |
1938 return error::kNoError; | 2716 return error::kNoError; |
1939 } | 2717 } |
1940 | 2718 |
1941 error::Error GLES2DecoderPassthroughImpl::DoDeletePathsCHROMIUM(GLuint path, | 2719 error::Error GLES2DecoderPassthroughImpl::DoDeletePathsCHROMIUM(GLuint path, |
1942 GLsizei range) { | 2720 GLsizei range) { |
2721 NOTIMPLEMENTED(); | |
1943 return error::kNoError; | 2722 return error::kNoError; |
1944 } | 2723 } |
1945 | 2724 |
1946 error::Error GLES2DecoderPassthroughImpl::DoIsPathCHROMIUM(GLuint path, | 2725 error::Error GLES2DecoderPassthroughImpl::DoIsPathCHROMIUM(GLuint path, |
1947 uint32_t* result) { | 2726 uint32_t* result) { |
2727 NOTIMPLEMENTED(); | |
1948 return error::kNoError; | 2728 return error::kNoError; |
1949 } | 2729 } |
1950 | 2730 |
1951 error::Error GLES2DecoderPassthroughImpl::DoPathCommandsCHROMIUM( | 2731 error::Error GLES2DecoderPassthroughImpl::DoPathCommandsCHROMIUM( |
1952 GLuint path, | 2732 GLuint path, |
1953 GLsizei numCommands, | 2733 GLsizei numCommands, |
1954 const GLubyte* commands, | 2734 const GLubyte* commands, |
1955 GLsizei numCoords, | 2735 GLsizei numCoords, |
1956 GLenum coordType, | 2736 GLenum coordType, |
1957 const GLvoid* coords, | 2737 const GLvoid* coords, |
1958 GLsizei coords_bufsize) { | 2738 GLsizei coords_bufsize) { |
2739 NOTIMPLEMENTED(); | |
1959 return error::kNoError; | 2740 return error::kNoError; |
1960 } | 2741 } |
1961 | 2742 |
1962 error::Error GLES2DecoderPassthroughImpl::DoPathParameterfCHROMIUM( | 2743 error::Error GLES2DecoderPassthroughImpl::DoPathParameterfCHROMIUM( |
1963 GLuint path, | 2744 GLuint path, |
1964 GLenum pname, | 2745 GLenum pname, |
1965 GLfloat value) { | 2746 GLfloat value) { |
2747 NOTIMPLEMENTED(); | |
1966 return error::kNoError; | 2748 return error::kNoError; |
1967 } | 2749 } |
1968 | 2750 |
1969 error::Error GLES2DecoderPassthroughImpl::DoPathParameteriCHROMIUM( | 2751 error::Error GLES2DecoderPassthroughImpl::DoPathParameteriCHROMIUM( |
1970 GLuint path, | 2752 GLuint path, |
1971 GLenum pname, | 2753 GLenum pname, |
1972 GLint value) { | 2754 GLint value) { |
2755 NOTIMPLEMENTED(); | |
1973 return error::kNoError; | 2756 return error::kNoError; |
1974 } | 2757 } |
1975 | 2758 |
1976 error::Error GLES2DecoderPassthroughImpl::DoPathStencilFuncCHROMIUM( | 2759 error::Error GLES2DecoderPassthroughImpl::DoPathStencilFuncCHROMIUM( |
1977 GLenum func, | 2760 GLenum func, |
1978 GLint ref, | 2761 GLint ref, |
1979 GLuint mask) { | 2762 GLuint mask) { |
2763 NOTIMPLEMENTED(); | |
1980 return error::kNoError; | 2764 return error::kNoError; |
1981 } | 2765 } |
1982 | 2766 |
1983 error::Error GLES2DecoderPassthroughImpl::DoStencilFillPathCHROMIUM( | 2767 error::Error GLES2DecoderPassthroughImpl::DoStencilFillPathCHROMIUM( |
1984 GLuint path, | 2768 GLuint path, |
1985 GLenum fillMode, | 2769 GLenum fillMode, |
1986 GLuint mask) { | 2770 GLuint mask) { |
2771 NOTIMPLEMENTED(); | |
1987 return error::kNoError; | 2772 return error::kNoError; |
1988 } | 2773 } |
1989 | 2774 |
1990 error::Error GLES2DecoderPassthroughImpl::DoStencilStrokePathCHROMIUM( | 2775 error::Error GLES2DecoderPassthroughImpl::DoStencilStrokePathCHROMIUM( |
1991 GLuint path, | 2776 GLuint path, |
1992 GLint reference, | 2777 GLint reference, |
1993 GLuint mask) { | 2778 GLuint mask) { |
2779 NOTIMPLEMENTED(); | |
1994 return error::kNoError; | 2780 return error::kNoError; |
1995 } | 2781 } |
1996 | 2782 |
1997 error::Error GLES2DecoderPassthroughImpl::DoCoverFillPathCHROMIUM( | 2783 error::Error GLES2DecoderPassthroughImpl::DoCoverFillPathCHROMIUM( |
1998 GLuint path, | 2784 GLuint path, |
1999 GLenum coverMode) { | 2785 GLenum coverMode) { |
2786 NOTIMPLEMENTED(); | |
2000 return error::kNoError; | 2787 return error::kNoError; |
2001 } | 2788 } |
2002 | 2789 |
2003 error::Error GLES2DecoderPassthroughImpl::DoCoverStrokePathCHROMIUM( | 2790 error::Error GLES2DecoderPassthroughImpl::DoCoverStrokePathCHROMIUM( |
2004 GLuint path, | 2791 GLuint path, |
2005 GLenum coverMode) { | 2792 GLenum coverMode) { |
2793 NOTIMPLEMENTED(); | |
2006 return error::kNoError; | 2794 return error::kNoError; |
2007 } | 2795 } |
2008 | 2796 |
2009 error::Error GLES2DecoderPassthroughImpl::DoStencilThenCoverFillPathCHROMIUM( | 2797 error::Error GLES2DecoderPassthroughImpl::DoStencilThenCoverFillPathCHROMIUM( |
2010 GLuint path, | 2798 GLuint path, |
2011 GLenum fillMode, | 2799 GLenum fillMode, |
2012 GLuint mask, | 2800 GLuint mask, |
2013 GLenum coverMode) { | 2801 GLenum coverMode) { |
2802 NOTIMPLEMENTED(); | |
2014 return error::kNoError; | 2803 return error::kNoError; |
2015 } | 2804 } |
2016 | 2805 |
2017 error::Error GLES2DecoderPassthroughImpl::DoStencilThenCoverStrokePathCHROMIUM( | 2806 error::Error GLES2DecoderPassthroughImpl::DoStencilThenCoverStrokePathCHROMIUM( |
2018 GLuint path, | 2807 GLuint path, |
2019 GLint reference, | 2808 GLint reference, |
2020 GLuint mask, | 2809 GLuint mask, |
2021 GLenum coverMode) { | 2810 GLenum coverMode) { |
2811 NOTIMPLEMENTED(); | |
2022 return error::kNoError; | 2812 return error::kNoError; |
2023 } | 2813 } |
2024 | 2814 |
2025 error::Error GLES2DecoderPassthroughImpl::DoStencilFillPathInstancedCHROMIUM( | 2815 error::Error GLES2DecoderPassthroughImpl::DoStencilFillPathInstancedCHROMIUM( |
2026 GLsizei numPaths, | 2816 GLsizei numPaths, |
2027 GLenum pathNameType, | 2817 GLenum pathNameType, |
2028 const GLvoid* paths, | 2818 const GLvoid* paths, |
2029 GLsizei pathsBufsize, | 2819 GLsizei pathsBufsize, |
2030 GLuint pathBase, | 2820 GLuint pathBase, |
2031 GLenum fillMode, | 2821 GLenum fillMode, |
2032 GLuint mask, | 2822 GLuint mask, |
2033 GLenum transformType, | 2823 GLenum transformType, |
2034 const GLfloat* transformValues, | 2824 const GLfloat* transformValues, |
2035 GLsizei transformValuesBufsize) { | 2825 GLsizei transformValuesBufsize) { |
2826 NOTIMPLEMENTED(); | |
2036 return error::kNoError; | 2827 return error::kNoError; |
2037 } | 2828 } |
2038 | 2829 |
2039 error::Error GLES2DecoderPassthroughImpl::DoStencilStrokePathInstancedCHROMIUM( | 2830 error::Error GLES2DecoderPassthroughImpl::DoStencilStrokePathInstancedCHROMIUM( |
2040 GLsizei numPaths, | 2831 GLsizei numPaths, |
2041 GLenum pathNameType, | 2832 GLenum pathNameType, |
2042 const GLvoid* paths, | 2833 const GLvoid* paths, |
2043 GLsizei pathsBufsize, | 2834 GLsizei pathsBufsize, |
2044 GLuint pathBase, | 2835 GLuint pathBase, |
2045 GLint reference, | 2836 GLint reference, |
2046 GLuint mask, | 2837 GLuint mask, |
2047 GLenum transformType, | 2838 GLenum transformType, |
2048 const GLfloat* transformValues, | 2839 const GLfloat* transformValues, |
2049 GLsizei transformValuesBufsize) { | 2840 GLsizei transformValuesBufsize) { |
2841 NOTIMPLEMENTED(); | |
2050 return error::kNoError; | 2842 return error::kNoError; |
2051 } | 2843 } |
2052 | 2844 |
2053 error::Error GLES2DecoderPassthroughImpl::DoCoverFillPathInstancedCHROMIUM( | 2845 error::Error GLES2DecoderPassthroughImpl::DoCoverFillPathInstancedCHROMIUM( |
2054 GLsizei numPaths, | 2846 GLsizei numPaths, |
2055 GLenum pathNameType, | 2847 GLenum pathNameType, |
2056 const GLvoid* paths, | 2848 const GLvoid* paths, |
2057 GLsizei pathsBufsize, | 2849 GLsizei pathsBufsize, |
2058 GLuint pathBase, | 2850 GLuint pathBase, |
2059 GLenum coverMode, | 2851 GLenum coverMode, |
2060 GLenum transformType, | 2852 GLenum transformType, |
2061 const GLfloat* transformValues, | 2853 const GLfloat* transformValues, |
2062 GLsizei transformValuesBufsize) { | 2854 GLsizei transformValuesBufsize) { |
2855 NOTIMPLEMENTED(); | |
2063 return error::kNoError; | 2856 return error::kNoError; |
2064 } | 2857 } |
2065 | 2858 |
2066 error::Error GLES2DecoderPassthroughImpl::DoCoverStrokePathInstancedCHROMIUM( | 2859 error::Error GLES2DecoderPassthroughImpl::DoCoverStrokePathInstancedCHROMIUM( |
2067 GLsizei numPaths, | 2860 GLsizei numPaths, |
2068 GLenum pathNameType, | 2861 GLenum pathNameType, |
2069 const GLvoid* paths, | 2862 const GLvoid* paths, |
2070 GLsizei pathsBufsize, | 2863 GLsizei pathsBufsize, |
2071 GLuint pathBase, | 2864 GLuint pathBase, |
2072 GLenum coverMode, | 2865 GLenum coverMode, |
2073 GLenum transformType, | 2866 GLenum transformType, |
2074 const GLfloat* transformValues, | 2867 const GLfloat* transformValues, |
2075 GLsizei transformValuesBufsize) { | 2868 GLsizei transformValuesBufsize) { |
2869 NOTIMPLEMENTED(); | |
2076 return error::kNoError; | 2870 return error::kNoError; |
2077 } | 2871 } |
2078 | 2872 |
2079 error::Error | 2873 error::Error |
2080 GLES2DecoderPassthroughImpl::DoStencilThenCoverFillPathInstancedCHROMIUM( | 2874 GLES2DecoderPassthroughImpl::DoStencilThenCoverFillPathInstancedCHROMIUM( |
2081 GLsizei numPaths, | 2875 GLsizei numPaths, |
2082 GLenum pathNameType, | 2876 GLenum pathNameType, |
2083 const GLvoid* paths, | 2877 const GLvoid* paths, |
2084 GLsizei pathsBufsize, | 2878 GLsizei pathsBufsize, |
2085 GLuint pathBase, | 2879 GLuint pathBase, |
2086 GLenum fillMode, | 2880 GLenum fillMode, |
2087 GLuint mask, | 2881 GLuint mask, |
2088 GLenum coverMode, | 2882 GLenum coverMode, |
2089 GLenum transformType, | 2883 GLenum transformType, |
2090 const GLfloat* transformValues, | 2884 const GLfloat* transformValues, |
2091 GLsizei transformValuesBufsize) { | 2885 GLsizei transformValuesBufsize) { |
2886 NOTIMPLEMENTED(); | |
2092 return error::kNoError; | 2887 return error::kNoError; |
2093 } | 2888 } |
2094 | 2889 |
2095 error::Error | 2890 error::Error |
2096 GLES2DecoderPassthroughImpl::DoStencilThenCoverStrokePathInstancedCHROMIUM( | 2891 GLES2DecoderPassthroughImpl::DoStencilThenCoverStrokePathInstancedCHROMIUM( |
2097 GLsizei numPaths, | 2892 GLsizei numPaths, |
2098 GLenum pathNameType, | 2893 GLenum pathNameType, |
2099 const GLvoid* paths, | 2894 const GLvoid* paths, |
2100 GLsizei pathsBufsize, | 2895 GLsizei pathsBufsize, |
2101 GLuint pathBase, | 2896 GLuint pathBase, |
2102 GLint reference, | 2897 GLint reference, |
2103 GLuint mask, | 2898 GLuint mask, |
2104 GLenum coverMode, | 2899 GLenum coverMode, |
2105 GLenum transformType, | 2900 GLenum transformType, |
2106 const GLfloat* transformValues, | 2901 const GLfloat* transformValues, |
2107 GLsizei transformValuesBufsize) { | 2902 GLsizei transformValuesBufsize) { |
2903 NOTIMPLEMENTED(); | |
2108 return error::kNoError; | 2904 return error::kNoError; |
2109 } | 2905 } |
2110 | 2906 |
2111 error::Error GLES2DecoderPassthroughImpl::DoBindFragmentInputLocationCHROMIUM( | 2907 error::Error GLES2DecoderPassthroughImpl::DoBindFragmentInputLocationCHROMIUM( |
2112 GLuint program, | 2908 GLuint program, |
2113 GLint location, | 2909 GLint location, |
2114 const char* name) { | 2910 const char* name) { |
2911 NOTIMPLEMENTED(); | |
2115 return error::kNoError; | 2912 return error::kNoError; |
2116 } | 2913 } |
2117 | 2914 |
2118 error::Error GLES2DecoderPassthroughImpl::DoProgramPathFragmentInputGenCHROMIUM( | 2915 error::Error GLES2DecoderPassthroughImpl::DoProgramPathFragmentInputGenCHROMIUM( |
2119 GLuint program, | 2916 GLuint program, |
2120 GLint location, | 2917 GLint location, |
2121 GLenum genMode, | 2918 GLenum genMode, |
2122 GLint components, | 2919 GLint components, |
2123 const GLfloat* coeffs, | 2920 const GLfloat* coeffs, |
2124 GLsizei coeffsBufsize) { | 2921 GLsizei coeffsBufsize) { |
2922 NOTIMPLEMENTED(); | |
2125 return error::kNoError; | 2923 return error::kNoError; |
2126 } | 2924 } |
2127 | 2925 |
2128 error::Error GLES2DecoderPassthroughImpl::DoCoverageModulationCHROMIUM( | 2926 error::Error GLES2DecoderPassthroughImpl::DoCoverageModulationCHROMIUM( |
2129 GLenum components) { | 2927 GLenum components) { |
2928 NOTIMPLEMENTED(); | |
2130 return error::kNoError; | 2929 return error::kNoError; |
2131 } | 2930 } |
2132 | 2931 |
2133 error::Error GLES2DecoderPassthroughImpl::DoBlendBarrierKHR() { | 2932 error::Error GLES2DecoderPassthroughImpl::DoBlendBarrierKHR() { |
2933 NOTIMPLEMENTED(); | |
2134 return error::kNoError; | 2934 return error::kNoError; |
2135 } | 2935 } |
2136 | 2936 |
2137 error::Error | 2937 error::Error |
2138 GLES2DecoderPassthroughImpl::DoApplyScreenSpaceAntialiasingCHROMIUM() { | 2938 GLES2DecoderPassthroughImpl::DoApplyScreenSpaceAntialiasingCHROMIUM() { |
2939 NOTIMPLEMENTED(); | |
2139 return error::kNoError; | 2940 return error::kNoError; |
2140 } | 2941 } |
2141 | 2942 |
2142 error::Error GLES2DecoderPassthroughImpl::DoBindFragDataLocationIndexedEXT( | 2943 error::Error GLES2DecoderPassthroughImpl::DoBindFragDataLocationIndexedEXT( |
2143 GLuint program, | 2944 GLuint program, |
2144 GLuint colorNumber, | 2945 GLuint colorNumber, |
2145 GLuint index, | 2946 GLuint index, |
2146 const char* name) { | 2947 const char* name) { |
2948 NOTIMPLEMENTED(); | |
2147 return error::kNoError; | 2949 return error::kNoError; |
2148 } | 2950 } |
2149 | 2951 |
2150 error::Error GLES2DecoderPassthroughImpl::DoBindFragDataLocationEXT( | 2952 error::Error GLES2DecoderPassthroughImpl::DoBindFragDataLocationEXT( |
2151 GLuint program, | 2953 GLuint program, |
2152 GLuint colorNumber, | 2954 GLuint colorNumber, |
2153 const char* name) { | 2955 const char* name) { |
2956 NOTIMPLEMENTED(); | |
2154 return error::kNoError; | 2957 return error::kNoError; |
2155 } | 2958 } |
2156 | 2959 |
2157 error::Error GLES2DecoderPassthroughImpl::DoGetFragDataIndexEXT( | 2960 error::Error GLES2DecoderPassthroughImpl::DoGetFragDataIndexEXT( |
2158 GLuint program, | 2961 GLuint program, |
2159 const char* name, | 2962 const char* name, |
2160 GLint* index) { | 2963 GLint* index) { |
2964 NOTIMPLEMENTED(); | |
2161 return error::kNoError; | 2965 return error::kNoError; |
2162 } | 2966 } |
2163 | 2967 |
2164 error::Error | 2968 error::Error |
2165 GLES2DecoderPassthroughImpl::DoUniformMatrix4fvStreamTextureMatrixCHROMIUM( | 2969 GLES2DecoderPassthroughImpl::DoUniformMatrix4fvStreamTextureMatrixCHROMIUM( |
2166 GLint location, | 2970 GLint location, |
2167 GLboolean transpose, | 2971 GLboolean transpose, |
2168 const volatile GLfloat* defaultValue) { | 2972 const volatile GLfloat* defaultValue) { |
2973 NOTIMPLEMENTED(); | |
2169 return error::kNoError; | 2974 return error::kNoError; |
2170 } | 2975 } |
2171 | 2976 |
2172 } // namespace gles2 | 2977 } // namespace gles2 |
2173 } // namespace gpu | 2978 } // namespace gpu |
OLD | NEW |