OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <limits.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <stdio.h> | 10 #include <stdio.h> |
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 | 1332 |
1333 // Check that the currently bound read framebuffer's color image | 1333 // Check that the currently bound read framebuffer's color image |
1334 // isn't the target texture of the glCopyTex{Sub}Image2D. | 1334 // isn't the target texture of the glCopyTex{Sub}Image2D. |
1335 bool FormsTextureCopyingFeedbackLoop(TextureRef* texture, GLint level); | 1335 bool FormsTextureCopyingFeedbackLoop(TextureRef* texture, GLint level); |
1336 | 1336 |
1337 // Check if a framebuffer meets our requirements. | 1337 // Check if a framebuffer meets our requirements. |
1338 // Generates |gl_error| if the framebuffer is incomplete. | 1338 // Generates |gl_error| if the framebuffer is incomplete. |
1339 bool CheckFramebufferValid( | 1339 bool CheckFramebufferValid( |
1340 Framebuffer* framebuffer, | 1340 Framebuffer* framebuffer, |
1341 GLenum target, | 1341 GLenum target, |
1342 bool clear_uncleared_images, | |
1343 GLenum gl_error, | 1342 GLenum gl_error, |
1344 const char* func_name); | 1343 const char* func_name); |
1345 | 1344 |
1346 bool CheckBoundDrawFramebufferValid( | 1345 bool CheckBoundDrawFramebufferValid(const char* func_name); |
1347 bool clear_uncleared_images, const char* func_name); | |
1348 // Generates |gl_error| if the bound read fbo is incomplete. | 1346 // Generates |gl_error| if the bound read fbo is incomplete. |
1349 bool CheckBoundReadFramebufferValid(const char* func_name, GLenum gl_error); | 1347 bool CheckBoundReadFramebufferValid(const char* func_name, GLenum gl_error); |
1350 // This is only used by DoBlitFramebufferCHROMIUM which operates read/draw | 1348 // This is only used by DoBlitFramebufferCHROMIUM which operates read/draw |
1351 // framebuffer at the same time. | 1349 // framebuffer at the same time. |
1352 bool CheckBoundFramebufferValid(const char* func_name); | 1350 bool CheckBoundFramebufferValid(const char* func_name); |
1353 | 1351 |
1354 // Checks if the current program exists and is valid. If not generates the | 1352 // Checks if the current program exists and is valid. If not generates the |
1355 // appropriate GL error. Returns true if the current program is in a usable | 1353 // appropriate GL error. Returns true if the current program is in a usable |
1356 // state. | 1354 // state. |
1357 bool CheckCurrentProgram(const char* function_name); | 1355 bool CheckCurrentProgram(const char* function_name); |
1358 | 1356 |
1359 // Checks if the current program exists and is valid and that location is not | 1357 // Checks if the current program exists and is valid and that location is not |
1360 // -1. If the current program is not valid generates the appropriate GL | 1358 // -1. If the current program is not valid generates the appropriate GL |
1361 // error. Returns true if the current program is in a usable state and | 1359 // error. Returns true if the current program is in a usable state and |
1362 // location is not -1. | 1360 // location is not -1. |
1363 bool CheckCurrentProgramForUniform(GLint location, const char* function_name); | 1361 bool CheckCurrentProgramForUniform(GLint location, const char* function_name); |
1364 | 1362 |
1365 // Checks if the current program samples a texture that is also the color | 1363 // Checks if the current program samples a texture that is also the color |
1366 // image of the current bound framebuffer, i.e., the source and destination | 1364 // image of the current bound framebuffer, i.e., the source and destination |
1367 // of the draw operation are the same. | 1365 // of the draw operation are the same. |
1368 bool CheckDrawingFeedbackLoops(); | 1366 bool CheckDrawingFeedbackLoops(); |
1369 | 1367 |
| 1368 bool SupportsDrawBuffers() const; |
| 1369 |
| 1370 // Checks if a draw buffer's format and its corresponding fragment shader |
| 1371 // output's type are compatible, i.e., a signed integer typed variable is |
| 1372 // incompatible with a float or unsigned integer buffer. |
| 1373 // If incompaticle, generates an INVALID_OPERATION to avoid undefined buffer |
| 1374 // contents and return false. |
| 1375 // Otherwise, filter out the draw buffers that are not written to but are not |
| 1376 // NONE through DrawBuffers, to be on the safe side. Return true. |
| 1377 bool ValidateAndAdjustDrawBuffers(const char* function_name); |
| 1378 |
1370 // Checks if |api_type| is valid for the given uniform | 1379 // Checks if |api_type| is valid for the given uniform |
1371 // If the api type is not valid generates the appropriate GL | 1380 // If the api type is not valid generates the appropriate GL |
1372 // error. Returns true if |api_type| is valid for the uniform | 1381 // error. Returns true if |api_type| is valid for the uniform |
1373 bool CheckUniformForApiType(const Program::UniformInfo* info, | 1382 bool CheckUniformForApiType(const Program::UniformInfo* info, |
1374 const char* function_name, | 1383 const char* function_name, |
1375 Program::UniformApiType api_type); | 1384 Program::UniformApiType api_type); |
1376 | 1385 |
1377 // Gets the type of a uniform for a location in the current program. Sets GL | 1386 // Gets the type of a uniform for a location in the current program. Sets GL |
1378 // errors if the current program is not valid. Returns true if the current | 1387 // errors if the current program is not valid. Returns true if the current |
1379 // program is valid and the location exists. Adjusts count so it | 1388 // program is valid and the location exists. Adjusts count so it |
(...skipping 2715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4095 GL_DRAW_FRAMEBUFFER_EXT, | 4104 GL_DRAW_FRAMEBUFFER_EXT, |
4096 framebuffer_state_.bound_draw_framebuffer.get(), | 4105 framebuffer_state_.bound_draw_framebuffer.get(), |
4097 GetBackbufferServiceId()); | 4106 GetBackbufferServiceId()); |
4098 } | 4107 } |
4099 OnFboChanged(); | 4108 OnFboChanged(); |
4100 } | 4109 } |
4101 | 4110 |
4102 bool GLES2DecoderImpl::CheckFramebufferValid( | 4111 bool GLES2DecoderImpl::CheckFramebufferValid( |
4103 Framebuffer* framebuffer, | 4112 Framebuffer* framebuffer, |
4104 GLenum target, | 4113 GLenum target, |
4105 bool clear_uncleared_images, | |
4106 GLenum gl_error, | 4114 GLenum gl_error, |
4107 const char* func_name) { | 4115 const char* func_name) { |
4108 if (!framebuffer) { | 4116 if (!framebuffer) { |
4109 if (surfaceless_) | 4117 if (surfaceless_) |
4110 return false; | 4118 return false; |
4111 if (backbuffer_needs_clear_bits_ && clear_uncleared_images) { | 4119 if (backbuffer_needs_clear_bits_) { |
4112 glClearColor(0, 0, 0, BackBufferAlphaClearColor()); | 4120 glClearColor(0, 0, 0, BackBufferAlphaClearColor()); |
4113 state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); | 4121 state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); |
4114 glClearStencil(0); | 4122 glClearStencil(0); |
4115 state_.SetDeviceStencilMaskSeparate(GL_FRONT, kDefaultStencilMask); | 4123 state_.SetDeviceStencilMaskSeparate(GL_FRONT, kDefaultStencilMask); |
4116 state_.SetDeviceStencilMaskSeparate(GL_BACK, kDefaultStencilMask); | 4124 state_.SetDeviceStencilMaskSeparate(GL_BACK, kDefaultStencilMask); |
4117 glClearDepth(1.0f); | 4125 glClearDepth(1.0f); |
4118 state_.SetDeviceDepthMask(GL_TRUE); | 4126 state_.SetDeviceDepthMask(GL_TRUE); |
4119 state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, false); | 4127 state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, false); |
4120 bool reset_draw_buffer = false; | 4128 bool reset_draw_buffer = false; |
4121 if ((backbuffer_needs_clear_bits_ & GL_COLOR_BUFFER_BIT) != 0 && | 4129 if ((backbuffer_needs_clear_bits_ & GL_COLOR_BUFFER_BIT) != 0 && |
(...skipping 25 matching lines...) Expand all Loading... |
4147 if (framebuffer->GetStatus(texture_manager(), target) != | 4155 if (framebuffer->GetStatus(texture_manager(), target) != |
4148 GL_FRAMEBUFFER_COMPLETE) { | 4156 GL_FRAMEBUFFER_COMPLETE) { |
4149 LOCAL_SET_GL_ERROR( | 4157 LOCAL_SET_GL_ERROR( |
4150 gl_error, func_name, "framebuffer incomplete (check)"); | 4158 gl_error, func_name, "framebuffer incomplete (check)"); |
4151 return false; | 4159 return false; |
4152 } | 4160 } |
4153 framebuffer_manager()->MarkAsComplete(framebuffer); | 4161 framebuffer_manager()->MarkAsComplete(framebuffer); |
4154 } | 4162 } |
4155 | 4163 |
4156 // Are all the attachments cleared? | 4164 // Are all the attachments cleared? |
4157 if (clear_uncleared_images && | 4165 if (renderbuffer_manager()->HaveUnclearedRenderbuffers() || |
4158 (renderbuffer_manager()->HaveUnclearedRenderbuffers() || | 4166 texture_manager()->HaveUnclearedMips()) { |
4159 texture_manager()->HaveUnclearedMips())) { | |
4160 if (!framebuffer->IsCleared()) { | 4167 if (!framebuffer->IsCleared()) { |
4161 ClearUnclearedAttachments(target, framebuffer); | 4168 ClearUnclearedAttachments(target, framebuffer); |
4162 } | 4169 } |
4163 } | 4170 } |
4164 return true; | 4171 return true; |
4165 } | 4172 } |
4166 | 4173 |
4167 bool GLES2DecoderImpl::CheckBoundDrawFramebufferValid( | 4174 bool GLES2DecoderImpl::CheckBoundDrawFramebufferValid(const char* func_name) { |
4168 bool clear_uncleared_images, const char* func_name) { | |
4169 GLenum target = features().chromium_framebuffer_multisample ? | 4175 GLenum target = features().chromium_framebuffer_multisample ? |
4170 GL_DRAW_FRAMEBUFFER : GL_FRAMEBUFFER; | 4176 GL_DRAW_FRAMEBUFFER : GL_FRAMEBUFFER; |
4171 Framebuffer* framebuffer = GetFramebufferInfoForTarget(target); | 4177 Framebuffer* framebuffer = GetFramebufferInfoForTarget(target); |
4172 bool valid = CheckFramebufferValid( | 4178 bool valid = CheckFramebufferValid( |
4173 framebuffer, target, clear_uncleared_images, | 4179 framebuffer, target, GL_INVALID_FRAMEBUFFER_OPERATION, func_name); |
4174 GL_INVALID_FRAMEBUFFER_OPERATION, func_name); | |
4175 if (valid && !features().chromium_framebuffer_multisample) | 4180 if (valid && !features().chromium_framebuffer_multisample) |
4176 OnUseFramebuffer(); | 4181 OnUseFramebuffer(); |
4177 if (valid && feature_info_->feature_flags().desktop_srgb_support) { | 4182 if (valid && feature_info_->feature_flags().desktop_srgb_support) { |
4178 // If framebuffer contains sRGB images, then enable FRAMEBUFFER_SRGB. | 4183 // If framebuffer contains sRGB images, then enable FRAMEBUFFER_SRGB. |
4179 // Otherwise, disable FRAMEBUFFER_SRGB. Assume default fbo does not have | 4184 // Otherwise, disable FRAMEBUFFER_SRGB. Assume default fbo does not have |
4180 // sRGB image. | 4185 // sRGB image. |
4181 // In theory, we can just leave FRAMEBUFFER_SRGB on. However, many drivers | 4186 // In theory, we can just leave FRAMEBUFFER_SRGB on. However, many drivers |
4182 // behave incorrectly when all images are linear encoding, they still apply | 4187 // behave incorrectly when all images are linear encoding, they still apply |
4183 // the sRGB conversion, but when at least one image is sRGB, then they | 4188 // the sRGB conversion, but when at least one image is sRGB, then they |
4184 // behave correctly. | 4189 // behave correctly. |
4185 bool enable_framebuffer_srgb = | 4190 bool enable_framebuffer_srgb = |
4186 framebuffer && framebuffer->HasSRGBAttachments(); | 4191 framebuffer && framebuffer->HasSRGBAttachments(); |
4187 state_.EnableDisableFramebufferSRGB(enable_framebuffer_srgb); | 4192 state_.EnableDisableFramebufferSRGB(enable_framebuffer_srgb); |
4188 } | 4193 } |
4189 return valid; | 4194 return valid; |
4190 } | 4195 } |
4191 | 4196 |
4192 bool GLES2DecoderImpl::CheckBoundReadFramebufferValid( | 4197 bool GLES2DecoderImpl::CheckBoundReadFramebufferValid( |
4193 const char* func_name, GLenum gl_error) { | 4198 const char* func_name, GLenum gl_error) { |
4194 GLenum target = features().chromium_framebuffer_multisample ? | 4199 GLenum target = features().chromium_framebuffer_multisample ? |
4195 GL_READ_FRAMEBUFFER : GL_FRAMEBUFFER; | 4200 GL_READ_FRAMEBUFFER : GL_FRAMEBUFFER; |
4196 Framebuffer* framebuffer = GetFramebufferInfoForTarget(target); | 4201 Framebuffer* framebuffer = GetFramebufferInfoForTarget(target); |
4197 bool valid = CheckFramebufferValid( | 4202 bool valid = CheckFramebufferValid( |
4198 framebuffer, target, true, gl_error, func_name); | 4203 framebuffer, target, gl_error, func_name); |
4199 return valid; | 4204 return valid; |
4200 } | 4205 } |
4201 | 4206 |
4202 bool GLES2DecoderImpl::CheckBoundFramebufferValid(const char* func_name) { | 4207 bool GLES2DecoderImpl::CheckBoundFramebufferValid(const char* func_name) { |
4203 GLenum target = features().chromium_framebuffer_multisample ? | 4208 GLenum target = features().chromium_framebuffer_multisample ? |
4204 GL_DRAW_FRAMEBUFFER : GL_FRAMEBUFFER; | 4209 GL_DRAW_FRAMEBUFFER : GL_FRAMEBUFFER; |
4205 Framebuffer* draw_framebuffer = GetFramebufferInfoForTarget(target); | 4210 Framebuffer* draw_framebuffer = GetFramebufferInfoForTarget(target); |
4206 bool valid = CheckFramebufferValid( | 4211 bool valid = CheckFramebufferValid( |
4207 draw_framebuffer, target, true, | 4212 draw_framebuffer, target, GL_INVALID_FRAMEBUFFER_OPERATION, func_name); |
4208 GL_INVALID_FRAMEBUFFER_OPERATION, func_name); | |
4209 | 4213 |
4210 target = features().chromium_framebuffer_multisample ? | 4214 target = features().chromium_framebuffer_multisample ? |
4211 GL_READ_FRAMEBUFFER : GL_FRAMEBUFFER; | 4215 GL_READ_FRAMEBUFFER : GL_FRAMEBUFFER; |
4212 Framebuffer* read_framebuffer = GetFramebufferInfoForTarget(target); | 4216 Framebuffer* read_framebuffer = GetFramebufferInfoForTarget(target); |
4213 valid = valid && CheckFramebufferValid( | 4217 valid = valid && CheckFramebufferValid( |
4214 read_framebuffer, target, true, | 4218 read_framebuffer, target, GL_INVALID_FRAMEBUFFER_OPERATION, func_name); |
4215 GL_INVALID_FRAMEBUFFER_OPERATION, func_name); | |
4216 | 4219 |
4217 if (valid && feature_info_->feature_flags().desktop_srgb_support) { | 4220 if (valid && feature_info_->feature_flags().desktop_srgb_support) { |
4218 bool enable_framebuffer_srgb = | 4221 bool enable_framebuffer_srgb = |
4219 (draw_framebuffer && draw_framebuffer->HasSRGBAttachments()) || | 4222 (draw_framebuffer && draw_framebuffer->HasSRGBAttachments()) || |
4220 (read_framebuffer && read_framebuffer->HasSRGBAttachments()); | 4223 (read_framebuffer && read_framebuffer->HasSRGBAttachments()); |
4221 state_.EnableDisableFramebufferSRGB(enable_framebuffer_srgb); | 4224 state_.EnableDisableFramebufferSRGB(enable_framebuffer_srgb); |
4222 } | 4225 } |
4223 | 4226 |
4224 return valid; | 4227 return valid; |
4225 } | 4228 } |
(...skipping 2582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6808 } else { | 6811 } else { |
6809 LOCAL_SET_GL_ERROR( | 6812 LOCAL_SET_GL_ERROR( |
6810 GL_INVALID_VALUE, "glDeleteProgram", "unknown program"); | 6813 GL_INVALID_VALUE, "glDeleteProgram", "unknown program"); |
6811 } | 6814 } |
6812 } | 6815 } |
6813 return error::kNoError; | 6816 return error::kNoError; |
6814 } | 6817 } |
6815 | 6818 |
6816 error::Error GLES2DecoderImpl::DoClear(GLbitfield mask) { | 6819 error::Error GLES2DecoderImpl::DoClear(GLbitfield mask) { |
6817 DCHECK(!ShouldDeferDraws()); | 6820 DCHECK(!ShouldDeferDraws()); |
6818 if (CheckBoundDrawFramebufferValid(true, "glClear")) { | 6821 if (CheckBoundDrawFramebufferValid("glClear")) { |
6819 ApplyDirtyState(); | 6822 ApplyDirtyState(); |
6820 // TODO(zmo): Filter out INTEGER/SIGNED INTEGER images to avoid | |
6821 // undefined results. | |
6822 if (workarounds().gl_clear_broken) { | 6823 if (workarounds().gl_clear_broken) { |
6823 ScopedGLErrorSuppressor suppressor("GLES2DecoderImpl::ClearWorkaround", | 6824 ScopedGLErrorSuppressor suppressor("GLES2DecoderImpl::ClearWorkaround", |
6824 GetErrorState()); | 6825 GetErrorState()); |
6825 if (!BoundFramebufferHasDepthAttachment()) | 6826 if (!BoundFramebufferHasDepthAttachment()) |
6826 mask &= ~GL_DEPTH_BUFFER_BIT; | 6827 mask &= ~GL_DEPTH_BUFFER_BIT; |
6827 if (!BoundFramebufferHasStencilAttachment()) | 6828 if (!BoundFramebufferHasStencilAttachment()) |
6828 mask &= ~GL_STENCIL_BUFFER_BIT; | 6829 mask &= ~GL_STENCIL_BUFFER_BIT; |
6829 clear_framebuffer_blit_->ClearFramebuffer( | 6830 clear_framebuffer_blit_->ClearFramebuffer( |
6830 this, GetBoundReadFrameBufferSize(), mask, state_.color_clear_red, | 6831 this, GetBoundReadFrameBufferSize(), mask, state_.color_clear_red, |
6831 state_.color_clear_green, state_.color_clear_blue, | 6832 state_.color_clear_green, state_.color_clear_blue, |
6832 state_.color_clear_alpha, state_.depth_clear, state_.stencil_clear); | 6833 state_.color_clear_alpha, state_.depth_clear, state_.stencil_clear); |
6833 return error::kNoError; | 6834 return error::kNoError; |
6834 } | 6835 } |
6835 glClear(mask); | 6836 glClear(mask); |
6836 } | 6837 } |
6837 return error::kNoError; | 6838 return error::kNoError; |
6838 } | 6839 } |
6839 | 6840 |
6840 void GLES2DecoderImpl::DoClearBufferiv( | 6841 void GLES2DecoderImpl::DoClearBufferiv( |
6841 GLenum buffer, GLint drawbuffer, const GLint* value) { | 6842 GLenum buffer, GLint drawbuffer, const GLint* value) { |
6842 // TODO(zmo): Set clear_uncleared_images=true once crbug.com/584059 is fixed. | 6843 if (!CheckBoundDrawFramebufferValid("glClearBufferiv")) |
6843 if (!CheckBoundDrawFramebufferValid(false, "glClearBufferiv")) | |
6844 return; | 6844 return; |
6845 ApplyDirtyState(); | 6845 ApplyDirtyState(); |
6846 | 6846 |
6847 if (buffer == GL_COLOR) { | 6847 if (buffer == GL_COLOR) { |
6848 if (drawbuffer < 0 || | 6848 if (drawbuffer < 0 || |
6849 drawbuffer >= static_cast<GLint>(group_->max_draw_buffers())) { | 6849 drawbuffer >= static_cast<GLint>(group_->max_draw_buffers())) { |
6850 LOCAL_SET_GL_ERROR( | 6850 LOCAL_SET_GL_ERROR( |
6851 GL_INVALID_VALUE, "glClearBufferiv", "invalid drawBuffer"); | 6851 GL_INVALID_VALUE, "glClearBufferiv", "invalid drawBuffer"); |
6852 return; | 6852 return; |
6853 } | 6853 } |
(...skipping 13 matching lines...) Expand all Loading... |
6867 if (!BoundFramebufferHasStencilAttachment()) { | 6867 if (!BoundFramebufferHasStencilAttachment()) { |
6868 return; | 6868 return; |
6869 } | 6869 } |
6870 } | 6870 } |
6871 MarkDrawBufferAsCleared(buffer, drawbuffer); | 6871 MarkDrawBufferAsCleared(buffer, drawbuffer); |
6872 glClearBufferiv(buffer, drawbuffer, value); | 6872 glClearBufferiv(buffer, drawbuffer, value); |
6873 } | 6873 } |
6874 | 6874 |
6875 void GLES2DecoderImpl::DoClearBufferuiv( | 6875 void GLES2DecoderImpl::DoClearBufferuiv( |
6876 GLenum buffer, GLint drawbuffer, const GLuint* value) { | 6876 GLenum buffer, GLint drawbuffer, const GLuint* value) { |
6877 // TODO(zmo): Set clear_uncleared_images=true once crbug.com/584059 is fixed. | 6877 if (!CheckBoundDrawFramebufferValid("glClearBufferuiv")) |
6878 if (!CheckBoundDrawFramebufferValid(false, "glClearBufferuiv")) | |
6879 return; | 6878 return; |
6880 ApplyDirtyState(); | 6879 ApplyDirtyState(); |
6881 | 6880 |
6882 if (drawbuffer < 0 || | 6881 if (drawbuffer < 0 || |
6883 drawbuffer >= static_cast<GLint>(group_->max_draw_buffers())) { | 6882 drawbuffer >= static_cast<GLint>(group_->max_draw_buffers())) { |
6884 LOCAL_SET_GL_ERROR( | 6883 LOCAL_SET_GL_ERROR( |
6885 GL_INVALID_VALUE, "glClearBufferuiv", "invalid drawBuffer"); | 6884 GL_INVALID_VALUE, "glClearBufferuiv", "invalid drawBuffer"); |
6886 return; | 6885 return; |
6887 } | 6886 } |
6888 GLenum internal_format = | 6887 GLenum internal_format = |
6889 GetBoundColorDrawBufferInternalFormat(drawbuffer); | 6888 GetBoundColorDrawBufferInternalFormat(drawbuffer); |
6890 if (!GLES2Util::IsUnsignedIntegerFormat(internal_format)) { | 6889 if (!GLES2Util::IsUnsignedIntegerFormat(internal_format)) { |
6891 // To avoid undefined results, return without calling the gl function. | 6890 // To avoid undefined results, return without calling the gl function. |
6892 return; | 6891 return; |
6893 } | 6892 } |
6894 MarkDrawBufferAsCleared(buffer, drawbuffer); | 6893 MarkDrawBufferAsCleared(buffer, drawbuffer); |
6895 glClearBufferuiv(buffer, drawbuffer, value); | 6894 glClearBufferuiv(buffer, drawbuffer, value); |
6896 } | 6895 } |
6897 | 6896 |
6898 void GLES2DecoderImpl::DoClearBufferfv( | 6897 void GLES2DecoderImpl::DoClearBufferfv( |
6899 GLenum buffer, GLint drawbuffer, const GLfloat* value) { | 6898 GLenum buffer, GLint drawbuffer, const GLfloat* value) { |
6900 // TODO(zmo): Set clear_uncleared_images=true once crbug.com/584059 is fixed. | 6899 if (!CheckBoundDrawFramebufferValid("glClearBufferfv")) |
6901 if (!CheckBoundDrawFramebufferValid(false, "glClearBufferfv")) | |
6902 return; | 6900 return; |
6903 ApplyDirtyState(); | 6901 ApplyDirtyState(); |
6904 | 6902 |
6905 if (buffer == GL_COLOR) { | 6903 if (buffer == GL_COLOR) { |
6906 if (drawbuffer < 0 || | 6904 if (drawbuffer < 0 || |
6907 drawbuffer >= static_cast<GLint>(group_->max_draw_buffers())) { | 6905 drawbuffer >= static_cast<GLint>(group_->max_draw_buffers())) { |
6908 LOCAL_SET_GL_ERROR( | 6906 LOCAL_SET_GL_ERROR( |
6909 GL_INVALID_VALUE, "glClearBufferfv", "invalid drawBuffer"); | 6907 GL_INVALID_VALUE, "glClearBufferfv", "invalid drawBuffer"); |
6910 return; | 6908 return; |
6911 } | 6909 } |
(...skipping 13 matching lines...) Expand all Loading... |
6925 if (!BoundFramebufferHasDepthAttachment()) { | 6923 if (!BoundFramebufferHasDepthAttachment()) { |
6926 return; | 6924 return; |
6927 } | 6925 } |
6928 } | 6926 } |
6929 MarkDrawBufferAsCleared(buffer, drawbuffer); | 6927 MarkDrawBufferAsCleared(buffer, drawbuffer); |
6930 glClearBufferfv(buffer, drawbuffer, value); | 6928 glClearBufferfv(buffer, drawbuffer, value); |
6931 } | 6929 } |
6932 | 6930 |
6933 void GLES2DecoderImpl::DoClearBufferfi( | 6931 void GLES2DecoderImpl::DoClearBufferfi( |
6934 GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) { | 6932 GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) { |
6935 // TODO(zmo): Set clear_uncleared_images=true once crbug.com/584059 is fixed. | 6933 if (!CheckBoundDrawFramebufferValid("glClearBufferfi")) |
6936 if (!CheckBoundDrawFramebufferValid(false, "glClearBufferfi")) | |
6937 return; | 6934 return; |
6938 ApplyDirtyState(); | 6935 ApplyDirtyState(); |
6939 | 6936 |
6940 if (drawbuffer != 0) { | 6937 if (drawbuffer != 0) { |
6941 LOCAL_SET_GL_ERROR( | 6938 LOCAL_SET_GL_ERROR( |
6942 GL_INVALID_VALUE, "glClearBufferfi", "invalid drawBuffer"); | 6939 GL_INVALID_VALUE, "glClearBufferfi", "invalid drawBuffer"); |
6943 return; | 6940 return; |
6944 } | 6941 } |
6945 if (!BoundFramebufferHasDepthAttachment() && | 6942 if (!BoundFramebufferHasDepthAttachment() && |
6946 !BoundFramebufferHasStencilAttachment()) { | 6943 !BoundFramebufferHasStencilAttachment()) { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7059 | 7056 |
7060 GLbitfield clear_bits = 0; | 7057 GLbitfield clear_bits = 0; |
7061 bool reset_draw_buffers = false; | 7058 bool reset_draw_buffers = false; |
7062 if (framebuffer->HasUnclearedColorAttachments()) { | 7059 if (framebuffer->HasUnclearedColorAttachments()) { |
7063 // We should always use alpha == 0 here, because 1) some draw buffers may | 7060 // We should always use alpha == 0 here, because 1) some draw buffers may |
7064 // have alpha and some may not; 2) we won't have the same situation as the | 7061 // have alpha and some may not; 2) we won't have the same situation as the |
7065 // back buffer where alpha channel exists but is not requested. | 7062 // back buffer where alpha channel exists but is not requested. |
7066 glClearColor(0.0f, 0.0f, 0.0f, 0.0f); | 7063 glClearColor(0.0f, 0.0f, 0.0f, 0.0f); |
7067 state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); | 7064 state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); |
7068 clear_bits |= GL_COLOR_BUFFER_BIT; | 7065 clear_bits |= GL_COLOR_BUFFER_BIT; |
7069 if (feature_info_->feature_flags().ext_draw_buffers || | 7066 |
7070 feature_info_->IsES3Enabled()) { | 7067 if (SupportsDrawBuffers()) { |
7071 reset_draw_buffers = framebuffer->PrepareDrawBuffersForClear(); | 7068 reset_draw_buffers = |
| 7069 framebuffer->PrepareDrawBuffersForClearingUninitializedAttachments(); |
7072 } | 7070 } |
7073 } | 7071 } |
7074 | 7072 |
7075 if (framebuffer->HasUnclearedAttachment(GL_STENCIL_ATTACHMENT) || | 7073 if (framebuffer->HasUnclearedAttachment(GL_STENCIL_ATTACHMENT) || |
7076 framebuffer->HasUnclearedAttachment(GL_DEPTH_STENCIL_ATTACHMENT)) { | 7074 framebuffer->HasUnclearedAttachment(GL_DEPTH_STENCIL_ATTACHMENT)) { |
7077 glClearStencil(0); | 7075 glClearStencil(0); |
7078 state_.SetDeviceStencilMaskSeparate(GL_FRONT, kDefaultStencilMask); | 7076 state_.SetDeviceStencilMaskSeparate(GL_FRONT, kDefaultStencilMask); |
7079 state_.SetDeviceStencilMaskSeparate(GL_BACK, kDefaultStencilMask); | 7077 state_.SetDeviceStencilMaskSeparate(GL_BACK, kDefaultStencilMask); |
7080 clear_bits |= GL_STENCIL_BUFFER_BIT; | 7078 clear_bits |= GL_STENCIL_BUFFER_BIT; |
7081 } | 7079 } |
(...skipping 11 matching lines...) Expand all Loading... |
7093 // TODO(zmo): There is no guarantee that an FBO that is complete on the | 7091 // TODO(zmo): There is no guarantee that an FBO that is complete on the |
7094 // READ attachment will be complete as a DRAW attachment. | 7092 // READ attachment will be complete as a DRAW attachment. |
7095 glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, framebuffer->service_id()); | 7093 glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, framebuffer->service_id()); |
7096 } | 7094 } |
7097 state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, false); | 7095 state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, false); |
7098 glClear(clear_bits); | 7096 glClear(clear_bits); |
7099 } | 7097 } |
7100 | 7098 |
7101 if (cleared_int_renderbuffers || clear_bits) { | 7099 if (cleared_int_renderbuffers || clear_bits) { |
7102 if (reset_draw_buffers) | 7100 if (reset_draw_buffers) |
7103 framebuffer->RestoreDrawBuffersAfterClear(); | 7101 framebuffer->RestoreDrawBuffers(); |
7104 RestoreClearState(); | 7102 RestoreClearState(); |
7105 if (target == GL_READ_FRAMEBUFFER && draw_framebuffer != framebuffer) { | 7103 if (target == GL_READ_FRAMEBUFFER && draw_framebuffer != framebuffer) { |
7106 GLuint service_id = draw_framebuffer ? draw_framebuffer->service_id() : | 7104 GLuint service_id = draw_framebuffer ? draw_framebuffer->service_id() : |
7107 GetBackbufferServiceId(); | 7105 GetBackbufferServiceId(); |
7108 glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, service_id); | 7106 glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, service_id); |
7109 } | 7107 } |
7110 } | 7108 } |
7111 | 7109 |
7112 framebuffer_manager()->MarkAttachmentsAsCleared( | 7110 framebuffer_manager()->MarkAttachmentsAsCleared( |
7113 framebuffer, renderbuffer_manager(), texture_manager()); | 7111 framebuffer, renderbuffer_manager(), texture_manager()); |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8023 TextureUnit& texture_unit = state_.texture_units[texture_unit_index]; | 8021 TextureUnit& texture_unit = state_.texture_units[texture_unit_index]; |
8024 TextureRef* texture_ref = | 8022 TextureRef* texture_ref = |
8025 texture_unit.GetInfoForSamplerType(uniform_info->type).get(); | 8023 texture_unit.GetInfoForSamplerType(uniform_info->type).get(); |
8026 if (attachment->IsTexture(texture_ref)) | 8024 if (attachment->IsTexture(texture_ref)) |
8027 return true; | 8025 return true; |
8028 } | 8026 } |
8029 } | 8027 } |
8030 return false; | 8028 return false; |
8031 } | 8029 } |
8032 | 8030 |
| 8031 bool GLES2DecoderImpl::SupportsDrawBuffers() const { |
| 8032 switch (feature_info_->context_type()) { |
| 8033 case CONTEXT_TYPE_OPENGLES2: |
| 8034 case CONTEXT_TYPE_WEBGL1: |
| 8035 return feature_info_->feature_flags().ext_draw_buffers; |
| 8036 default: |
| 8037 return true; |
| 8038 } |
| 8039 } |
| 8040 |
| 8041 bool GLES2DecoderImpl::ValidateAndAdjustDrawBuffers(const char* func_name) { |
| 8042 if (!SupportsDrawBuffers()) { |
| 8043 return true; |
| 8044 } |
| 8045 Framebuffer* framebuffer = framebuffer_state_.bound_draw_framebuffer.get(); |
| 8046 if (!state_.current_program.get() || !framebuffer) { |
| 8047 return true; |
| 8048 } |
| 8049 uint32_t fragment_output_type_mask = |
| 8050 state_.current_program->fragment_output_type_mask(); |
| 8051 uint32_t fragment_output_written_mask = |
| 8052 state_.current_program->fragment_output_written_mask(); |
| 8053 if (!framebuffer->ValidateAndAdjustDrawBuffers( |
| 8054 fragment_output_type_mask, fragment_output_written_mask)) { |
| 8055 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, func_name, |
| 8056 "buffer format and fragment output variable type incompatible"); |
| 8057 return false; |
| 8058 } |
| 8059 return true; |
| 8060 } |
| 8061 |
8033 bool GLES2DecoderImpl::CheckUniformForApiType( | 8062 bool GLES2DecoderImpl::CheckUniformForApiType( |
8034 const Program::UniformInfo* info, | 8063 const Program::UniformInfo* info, |
8035 const char* function_name, | 8064 const char* function_name, |
8036 Program::UniformApiType api_type) { | 8065 Program::UniformApiType api_type) { |
8037 DCHECK(info); | 8066 DCHECK(info); |
8038 if ((api_type & info->accepts_api_type) == 0) { | 8067 if ((api_type & info->accepts_api_type) == 0) { |
8039 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name, | 8068 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name, |
8040 "wrong uniform function for type"); | 8069 "wrong uniform function for type"); |
8041 return false; | 8070 return false; |
8042 } | 8071 } |
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9009 return error::kNoError; | 9038 return error::kNoError; |
9010 } | 9039 } |
9011 if (count < 0) { | 9040 if (count < 0) { |
9012 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "count < 0"); | 9041 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "count < 0"); |
9013 return error::kNoError; | 9042 return error::kNoError; |
9014 } | 9043 } |
9015 if (primcount < 0) { | 9044 if (primcount < 0) { |
9016 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "primcount < 0"); | 9045 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "primcount < 0"); |
9017 return error::kNoError; | 9046 return error::kNoError; |
9018 } | 9047 } |
9019 if (!CheckBoundDrawFramebufferValid(true, function_name)) { | 9048 if (!CheckBoundDrawFramebufferValid(function_name)) { |
9020 return error::kNoError; | 9049 return error::kNoError; |
9021 } | 9050 } |
9022 // We have to check this here because the prototype for glDrawArrays | 9051 // We have to check this here because the prototype for glDrawArrays |
9023 // is GLint not GLsizei. | 9052 // is GLint not GLsizei. |
9024 if (first < 0) { | 9053 if (first < 0) { |
9025 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "first < 0"); | 9054 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "first < 0"); |
9026 return error::kNoError; | 9055 return error::kNoError; |
9027 } | 9056 } |
9028 | 9057 |
9029 if (state_.bound_transform_feedback.get() && | 9058 if (state_.bound_transform_feedback.get() && |
(...skipping 20 matching lines...) Expand all Loading... |
9050 if (!SimulateAttrib0( | 9079 if (!SimulateAttrib0( |
9051 function_name, max_vertex_accessed, &simulated_attrib_0)) { | 9080 function_name, max_vertex_accessed, &simulated_attrib_0)) { |
9052 return error::kNoError; | 9081 return error::kNoError; |
9053 } | 9082 } |
9054 bool simulated_fixed_attribs = false; | 9083 bool simulated_fixed_attribs = false; |
9055 if (SimulateFixedAttribs( | 9084 if (SimulateFixedAttribs( |
9056 function_name, max_vertex_accessed, &simulated_fixed_attribs, | 9085 function_name, max_vertex_accessed, &simulated_fixed_attribs, |
9057 primcount)) { | 9086 primcount)) { |
9058 bool textures_set = !PrepareTexturesForRender(); | 9087 bool textures_set = !PrepareTexturesForRender(); |
9059 ApplyDirtyState(); | 9088 ApplyDirtyState(); |
| 9089 if (!ValidateAndAdjustDrawBuffers(function_name)) { |
| 9090 return error::kNoError; |
| 9091 } |
9060 if (!instanced) { | 9092 if (!instanced) { |
9061 glDrawArrays(mode, first, count); | 9093 glDrawArrays(mode, first, count); |
9062 } else { | 9094 } else { |
9063 glDrawArraysInstancedANGLE(mode, first, count, primcount); | 9095 glDrawArraysInstancedANGLE(mode, first, count, primcount); |
9064 } | 9096 } |
9065 if (textures_set) { | 9097 if (textures_set) { |
9066 RestoreStateForTextures(); | 9098 RestoreStateForTextures(); |
9067 } | 9099 } |
9068 if (simulated_fixed_attribs) { | 9100 if (simulated_fixed_attribs) { |
9069 RestoreStateForSimulatedFixedAttribs(); | 9101 RestoreStateForSimulatedFixedAttribs(); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9137 } | 9169 } |
9138 if (!validators_->index_type.IsValid(type)) { | 9170 if (!validators_->index_type.IsValid(type)) { |
9139 LOCAL_SET_GL_ERROR_INVALID_ENUM(function_name, type, "type"); | 9171 LOCAL_SET_GL_ERROR_INVALID_ENUM(function_name, type, "type"); |
9140 return error::kNoError; | 9172 return error::kNoError; |
9141 } | 9173 } |
9142 if (primcount < 0) { | 9174 if (primcount < 0) { |
9143 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "primcount < 0"); | 9175 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "primcount < 0"); |
9144 return error::kNoError; | 9176 return error::kNoError; |
9145 } | 9177 } |
9146 | 9178 |
9147 if (!CheckBoundDrawFramebufferValid(true, function_name)) { | 9179 if (!CheckBoundDrawFramebufferValid(function_name)) { |
9148 return error::kNoError; | 9180 return error::kNoError; |
9149 } | 9181 } |
9150 | 9182 |
9151 if (state_.bound_transform_feedback.get() && | 9183 if (state_.bound_transform_feedback.get() && |
9152 state_.bound_transform_feedback->active() && | 9184 state_.bound_transform_feedback->active() && |
9153 !state_.bound_transform_feedback->paused()) { | 9185 !state_.bound_transform_feedback->paused()) { |
9154 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name, | 9186 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name, |
9155 "transformfeedback is active and not paused"); | 9187 "transformfeedback is active and not paused"); |
9156 return error::kNoError; | 9188 return error::kNoError; |
9157 } | 9189 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9191 ApplyDirtyState(); | 9223 ApplyDirtyState(); |
9192 // TODO(gman): Refactor to hide these details in BufferManager or | 9224 // TODO(gman): Refactor to hide these details in BufferManager or |
9193 // VertexAttribManager. | 9225 // VertexAttribManager. |
9194 const GLvoid* indices = reinterpret_cast<const GLvoid*>(offset); | 9226 const GLvoid* indices = reinterpret_cast<const GLvoid*>(offset); |
9195 bool used_client_side_array = false; | 9227 bool used_client_side_array = false; |
9196 if (element_array_buffer->IsClientSideArray()) { | 9228 if (element_array_buffer->IsClientSideArray()) { |
9197 used_client_side_array = true; | 9229 used_client_side_array = true; |
9198 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); | 9230 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); |
9199 indices = element_array_buffer->GetRange(offset, 0); | 9231 indices = element_array_buffer->GetRange(offset, 0); |
9200 } | 9232 } |
9201 | 9233 if (!ValidateAndAdjustDrawBuffers(function_name)) { |
| 9234 return error::kNoError; |
| 9235 } |
9202 if (state_.enable_flags.primitive_restart_fixed_index && | 9236 if (state_.enable_flags.primitive_restart_fixed_index && |
9203 feature_info_->feature_flags(). | 9237 feature_info_->feature_flags(). |
9204 emulate_primitive_restart_fixed_index) { | 9238 emulate_primitive_restart_fixed_index) { |
9205 glEnable(GL_PRIMITIVE_RESTART); | 9239 glEnable(GL_PRIMITIVE_RESTART); |
9206 buffer_manager()->SetPrimitiveRestartFixedIndexIfNecessary(type); | 9240 buffer_manager()->SetPrimitiveRestartFixedIndexIfNecessary(type); |
9207 } | 9241 } |
9208 | |
9209 if (!instanced) { | 9242 if (!instanced) { |
9210 glDrawElements(mode, count, type, indices); | 9243 glDrawElements(mode, count, type, indices); |
9211 } else { | 9244 } else { |
9212 glDrawElementsInstancedANGLE(mode, count, type, indices, primcount); | 9245 glDrawElementsInstancedANGLE(mode, count, type, indices, primcount); |
9213 } | 9246 } |
9214 if (state_.enable_flags.primitive_restart_fixed_index && | 9247 if (state_.enable_flags.primitive_restart_fixed_index && |
9215 feature_info_->feature_flags(). | 9248 feature_info_->feature_flags(). |
9216 emulate_primitive_restart_fixed_index) { | 9249 emulate_primitive_restart_fixed_index) { |
9217 glDisable(GL_PRIMITIVE_RESTART); | 9250 glDisable(GL_PRIMITIVE_RESTART); |
9218 } | 9251 } |
9219 | |
9220 if (used_client_side_array) { | 9252 if (used_client_side_array) { |
9221 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, | 9253 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, |
9222 element_array_buffer->service_id()); | 9254 element_array_buffer->service_id()); |
9223 } | 9255 } |
9224 | |
9225 if (textures_set) { | 9256 if (textures_set) { |
9226 RestoreStateForTextures(); | 9257 RestoreStateForTextures(); |
9227 } | 9258 } |
9228 if (simulated_fixed_attribs) { | 9259 if (simulated_fixed_attribs) { |
9229 RestoreStateForSimulatedFixedAttribs(); | 9260 RestoreStateForSimulatedFixedAttribs(); |
9230 } | 9261 } |
9231 } | 9262 } |
9232 if (simulated_attrib_0) { | 9263 if (simulated_attrib_0) { |
9233 // We don't have to restore attrib 0 generic data at the end of this | 9264 // We don't have to restore attrib 0 generic data at the end of this |
9234 // function even if it is simulated. This is because we will simulate | 9265 // function even if it is simulated. This is because we will simulate |
(...skipping 7485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16720 GLuint mask = 0; | 16751 GLuint mask = 0; |
16721 if (!v.GetFillModeAndMask(c, &fill_mode, &mask)) | 16752 if (!v.GetFillModeAndMask(c, &fill_mode, &mask)) |
16722 return v.error(); | 16753 return v.error(); |
16723 GLuint service_id = 0; | 16754 GLuint service_id = 0; |
16724 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) { | 16755 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) { |
16725 // "If /path/ does not name an existing path object, the command does | 16756 // "If /path/ does not name an existing path object, the command does |
16726 // nothing (and no error is generated)." | 16757 // nothing (and no error is generated)." |
16727 // This holds for other rendering functions, too. | 16758 // This holds for other rendering functions, too. |
16728 return error::kNoError; | 16759 return error::kNoError; |
16729 } | 16760 } |
16730 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16761 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16731 return error::kNoError; | 16762 return error::kNoError; |
16732 ApplyDirtyState(); | 16763 ApplyDirtyState(); |
16733 glStencilFillPathNV(service_id, fill_mode, mask); | 16764 glStencilFillPathNV(service_id, fill_mode, mask); |
16734 return error::kNoError; | 16765 return error::kNoError; |
16735 } | 16766 } |
16736 | 16767 |
16737 error::Error GLES2DecoderImpl::HandleStencilStrokePathCHROMIUM( | 16768 error::Error GLES2DecoderImpl::HandleStencilStrokePathCHROMIUM( |
16738 uint32_t immediate_data_size, | 16769 uint32_t immediate_data_size, |
16739 const void* cmd_data) { | 16770 const void* cmd_data) { |
16740 static const char kFunctionName[] = "glStencilStrokePathCHROMIUM"; | 16771 static const char kFunctionName[] = "glStencilStrokePathCHROMIUM"; |
16741 const gles2::cmds::StencilStrokePathCHROMIUM& c = | 16772 const gles2::cmds::StencilStrokePathCHROMIUM& c = |
16742 *static_cast<const gles2::cmds::StencilStrokePathCHROMIUM*>(cmd_data); | 16773 *static_cast<const gles2::cmds::StencilStrokePathCHROMIUM*>(cmd_data); |
16743 if (!features().chromium_path_rendering) | 16774 if (!features().chromium_path_rendering) |
16744 return error::kUnknownCommand; | 16775 return error::kUnknownCommand; |
16745 | 16776 |
16746 GLuint service_id = 0; | 16777 GLuint service_id = 0; |
16747 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) { | 16778 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) { |
16748 return error::kNoError; | 16779 return error::kNoError; |
16749 } | 16780 } |
16750 GLint reference = static_cast<GLint>(c.reference); | 16781 GLint reference = static_cast<GLint>(c.reference); |
16751 GLuint mask = static_cast<GLuint>(c.mask); | 16782 GLuint mask = static_cast<GLuint>(c.mask); |
16752 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16783 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16753 return error::kNoError; | 16784 return error::kNoError; |
16754 ApplyDirtyState(); | 16785 ApplyDirtyState(); |
16755 glStencilStrokePathNV(service_id, reference, mask); | 16786 glStencilStrokePathNV(service_id, reference, mask); |
16756 return error::kNoError; | 16787 return error::kNoError; |
16757 } | 16788 } |
16758 | 16789 |
16759 error::Error GLES2DecoderImpl::HandleCoverFillPathCHROMIUM( | 16790 error::Error GLES2DecoderImpl::HandleCoverFillPathCHROMIUM( |
16760 uint32_t immediate_data_size, | 16791 uint32_t immediate_data_size, |
16761 const void* cmd_data) { | 16792 const void* cmd_data) { |
16762 static const char kFunctionName[] = "glCoverFillPathCHROMIUM"; | 16793 static const char kFunctionName[] = "glCoverFillPathCHROMIUM"; |
16763 const gles2::cmds::CoverFillPathCHROMIUM& c = | 16794 const gles2::cmds::CoverFillPathCHROMIUM& c = |
16764 *static_cast<const gles2::cmds::CoverFillPathCHROMIUM*>(cmd_data); | 16795 *static_cast<const gles2::cmds::CoverFillPathCHROMIUM*>(cmd_data); |
16765 if (!features().chromium_path_rendering) | 16796 if (!features().chromium_path_rendering) |
16766 return error::kUnknownCommand; | 16797 return error::kUnknownCommand; |
16767 | 16798 |
16768 PathCommandValidatorContext v(this, kFunctionName); | 16799 PathCommandValidatorContext v(this, kFunctionName); |
16769 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; | 16800 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; |
16770 if (!v.GetCoverMode(c, &cover_mode)) | 16801 if (!v.GetCoverMode(c, &cover_mode)) |
16771 return v.error(); | 16802 return v.error(); |
16772 | 16803 |
16773 GLuint service_id = 0; | 16804 GLuint service_id = 0; |
16774 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) | 16805 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) |
16775 return error::kNoError; | 16806 return error::kNoError; |
16776 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16807 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16777 return error::kNoError; | 16808 return error::kNoError; |
16778 ApplyDirtyState(); | 16809 ApplyDirtyState(); |
16779 glCoverFillPathNV(service_id, cover_mode); | 16810 glCoverFillPathNV(service_id, cover_mode); |
16780 return error::kNoError; | 16811 return error::kNoError; |
16781 } | 16812 } |
16782 | 16813 |
16783 error::Error GLES2DecoderImpl::HandleCoverStrokePathCHROMIUM( | 16814 error::Error GLES2DecoderImpl::HandleCoverStrokePathCHROMIUM( |
16784 uint32_t immediate_data_size, | 16815 uint32_t immediate_data_size, |
16785 const void* cmd_data) { | 16816 const void* cmd_data) { |
16786 static const char kFunctionName[] = "glCoverStrokePathCHROMIUM"; | 16817 static const char kFunctionName[] = "glCoverStrokePathCHROMIUM"; |
16787 const gles2::cmds::CoverStrokePathCHROMIUM& c = | 16818 const gles2::cmds::CoverStrokePathCHROMIUM& c = |
16788 *static_cast<const gles2::cmds::CoverStrokePathCHROMIUM*>(cmd_data); | 16819 *static_cast<const gles2::cmds::CoverStrokePathCHROMIUM*>(cmd_data); |
16789 if (!features().chromium_path_rendering) | 16820 if (!features().chromium_path_rendering) |
16790 return error::kUnknownCommand; | 16821 return error::kUnknownCommand; |
16791 | 16822 |
16792 PathCommandValidatorContext v(this, kFunctionName); | 16823 PathCommandValidatorContext v(this, kFunctionName); |
16793 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; | 16824 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; |
16794 if (!v.GetCoverMode(c, &cover_mode)) | 16825 if (!v.GetCoverMode(c, &cover_mode)) |
16795 return v.error(); | 16826 return v.error(); |
16796 | 16827 |
16797 GLuint service_id = 0; | 16828 GLuint service_id = 0; |
16798 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) | 16829 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) |
16799 return error::kNoError; | 16830 return error::kNoError; |
16800 | 16831 |
16801 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16832 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16802 return error::kNoError; | 16833 return error::kNoError; |
16803 ApplyDirtyState(); | 16834 ApplyDirtyState(); |
16804 glCoverStrokePathNV(service_id, cover_mode); | 16835 glCoverStrokePathNV(service_id, cover_mode); |
16805 return error::kNoError; | 16836 return error::kNoError; |
16806 } | 16837 } |
16807 | 16838 |
16808 error::Error GLES2DecoderImpl::HandleStencilThenCoverFillPathCHROMIUM( | 16839 error::Error GLES2DecoderImpl::HandleStencilThenCoverFillPathCHROMIUM( |
16809 uint32_t immediate_data_size, | 16840 uint32_t immediate_data_size, |
16810 const void* cmd_data) { | 16841 const void* cmd_data) { |
16811 static const char kFunctionName[] = "glStencilThenCoverFillPathCHROMIUM"; | 16842 static const char kFunctionName[] = "glStencilThenCoverFillPathCHROMIUM"; |
16812 const gles2::cmds::StencilThenCoverFillPathCHROMIUM& c = | 16843 const gles2::cmds::StencilThenCoverFillPathCHROMIUM& c = |
16813 *static_cast<const gles2::cmds::StencilThenCoverFillPathCHROMIUM*>( | 16844 *static_cast<const gles2::cmds::StencilThenCoverFillPathCHROMIUM*>( |
16814 cmd_data); | 16845 cmd_data); |
16815 if (!features().chromium_path_rendering) | 16846 if (!features().chromium_path_rendering) |
16816 return error::kUnknownCommand; | 16847 return error::kUnknownCommand; |
16817 | 16848 |
16818 PathCommandValidatorContext v(this, kFunctionName); | 16849 PathCommandValidatorContext v(this, kFunctionName); |
16819 GLenum fill_mode = GL_COUNT_UP_CHROMIUM; | 16850 GLenum fill_mode = GL_COUNT_UP_CHROMIUM; |
16820 GLuint mask = 0; | 16851 GLuint mask = 0; |
16821 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; | 16852 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; |
16822 if (!v.GetFillModeAndMask(c, &fill_mode, &mask) || | 16853 if (!v.GetFillModeAndMask(c, &fill_mode, &mask) || |
16823 !v.GetCoverMode(c, &cover_mode)) | 16854 !v.GetCoverMode(c, &cover_mode)) |
16824 return v.error(); | 16855 return v.error(); |
16825 | 16856 |
16826 GLuint service_id = 0; | 16857 GLuint service_id = 0; |
16827 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) | 16858 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) |
16828 return error::kNoError; | 16859 return error::kNoError; |
16829 | 16860 |
16830 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16861 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16831 return error::kNoError; | 16862 return error::kNoError; |
16832 ApplyDirtyState(); | 16863 ApplyDirtyState(); |
16833 glStencilThenCoverFillPathNV(service_id, fill_mode, mask, cover_mode); | 16864 glStencilThenCoverFillPathNV(service_id, fill_mode, mask, cover_mode); |
16834 return error::kNoError; | 16865 return error::kNoError; |
16835 } | 16866 } |
16836 | 16867 |
16837 error::Error GLES2DecoderImpl::HandleStencilThenCoverStrokePathCHROMIUM( | 16868 error::Error GLES2DecoderImpl::HandleStencilThenCoverStrokePathCHROMIUM( |
16838 uint32_t immediate_data_size, | 16869 uint32_t immediate_data_size, |
16839 const void* cmd_data) { | 16870 const void* cmd_data) { |
16840 static const char kFunctionName[] = "glStencilThenCoverStrokePathCHROMIUM"; | 16871 static const char kFunctionName[] = "glStencilThenCoverStrokePathCHROMIUM"; |
16841 const gles2::cmds::StencilThenCoverStrokePathCHROMIUM& c = | 16872 const gles2::cmds::StencilThenCoverStrokePathCHROMIUM& c = |
16842 *static_cast<const gles2::cmds::StencilThenCoverStrokePathCHROMIUM*>( | 16873 *static_cast<const gles2::cmds::StencilThenCoverStrokePathCHROMIUM*>( |
16843 cmd_data); | 16874 cmd_data); |
16844 if (!features().chromium_path_rendering) | 16875 if (!features().chromium_path_rendering) |
16845 return error::kUnknownCommand; | 16876 return error::kUnknownCommand; |
16846 | 16877 |
16847 PathCommandValidatorContext v(this, kFunctionName); | 16878 PathCommandValidatorContext v(this, kFunctionName); |
16848 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; | 16879 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; |
16849 if (!v.GetCoverMode(c, &cover_mode)) | 16880 if (!v.GetCoverMode(c, &cover_mode)) |
16850 return v.error(); | 16881 return v.error(); |
16851 | 16882 |
16852 GLuint service_id = 0; | 16883 GLuint service_id = 0; |
16853 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) | 16884 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) |
16854 return error::kNoError; | 16885 return error::kNoError; |
16855 | 16886 |
16856 GLint reference = static_cast<GLint>(c.reference); | 16887 GLint reference = static_cast<GLint>(c.reference); |
16857 GLuint mask = static_cast<GLuint>(c.mask); | 16888 GLuint mask = static_cast<GLuint>(c.mask); |
16858 | 16889 |
16859 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16890 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16860 return error::kNoError; | 16891 return error::kNoError; |
16861 ApplyDirtyState(); | 16892 ApplyDirtyState(); |
16862 glStencilThenCoverStrokePathNV(service_id, reference, mask, cover_mode); | 16893 glStencilThenCoverStrokePathNV(service_id, reference, mask, cover_mode); |
16863 return error::kNoError; | 16894 return error::kNoError; |
16864 } | 16895 } |
16865 | 16896 |
16866 error::Error GLES2DecoderImpl::HandleStencilFillPathInstancedCHROMIUM( | 16897 error::Error GLES2DecoderImpl::HandleStencilFillPathInstancedCHROMIUM( |
16867 uint32_t immediate_data_size, | 16898 uint32_t immediate_data_size, |
16868 const void* cmd_data) { | 16899 const void* cmd_data) { |
16869 static const char kFunctionName[] = "glStencilFillPathInstancedCHROMIUM"; | 16900 static const char kFunctionName[] = "glStencilFillPathInstancedCHROMIUM"; |
(...skipping 18 matching lines...) Expand all Loading... |
16888 return error::kNoError; | 16919 return error::kNoError; |
16889 | 16920 |
16890 std::unique_ptr<GLuint[]> paths; | 16921 std::unique_ptr<GLuint[]> paths; |
16891 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) | 16922 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) |
16892 return v.error(); | 16923 return v.error(); |
16893 | 16924 |
16894 const GLfloat* transforms = nullptr; | 16925 const GLfloat* transforms = nullptr; |
16895 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) | 16926 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) |
16896 return v.error(); | 16927 return v.error(); |
16897 | 16928 |
16898 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16929 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16899 return error::kNoError; | 16930 return error::kNoError; |
16900 ApplyDirtyState(); | 16931 ApplyDirtyState(); |
16901 glStencilFillPathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, | 16932 glStencilFillPathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, |
16902 fill_mode, mask, transform_type, transforms); | 16933 fill_mode, mask, transform_type, transforms); |
16903 return error::kNoError; | 16934 return error::kNoError; |
16904 } | 16935 } |
16905 | 16936 |
16906 error::Error GLES2DecoderImpl::HandleStencilStrokePathInstancedCHROMIUM( | 16937 error::Error GLES2DecoderImpl::HandleStencilStrokePathInstancedCHROMIUM( |
16907 uint32_t immediate_data_size, | 16938 uint32_t immediate_data_size, |
16908 const void* cmd_data) { | 16939 const void* cmd_data) { |
(...skipping 18 matching lines...) Expand all Loading... |
16927 std::unique_ptr<GLuint[]> paths; | 16958 std::unique_ptr<GLuint[]> paths; |
16928 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) | 16959 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) |
16929 return v.error(); | 16960 return v.error(); |
16930 | 16961 |
16931 const GLfloat* transforms = nullptr; | 16962 const GLfloat* transforms = nullptr; |
16932 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) | 16963 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) |
16933 return v.error(); | 16964 return v.error(); |
16934 | 16965 |
16935 GLint reference = static_cast<GLint>(c.reference); | 16966 GLint reference = static_cast<GLint>(c.reference); |
16936 GLuint mask = static_cast<GLuint>(c.mask); | 16967 GLuint mask = static_cast<GLuint>(c.mask); |
16937 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16968 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16938 return error::kNoError; | 16969 return error::kNoError; |
16939 ApplyDirtyState(); | 16970 ApplyDirtyState(); |
16940 glStencilStrokePathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, | 16971 glStencilStrokePathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, |
16941 reference, mask, transform_type, transforms); | 16972 reference, mask, transform_type, transforms); |
16942 return error::kNoError; | 16973 return error::kNoError; |
16943 } | 16974 } |
16944 | 16975 |
16945 error::Error GLES2DecoderImpl::HandleCoverFillPathInstancedCHROMIUM( | 16976 error::Error GLES2DecoderImpl::HandleCoverFillPathInstancedCHROMIUM( |
16946 uint32_t immediate_data_size, | 16977 uint32_t immediate_data_size, |
16947 const void* cmd_data) { | 16978 const void* cmd_data) { |
(...skipping 18 matching lines...) Expand all Loading... |
16966 return error::kNoError; | 16997 return error::kNoError; |
16967 | 16998 |
16968 std::unique_ptr<GLuint[]> paths; | 16999 std::unique_ptr<GLuint[]> paths; |
16969 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) | 17000 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) |
16970 return v.error(); | 17001 return v.error(); |
16971 | 17002 |
16972 const GLfloat* transforms = nullptr; | 17003 const GLfloat* transforms = nullptr; |
16973 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) | 17004 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) |
16974 return v.error(); | 17005 return v.error(); |
16975 | 17006 |
16976 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 17007 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16977 return error::kNoError; | 17008 return error::kNoError; |
16978 ApplyDirtyState(); | 17009 ApplyDirtyState(); |
16979 glCoverFillPathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, | 17010 glCoverFillPathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, |
16980 cover_mode, transform_type, transforms); | 17011 cover_mode, transform_type, transforms); |
16981 return error::kNoError; | 17012 return error::kNoError; |
16982 } | 17013 } |
16983 | 17014 |
16984 error::Error GLES2DecoderImpl::HandleCoverStrokePathInstancedCHROMIUM( | 17015 error::Error GLES2DecoderImpl::HandleCoverStrokePathInstancedCHROMIUM( |
16985 uint32_t immediate_data_size, | 17016 uint32_t immediate_data_size, |
16986 const void* cmd_data) { | 17017 const void* cmd_data) { |
(...skipping 18 matching lines...) Expand all Loading... |
17005 return error::kNoError; | 17036 return error::kNoError; |
17006 | 17037 |
17007 std::unique_ptr<GLuint[]> paths; | 17038 std::unique_ptr<GLuint[]> paths; |
17008 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) | 17039 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) |
17009 return v.error(); | 17040 return v.error(); |
17010 | 17041 |
17011 const GLfloat* transforms = nullptr; | 17042 const GLfloat* transforms = nullptr; |
17012 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) | 17043 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) |
17013 return v.error(); | 17044 return v.error(); |
17014 | 17045 |
17015 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 17046 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
17016 return error::kNoError; | 17047 return error::kNoError; |
17017 ApplyDirtyState(); | 17048 ApplyDirtyState(); |
17018 glCoverStrokePathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, | 17049 glCoverStrokePathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, |
17019 cover_mode, transform_type, transforms); | 17050 cover_mode, transform_type, transforms); |
17020 return error::kNoError; | 17051 return error::kNoError; |
17021 } | 17052 } |
17022 | 17053 |
17023 error::Error GLES2DecoderImpl::HandleStencilThenCoverFillPathInstancedCHROMIUM( | 17054 error::Error GLES2DecoderImpl::HandleStencilThenCoverFillPathInstancedCHROMIUM( |
17024 uint32_t immediate_data_size, | 17055 uint32_t immediate_data_size, |
17025 const void* cmd_data) { | 17056 const void* cmd_data) { |
(...skipping 23 matching lines...) Expand all Loading... |
17049 return error::kNoError; | 17080 return error::kNoError; |
17050 | 17081 |
17051 std::unique_ptr<GLuint[]> paths; | 17082 std::unique_ptr<GLuint[]> paths; |
17052 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) | 17083 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) |
17053 return v.error(); | 17084 return v.error(); |
17054 | 17085 |
17055 const GLfloat* transforms = nullptr; | 17086 const GLfloat* transforms = nullptr; |
17056 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) | 17087 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) |
17057 return v.error(); | 17088 return v.error(); |
17058 | 17089 |
17059 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 17090 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
17060 return error::kNoError; | 17091 return error::kNoError; |
17061 ApplyDirtyState(); | 17092 ApplyDirtyState(); |
17062 glStencilThenCoverFillPathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), | 17093 glStencilThenCoverFillPathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), |
17063 0, fill_mode, mask, cover_mode, | 17094 0, fill_mode, mask, cover_mode, |
17064 transform_type, transforms); | 17095 transform_type, transforms); |
17065 return error::kNoError; | 17096 return error::kNoError; |
17066 } | 17097 } |
17067 | 17098 |
17068 error::Error | 17099 error::Error |
17069 GLES2DecoderImpl::HandleStencilThenCoverStrokePathInstancedCHROMIUM( | 17100 GLES2DecoderImpl::HandleStencilThenCoverStrokePathInstancedCHROMIUM( |
(...skipping 24 matching lines...) Expand all Loading... |
17094 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) | 17125 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) |
17095 return v.error(); | 17126 return v.error(); |
17096 | 17127 |
17097 const GLfloat* transforms = nullptr; | 17128 const GLfloat* transforms = nullptr; |
17098 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) | 17129 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) |
17099 return v.error(); | 17130 return v.error(); |
17100 | 17131 |
17101 GLint reference = static_cast<GLint>(c.reference); | 17132 GLint reference = static_cast<GLint>(c.reference); |
17102 GLuint mask = static_cast<GLuint>(c.mask); | 17133 GLuint mask = static_cast<GLuint>(c.mask); |
17103 | 17134 |
17104 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 17135 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
17105 return error::kNoError; | 17136 return error::kNoError; |
17106 ApplyDirtyState(); | 17137 ApplyDirtyState(); |
17107 glStencilThenCoverStrokePathInstancedNV( | 17138 glStencilThenCoverStrokePathInstancedNV( |
17108 num_paths, GL_UNSIGNED_INT, paths.get(), 0, reference, mask, cover_mode, | 17139 num_paths, GL_UNSIGNED_INT, paths.get(), 0, reference, mask, cover_mode, |
17109 transform_type, transforms); | 17140 transform_type, transforms); |
17110 return error::kNoError; | 17141 return error::kNoError; |
17111 } | 17142 } |
17112 | 17143 |
17113 void GLES2DecoderImpl::DoBindFragmentInputLocationCHROMIUM( | 17144 void GLES2DecoderImpl::DoBindFragmentInputLocationCHROMIUM( |
17114 GLuint program_id, | 17145 GLuint program_id, |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17361 } | 17392 } |
17362 | 17393 |
17363 // Include the auto-generated part of this file. We split this because it means | 17394 // Include the auto-generated part of this file. We split this because it means |
17364 // we can easily edit the non-auto generated parts right here in this file | 17395 // we can easily edit the non-auto generated parts right here in this file |
17365 // instead of having to edit some template or the code generator. | 17396 // instead of having to edit some template or the code generator. |
17366 #include "base/macros.h" | 17397 #include "base/macros.h" |
17367 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 17398 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
17368 | 17399 |
17369 } // namespace gles2 | 17400 } // namespace gles2 |
17370 } // namespace gpu | 17401 } // namespace gpu |
OLD | NEW |