Chromium Code Reviews| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc |
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| index c8ffe3aefc86438c5095093c8539a25325b3e31b..2bcde6c7805bb056595eed27614c306ef81a4f98 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -6448,6 +6448,13 @@ void GLES2DecoderImpl::DoFramebufferTextureLayer( |
| // TODO(zmo): Unsafe ES3 API, missing states update. |
|
Zhenyao Mo
2015/10/26 21:50:33
Now this is no longer valid with the changes here,
qiankun
2015/10/27 14:26:31
Done.
|
| GLuint service_id = 0; |
| TextureRef* texture_ref = NULL; |
| + Framebuffer* framebuffer = GetFramebufferInfoForTarget(target); |
| + if (!framebuffer) { |
| + LOCAL_SET_GL_ERROR( |
| + GL_INVALID_OPERATION, |
| + "glFramebufferTextureLayer", "no framebuffer bound."); |
| + return; |
| + } |
| if (client_texture_id) { |
| texture_ref = GetTexture(client_texture_id); |
| if (!texture_ref) { |
| @@ -6459,6 +6466,11 @@ void GLES2DecoderImpl::DoFramebufferTextureLayer( |
| service_id = texture_ref->service_id(); |
| } |
| glFramebufferTextureLayer(target, attachment, service_id, level, layer); |
| + GLenum error = LOCAL_PEEK_GL_ERROR("glFramebufferTextureLayer"); |
|
Zhenyao Mo
2015/10/26 21:50:33
This is incorrect. You need to check error before
qiankun
2015/10/27 14:26:31
Done.
|
| + if (error == GL_NO_ERROR) { |
| + framebuffer->AttachTexture(attachment, texture_ref, |
|
Zhenyao Mo
2015/10/26 21:50:33
You should add a AttachTextureLayer function and u
qiankun
2015/10/27 14:26:31
Framebuffer::AttachTextureLayer is added. What API
|
| + texture_ref->texture()->target(), level, 0); |
| + } |
| } |
| void GLES2DecoderImpl::DoGetFramebufferAttachmentParameteriv( |