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 } |
6836 if (SupportsDrawBuffers()) { | |
6837 Framebuffer* framebuffer = | |
6838 framebuffer_state_.bound_draw_framebuffer.get(); | |
6839 if (framebuffer && framebuffer->ContainsActiveIntegerAttachments()) { | |
6840 LOCAL_SET_GL_ERROR( | |
6841 GL_INVALID_VALUE, "glClear", | |
6842 "Clear can't be called on integer buffers"); | |
6843 return error::kNoError; | |
6844 } | |
6845 } | |
Zhenyao Mo
2016/07/15 02:42:50
Have to take this out because it caused a lot of d
| |
6835 glClear(mask); | 6846 glClear(mask); |
6836 } | 6847 } |
6837 return error::kNoError; | 6848 return error::kNoError; |
6838 } | 6849 } |
6839 | 6850 |
6840 void GLES2DecoderImpl::DoClearBufferiv( | 6851 void GLES2DecoderImpl::DoClearBufferiv( |
6841 GLenum buffer, GLint drawbuffer, const GLint* value) { | 6852 GLenum buffer, GLint drawbuffer, const GLint* value) { |
6842 // TODO(zmo): Set clear_uncleared_images=true once crbug.com/584059 is fixed. | 6853 if (!CheckBoundDrawFramebufferValid("glClearBufferiv")) |
6843 if (!CheckBoundDrawFramebufferValid(false, "glClearBufferiv")) | |
6844 return; | 6854 return; |
6845 ApplyDirtyState(); | 6855 ApplyDirtyState(); |
6846 | 6856 |
6847 if (buffer == GL_COLOR) { | 6857 if (buffer == GL_COLOR) { |
6848 if (drawbuffer < 0 || | 6858 if (drawbuffer < 0 || |
6849 drawbuffer >= static_cast<GLint>(group_->max_draw_buffers())) { | 6859 drawbuffer >= static_cast<GLint>(group_->max_draw_buffers())) { |
6850 LOCAL_SET_GL_ERROR( | 6860 LOCAL_SET_GL_ERROR( |
6851 GL_INVALID_VALUE, "glClearBufferiv", "invalid drawBuffer"); | 6861 GL_INVALID_VALUE, "glClearBufferiv", "invalid drawBuffer"); |
6852 return; | 6862 return; |
6853 } | 6863 } |
(...skipping 13 matching lines...) Expand all Loading... | |
6867 if (!BoundFramebufferHasStencilAttachment()) { | 6877 if (!BoundFramebufferHasStencilAttachment()) { |
6868 return; | 6878 return; |
6869 } | 6879 } |
6870 } | 6880 } |
6871 MarkDrawBufferAsCleared(buffer, drawbuffer); | 6881 MarkDrawBufferAsCleared(buffer, drawbuffer); |
6872 glClearBufferiv(buffer, drawbuffer, value); | 6882 glClearBufferiv(buffer, drawbuffer, value); |
6873 } | 6883 } |
6874 | 6884 |
6875 void GLES2DecoderImpl::DoClearBufferuiv( | 6885 void GLES2DecoderImpl::DoClearBufferuiv( |
6876 GLenum buffer, GLint drawbuffer, const GLuint* value) { | 6886 GLenum buffer, GLint drawbuffer, const GLuint* value) { |
6877 // TODO(zmo): Set clear_uncleared_images=true once crbug.com/584059 is fixed. | 6887 if (!CheckBoundDrawFramebufferValid("glClearBufferuiv")) |
6878 if (!CheckBoundDrawFramebufferValid(false, "glClearBufferuiv")) | |
6879 return; | 6888 return; |
6880 ApplyDirtyState(); | 6889 ApplyDirtyState(); |
6881 | 6890 |
6882 if (drawbuffer < 0 || | 6891 if (drawbuffer < 0 || |
6883 drawbuffer >= static_cast<GLint>(group_->max_draw_buffers())) { | 6892 drawbuffer >= static_cast<GLint>(group_->max_draw_buffers())) { |
6884 LOCAL_SET_GL_ERROR( | 6893 LOCAL_SET_GL_ERROR( |
6885 GL_INVALID_VALUE, "glClearBufferuiv", "invalid drawBuffer"); | 6894 GL_INVALID_VALUE, "glClearBufferuiv", "invalid drawBuffer"); |
6886 return; | 6895 return; |
6887 } | 6896 } |
6888 GLenum internal_format = | 6897 GLenum internal_format = |
6889 GetBoundColorDrawBufferInternalFormat(drawbuffer); | 6898 GetBoundColorDrawBufferInternalFormat(drawbuffer); |
6890 if (!GLES2Util::IsUnsignedIntegerFormat(internal_format)) { | 6899 if (!GLES2Util::IsUnsignedIntegerFormat(internal_format)) { |
6891 // To avoid undefined results, return without calling the gl function. | 6900 // To avoid undefined results, return without calling the gl function. |
6892 return; | 6901 return; |
6893 } | 6902 } |
6894 MarkDrawBufferAsCleared(buffer, drawbuffer); | 6903 MarkDrawBufferAsCleared(buffer, drawbuffer); |
6895 glClearBufferuiv(buffer, drawbuffer, value); | 6904 glClearBufferuiv(buffer, drawbuffer, value); |
6896 } | 6905 } |
6897 | 6906 |
6898 void GLES2DecoderImpl::DoClearBufferfv( | 6907 void GLES2DecoderImpl::DoClearBufferfv( |
6899 GLenum buffer, GLint drawbuffer, const GLfloat* value) { | 6908 GLenum buffer, GLint drawbuffer, const GLfloat* value) { |
6900 // TODO(zmo): Set clear_uncleared_images=true once crbug.com/584059 is fixed. | 6909 if (!CheckBoundDrawFramebufferValid("glClearBufferfv")) |
6901 if (!CheckBoundDrawFramebufferValid(false, "glClearBufferfv")) | |
6902 return; | 6910 return; |
6903 ApplyDirtyState(); | 6911 ApplyDirtyState(); |
6904 | 6912 |
6905 if (buffer == GL_COLOR) { | 6913 if (buffer == GL_COLOR) { |
6906 if (drawbuffer < 0 || | 6914 if (drawbuffer < 0 || |
6907 drawbuffer >= static_cast<GLint>(group_->max_draw_buffers())) { | 6915 drawbuffer >= static_cast<GLint>(group_->max_draw_buffers())) { |
6908 LOCAL_SET_GL_ERROR( | 6916 LOCAL_SET_GL_ERROR( |
6909 GL_INVALID_VALUE, "glClearBufferfv", "invalid drawBuffer"); | 6917 GL_INVALID_VALUE, "glClearBufferfv", "invalid drawBuffer"); |
6910 return; | 6918 return; |
6911 } | 6919 } |
(...skipping 13 matching lines...) Expand all Loading... | |
6925 if (!BoundFramebufferHasDepthAttachment()) { | 6933 if (!BoundFramebufferHasDepthAttachment()) { |
6926 return; | 6934 return; |
6927 } | 6935 } |
6928 } | 6936 } |
6929 MarkDrawBufferAsCleared(buffer, drawbuffer); | 6937 MarkDrawBufferAsCleared(buffer, drawbuffer); |
6930 glClearBufferfv(buffer, drawbuffer, value); | 6938 glClearBufferfv(buffer, drawbuffer, value); |
6931 } | 6939 } |
6932 | 6940 |
6933 void GLES2DecoderImpl::DoClearBufferfi( | 6941 void GLES2DecoderImpl::DoClearBufferfi( |
6934 GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) { | 6942 GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) { |
6935 // TODO(zmo): Set clear_uncleared_images=true once crbug.com/584059 is fixed. | 6943 if (!CheckBoundDrawFramebufferValid("glClearBufferfi")) |
6936 if (!CheckBoundDrawFramebufferValid(false, "glClearBufferfi")) | |
6937 return; | 6944 return; |
6938 ApplyDirtyState(); | 6945 ApplyDirtyState(); |
6939 | 6946 |
6940 if (drawbuffer != 0) { | 6947 if (drawbuffer != 0) { |
6941 LOCAL_SET_GL_ERROR( | 6948 LOCAL_SET_GL_ERROR( |
6942 GL_INVALID_VALUE, "glClearBufferfi", "invalid drawBuffer"); | 6949 GL_INVALID_VALUE, "glClearBufferfi", "invalid drawBuffer"); |
6943 return; | 6950 return; |
6944 } | 6951 } |
6945 if (!BoundFramebufferHasDepthAttachment() && | 6952 if (!BoundFramebufferHasDepthAttachment() && |
6946 !BoundFramebufferHasStencilAttachment()) { | 6953 !BoundFramebufferHasStencilAttachment()) { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7059 | 7066 |
7060 GLbitfield clear_bits = 0; | 7067 GLbitfield clear_bits = 0; |
7061 bool reset_draw_buffers = false; | 7068 bool reset_draw_buffers = false; |
7062 if (framebuffer->HasUnclearedColorAttachments()) { | 7069 if (framebuffer->HasUnclearedColorAttachments()) { |
7063 // We should always use alpha == 0 here, because 1) some draw buffers may | 7070 // 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 | 7071 // 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. | 7072 // back buffer where alpha channel exists but is not requested. |
7066 glClearColor(0.0f, 0.0f, 0.0f, 0.0f); | 7073 glClearColor(0.0f, 0.0f, 0.0f, 0.0f); |
7067 state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); | 7074 state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); |
7068 clear_bits |= GL_COLOR_BUFFER_BIT; | 7075 clear_bits |= GL_COLOR_BUFFER_BIT; |
7069 if (feature_info_->feature_flags().ext_draw_buffers || | 7076 |
7070 feature_info_->IsES3Enabled()) { | 7077 if (SupportsDrawBuffers()) { |
7071 reset_draw_buffers = framebuffer->PrepareDrawBuffersForClear(); | 7078 reset_draw_buffers = |
7079 framebuffer->PrepareDrawBuffersForClearingUninitializedAttachments(); | |
7072 } | 7080 } |
7073 } | 7081 } |
7074 | 7082 |
7075 if (framebuffer->HasUnclearedAttachment(GL_STENCIL_ATTACHMENT) || | 7083 if (framebuffer->HasUnclearedAttachment(GL_STENCIL_ATTACHMENT) || |
7076 framebuffer->HasUnclearedAttachment(GL_DEPTH_STENCIL_ATTACHMENT)) { | 7084 framebuffer->HasUnclearedAttachment(GL_DEPTH_STENCIL_ATTACHMENT)) { |
7077 glClearStencil(0); | 7085 glClearStencil(0); |
7078 state_.SetDeviceStencilMaskSeparate(GL_FRONT, kDefaultStencilMask); | 7086 state_.SetDeviceStencilMaskSeparate(GL_FRONT, kDefaultStencilMask); |
7079 state_.SetDeviceStencilMaskSeparate(GL_BACK, kDefaultStencilMask); | 7087 state_.SetDeviceStencilMaskSeparate(GL_BACK, kDefaultStencilMask); |
7080 clear_bits |= GL_STENCIL_BUFFER_BIT; | 7088 clear_bits |= GL_STENCIL_BUFFER_BIT; |
7081 } | 7089 } |
(...skipping 11 matching lines...) Expand all Loading... | |
7093 // TODO(zmo): There is no guarantee that an FBO that is complete on the | 7101 // TODO(zmo): There is no guarantee that an FBO that is complete on the |
7094 // READ attachment will be complete as a DRAW attachment. | 7102 // READ attachment will be complete as a DRAW attachment. |
7095 glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, framebuffer->service_id()); | 7103 glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, framebuffer->service_id()); |
7096 } | 7104 } |
7097 state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, false); | 7105 state_.SetDeviceCapabilityState(GL_SCISSOR_TEST, false); |
7098 glClear(clear_bits); | 7106 glClear(clear_bits); |
7099 } | 7107 } |
7100 | 7108 |
7101 if (cleared_int_renderbuffers || clear_bits) { | 7109 if (cleared_int_renderbuffers || clear_bits) { |
7102 if (reset_draw_buffers) | 7110 if (reset_draw_buffers) |
7103 framebuffer->RestoreDrawBuffersAfterClear(); | 7111 framebuffer->RestoreDrawBuffers(); |
7104 RestoreClearState(); | 7112 RestoreClearState(); |
7105 if (target == GL_READ_FRAMEBUFFER && draw_framebuffer != framebuffer) { | 7113 if (target == GL_READ_FRAMEBUFFER && draw_framebuffer != framebuffer) { |
7106 GLuint service_id = draw_framebuffer ? draw_framebuffer->service_id() : | 7114 GLuint service_id = draw_framebuffer ? draw_framebuffer->service_id() : |
7107 GetBackbufferServiceId(); | 7115 GetBackbufferServiceId(); |
7108 glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, service_id); | 7116 glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, service_id); |
7109 } | 7117 } |
7110 } | 7118 } |
7111 | 7119 |
7112 framebuffer_manager()->MarkAttachmentsAsCleared( | 7120 framebuffer_manager()->MarkAttachmentsAsCleared( |
7113 framebuffer, renderbuffer_manager(), texture_manager()); | 7121 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]; | 8031 TextureUnit& texture_unit = state_.texture_units[texture_unit_index]; |
8024 TextureRef* texture_ref = | 8032 TextureRef* texture_ref = |
8025 texture_unit.GetInfoForSamplerType(uniform_info->type).get(); | 8033 texture_unit.GetInfoForSamplerType(uniform_info->type).get(); |
8026 if (attachment->IsTexture(texture_ref)) | 8034 if (attachment->IsTexture(texture_ref)) |
8027 return true; | 8035 return true; |
8028 } | 8036 } |
8029 } | 8037 } |
8030 return false; | 8038 return false; |
8031 } | 8039 } |
8032 | 8040 |
8041 bool GLES2DecoderImpl::SupportsDrawBuffers() const { | |
8042 switch (feature_info_->context_type()) { | |
8043 case CONTEXT_TYPE_OPENGLES2: | |
8044 case CONTEXT_TYPE_WEBGL1: | |
8045 return feature_info_->feature_flags().ext_draw_buffers; | |
8046 default: | |
8047 return true; | |
8048 } | |
8049 } | |
8050 | |
8051 bool GLES2DecoderImpl::ValidateAndAdjustDrawBuffers(const char* func_name) { | |
8052 if (!SupportsDrawBuffers()) { | |
8053 return true; | |
8054 } | |
8055 Framebuffer* framebuffer = framebuffer_state_.bound_draw_framebuffer.get(); | |
8056 if (!state_.current_program.get() || !framebuffer) { | |
8057 return true; | |
8058 } | |
8059 uint32_t fragment_output_type_mask = | |
8060 state_.current_program->fragment_output_type_mask(); | |
8061 uint32_t fragment_output_written_mask = | |
8062 state_.current_program->fragment_output_written_mask(); | |
8063 if (!framebuffer->ValidateAndAdjustDrawBuffers( | |
8064 fragment_output_type_mask, fragment_output_written_mask)) { | |
8065 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, func_name, | |
8066 "buffer format and fragment output variable type incompatible"); | |
8067 return false; | |
8068 } | |
8069 return true; | |
8070 } | |
8071 | |
8033 bool GLES2DecoderImpl::CheckUniformForApiType( | 8072 bool GLES2DecoderImpl::CheckUniformForApiType( |
8034 const Program::UniformInfo* info, | 8073 const Program::UniformInfo* info, |
8035 const char* function_name, | 8074 const char* function_name, |
8036 Program::UniformApiType api_type) { | 8075 Program::UniformApiType api_type) { |
8037 DCHECK(info); | 8076 DCHECK(info); |
8038 if ((api_type & info->accepts_api_type) == 0) { | 8077 if ((api_type & info->accepts_api_type) == 0) { |
8039 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name, | 8078 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name, |
8040 "wrong uniform function for type"); | 8079 "wrong uniform function for type"); |
8041 return false; | 8080 return false; |
8042 } | 8081 } |
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9009 return error::kNoError; | 9048 return error::kNoError; |
9010 } | 9049 } |
9011 if (count < 0) { | 9050 if (count < 0) { |
9012 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "count < 0"); | 9051 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "count < 0"); |
9013 return error::kNoError; | 9052 return error::kNoError; |
9014 } | 9053 } |
9015 if (primcount < 0) { | 9054 if (primcount < 0) { |
9016 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "primcount < 0"); | 9055 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "primcount < 0"); |
9017 return error::kNoError; | 9056 return error::kNoError; |
9018 } | 9057 } |
9019 if (!CheckBoundDrawFramebufferValid(true, function_name)) { | 9058 if (!CheckBoundDrawFramebufferValid(function_name)) { |
9020 return error::kNoError; | 9059 return error::kNoError; |
9021 } | 9060 } |
9022 // We have to check this here because the prototype for glDrawArrays | 9061 // We have to check this here because the prototype for glDrawArrays |
9023 // is GLint not GLsizei. | 9062 // is GLint not GLsizei. |
9024 if (first < 0) { | 9063 if (first < 0) { |
9025 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "first < 0"); | 9064 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "first < 0"); |
9026 return error::kNoError; | 9065 return error::kNoError; |
9027 } | 9066 } |
9028 | 9067 |
9029 if (state_.bound_transform_feedback.get() && | 9068 if (state_.bound_transform_feedback.get() && |
(...skipping 20 matching lines...) Expand all Loading... | |
9050 if (!SimulateAttrib0( | 9089 if (!SimulateAttrib0( |
9051 function_name, max_vertex_accessed, &simulated_attrib_0)) { | 9090 function_name, max_vertex_accessed, &simulated_attrib_0)) { |
9052 return error::kNoError; | 9091 return error::kNoError; |
9053 } | 9092 } |
9054 bool simulated_fixed_attribs = false; | 9093 bool simulated_fixed_attribs = false; |
9055 if (SimulateFixedAttribs( | 9094 if (SimulateFixedAttribs( |
9056 function_name, max_vertex_accessed, &simulated_fixed_attribs, | 9095 function_name, max_vertex_accessed, &simulated_fixed_attribs, |
9057 primcount)) { | 9096 primcount)) { |
9058 bool textures_set = !PrepareTexturesForRender(); | 9097 bool textures_set = !PrepareTexturesForRender(); |
9059 ApplyDirtyState(); | 9098 ApplyDirtyState(); |
9099 if (!ValidateAndAdjustDrawBuffers(function_name)) { | |
9100 return error::kNoError; | |
9101 } | |
9060 if (!instanced) { | 9102 if (!instanced) { |
9061 glDrawArrays(mode, first, count); | 9103 glDrawArrays(mode, first, count); |
9062 } else { | 9104 } else { |
9063 glDrawArraysInstancedANGLE(mode, first, count, primcount); | 9105 glDrawArraysInstancedANGLE(mode, first, count, primcount); |
9064 } | 9106 } |
9065 if (textures_set) { | 9107 if (textures_set) { |
9066 RestoreStateForTextures(); | 9108 RestoreStateForTextures(); |
9067 } | 9109 } |
9068 if (simulated_fixed_attribs) { | 9110 if (simulated_fixed_attribs) { |
9069 RestoreStateForSimulatedFixedAttribs(); | 9111 RestoreStateForSimulatedFixedAttribs(); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9137 } | 9179 } |
9138 if (!validators_->index_type.IsValid(type)) { | 9180 if (!validators_->index_type.IsValid(type)) { |
9139 LOCAL_SET_GL_ERROR_INVALID_ENUM(function_name, type, "type"); | 9181 LOCAL_SET_GL_ERROR_INVALID_ENUM(function_name, type, "type"); |
9140 return error::kNoError; | 9182 return error::kNoError; |
9141 } | 9183 } |
9142 if (primcount < 0) { | 9184 if (primcount < 0) { |
9143 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "primcount < 0"); | 9185 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, "primcount < 0"); |
9144 return error::kNoError; | 9186 return error::kNoError; |
9145 } | 9187 } |
9146 | 9188 |
9147 if (!CheckBoundDrawFramebufferValid(true, function_name)) { | 9189 if (!CheckBoundDrawFramebufferValid(function_name)) { |
9148 return error::kNoError; | 9190 return error::kNoError; |
9149 } | 9191 } |
9150 | 9192 |
9151 if (state_.bound_transform_feedback.get() && | 9193 if (state_.bound_transform_feedback.get() && |
9152 state_.bound_transform_feedback->active() && | 9194 state_.bound_transform_feedback->active() && |
9153 !state_.bound_transform_feedback->paused()) { | 9195 !state_.bound_transform_feedback->paused()) { |
9154 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name, | 9196 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name, |
9155 "transformfeedback is active and not paused"); | 9197 "transformfeedback is active and not paused"); |
9156 return error::kNoError; | 9198 return error::kNoError; |
9157 } | 9199 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9191 ApplyDirtyState(); | 9233 ApplyDirtyState(); |
9192 // TODO(gman): Refactor to hide these details in BufferManager or | 9234 // TODO(gman): Refactor to hide these details in BufferManager or |
9193 // VertexAttribManager. | 9235 // VertexAttribManager. |
9194 const GLvoid* indices = reinterpret_cast<const GLvoid*>(offset); | 9236 const GLvoid* indices = reinterpret_cast<const GLvoid*>(offset); |
9195 bool used_client_side_array = false; | 9237 bool used_client_side_array = false; |
9196 if (element_array_buffer->IsClientSideArray()) { | 9238 if (element_array_buffer->IsClientSideArray()) { |
9197 used_client_side_array = true; | 9239 used_client_side_array = true; |
9198 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); | 9240 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); |
9199 indices = element_array_buffer->GetRange(offset, 0); | 9241 indices = element_array_buffer->GetRange(offset, 0); |
9200 } | 9242 } |
9201 | 9243 if (!ValidateAndAdjustDrawBuffers(function_name)) { |
9244 return error::kNoError; | |
9245 } | |
9202 if (state_.enable_flags.primitive_restart_fixed_index && | 9246 if (state_.enable_flags.primitive_restart_fixed_index && |
9203 feature_info_->feature_flags(). | 9247 feature_info_->feature_flags(). |
9204 emulate_primitive_restart_fixed_index) { | 9248 emulate_primitive_restart_fixed_index) { |
9205 glEnable(GL_PRIMITIVE_RESTART); | 9249 glEnable(GL_PRIMITIVE_RESTART); |
9206 buffer_manager()->SetPrimitiveRestartFixedIndexIfNecessary(type); | 9250 buffer_manager()->SetPrimitiveRestartFixedIndexIfNecessary(type); |
9207 } | 9251 } |
9208 | |
9209 if (!instanced) { | 9252 if (!instanced) { |
9210 glDrawElements(mode, count, type, indices); | 9253 glDrawElements(mode, count, type, indices); |
9211 } else { | 9254 } else { |
9212 glDrawElementsInstancedANGLE(mode, count, type, indices, primcount); | 9255 glDrawElementsInstancedANGLE(mode, count, type, indices, primcount); |
9213 } | 9256 } |
9214 if (state_.enable_flags.primitive_restart_fixed_index && | 9257 if (state_.enable_flags.primitive_restart_fixed_index && |
9215 feature_info_->feature_flags(). | 9258 feature_info_->feature_flags(). |
9216 emulate_primitive_restart_fixed_index) { | 9259 emulate_primitive_restart_fixed_index) { |
9217 glDisable(GL_PRIMITIVE_RESTART); | 9260 glDisable(GL_PRIMITIVE_RESTART); |
9218 } | 9261 } |
9219 | |
9220 if (used_client_side_array) { | 9262 if (used_client_side_array) { |
9221 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, | 9263 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, |
9222 element_array_buffer->service_id()); | 9264 element_array_buffer->service_id()); |
9223 } | 9265 } |
9224 | |
9225 if (textures_set) { | 9266 if (textures_set) { |
9226 RestoreStateForTextures(); | 9267 RestoreStateForTextures(); |
9227 } | 9268 } |
9228 if (simulated_fixed_attribs) { | 9269 if (simulated_fixed_attribs) { |
9229 RestoreStateForSimulatedFixedAttribs(); | 9270 RestoreStateForSimulatedFixedAttribs(); |
9230 } | 9271 } |
9231 } | 9272 } |
9232 if (simulated_attrib_0) { | 9273 if (simulated_attrib_0) { |
9233 // We don't have to restore attrib 0 generic data at the end of this | 9274 // 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 | 9275 // function even if it is simulated. This is because we will simulate |
(...skipping 7472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
16707 GLuint mask = 0; | 16748 GLuint mask = 0; |
16708 if (!v.GetFillModeAndMask(c, &fill_mode, &mask)) | 16749 if (!v.GetFillModeAndMask(c, &fill_mode, &mask)) |
16709 return v.error(); | 16750 return v.error(); |
16710 GLuint service_id = 0; | 16751 GLuint service_id = 0; |
16711 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) { | 16752 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) { |
16712 // "If /path/ does not name an existing path object, the command does | 16753 // "If /path/ does not name an existing path object, the command does |
16713 // nothing (and no error is generated)." | 16754 // nothing (and no error is generated)." |
16714 // This holds for other rendering functions, too. | 16755 // This holds for other rendering functions, too. |
16715 return error::kNoError; | 16756 return error::kNoError; |
16716 } | 16757 } |
16717 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16758 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16718 return error::kNoError; | 16759 return error::kNoError; |
16719 ApplyDirtyState(); | 16760 ApplyDirtyState(); |
16720 glStencilFillPathNV(service_id, fill_mode, mask); | 16761 glStencilFillPathNV(service_id, fill_mode, mask); |
16721 return error::kNoError; | 16762 return error::kNoError; |
16722 } | 16763 } |
16723 | 16764 |
16724 error::Error GLES2DecoderImpl::HandleStencilStrokePathCHROMIUM( | 16765 error::Error GLES2DecoderImpl::HandleStencilStrokePathCHROMIUM( |
16725 uint32_t immediate_data_size, | 16766 uint32_t immediate_data_size, |
16726 const void* cmd_data) { | 16767 const void* cmd_data) { |
16727 static const char kFunctionName[] = "glStencilStrokePathCHROMIUM"; | 16768 static const char kFunctionName[] = "glStencilStrokePathCHROMIUM"; |
16728 const gles2::cmds::StencilStrokePathCHROMIUM& c = | 16769 const gles2::cmds::StencilStrokePathCHROMIUM& c = |
16729 *static_cast<const gles2::cmds::StencilStrokePathCHROMIUM*>(cmd_data); | 16770 *static_cast<const gles2::cmds::StencilStrokePathCHROMIUM*>(cmd_data); |
16730 if (!features().chromium_path_rendering) | 16771 if (!features().chromium_path_rendering) |
16731 return error::kUnknownCommand; | 16772 return error::kUnknownCommand; |
16732 | 16773 |
16733 GLuint service_id = 0; | 16774 GLuint service_id = 0; |
16734 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) { | 16775 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) { |
16735 return error::kNoError; | 16776 return error::kNoError; |
16736 } | 16777 } |
16737 GLint reference = static_cast<GLint>(c.reference); | 16778 GLint reference = static_cast<GLint>(c.reference); |
16738 GLuint mask = static_cast<GLuint>(c.mask); | 16779 GLuint mask = static_cast<GLuint>(c.mask); |
16739 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16780 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16740 return error::kNoError; | 16781 return error::kNoError; |
16741 ApplyDirtyState(); | 16782 ApplyDirtyState(); |
16742 glStencilStrokePathNV(service_id, reference, mask); | 16783 glStencilStrokePathNV(service_id, reference, mask); |
16743 return error::kNoError; | 16784 return error::kNoError; |
16744 } | 16785 } |
16745 | 16786 |
16746 error::Error GLES2DecoderImpl::HandleCoverFillPathCHROMIUM( | 16787 error::Error GLES2DecoderImpl::HandleCoverFillPathCHROMIUM( |
16747 uint32_t immediate_data_size, | 16788 uint32_t immediate_data_size, |
16748 const void* cmd_data) { | 16789 const void* cmd_data) { |
16749 static const char kFunctionName[] = "glCoverFillPathCHROMIUM"; | 16790 static const char kFunctionName[] = "glCoverFillPathCHROMIUM"; |
16750 const gles2::cmds::CoverFillPathCHROMIUM& c = | 16791 const gles2::cmds::CoverFillPathCHROMIUM& c = |
16751 *static_cast<const gles2::cmds::CoverFillPathCHROMIUM*>(cmd_data); | 16792 *static_cast<const gles2::cmds::CoverFillPathCHROMIUM*>(cmd_data); |
16752 if (!features().chromium_path_rendering) | 16793 if (!features().chromium_path_rendering) |
16753 return error::kUnknownCommand; | 16794 return error::kUnknownCommand; |
16754 | 16795 |
16755 PathCommandValidatorContext v(this, kFunctionName); | 16796 PathCommandValidatorContext v(this, kFunctionName); |
16756 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; | 16797 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; |
16757 if (!v.GetCoverMode(c, &cover_mode)) | 16798 if (!v.GetCoverMode(c, &cover_mode)) |
16758 return v.error(); | 16799 return v.error(); |
16759 | 16800 |
16760 GLuint service_id = 0; | 16801 GLuint service_id = 0; |
16761 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) | 16802 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) |
16762 return error::kNoError; | 16803 return error::kNoError; |
16763 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16804 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16764 return error::kNoError; | 16805 return error::kNoError; |
16765 ApplyDirtyState(); | 16806 ApplyDirtyState(); |
16766 glCoverFillPathNV(service_id, cover_mode); | 16807 glCoverFillPathNV(service_id, cover_mode); |
16767 return error::kNoError; | 16808 return error::kNoError; |
16768 } | 16809 } |
16769 | 16810 |
16770 error::Error GLES2DecoderImpl::HandleCoverStrokePathCHROMIUM( | 16811 error::Error GLES2DecoderImpl::HandleCoverStrokePathCHROMIUM( |
16771 uint32_t immediate_data_size, | 16812 uint32_t immediate_data_size, |
16772 const void* cmd_data) { | 16813 const void* cmd_data) { |
16773 static const char kFunctionName[] = "glCoverStrokePathCHROMIUM"; | 16814 static const char kFunctionName[] = "glCoverStrokePathCHROMIUM"; |
16774 const gles2::cmds::CoverStrokePathCHROMIUM& c = | 16815 const gles2::cmds::CoverStrokePathCHROMIUM& c = |
16775 *static_cast<const gles2::cmds::CoverStrokePathCHROMIUM*>(cmd_data); | 16816 *static_cast<const gles2::cmds::CoverStrokePathCHROMIUM*>(cmd_data); |
16776 if (!features().chromium_path_rendering) | 16817 if (!features().chromium_path_rendering) |
16777 return error::kUnknownCommand; | 16818 return error::kUnknownCommand; |
16778 | 16819 |
16779 PathCommandValidatorContext v(this, kFunctionName); | 16820 PathCommandValidatorContext v(this, kFunctionName); |
16780 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; | 16821 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; |
16781 if (!v.GetCoverMode(c, &cover_mode)) | 16822 if (!v.GetCoverMode(c, &cover_mode)) |
16782 return v.error(); | 16823 return v.error(); |
16783 | 16824 |
16784 GLuint service_id = 0; | 16825 GLuint service_id = 0; |
16785 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) | 16826 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) |
16786 return error::kNoError; | 16827 return error::kNoError; |
16787 | 16828 |
16788 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16829 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16789 return error::kNoError; | 16830 return error::kNoError; |
16790 ApplyDirtyState(); | 16831 ApplyDirtyState(); |
16791 glCoverStrokePathNV(service_id, cover_mode); | 16832 glCoverStrokePathNV(service_id, cover_mode); |
16792 return error::kNoError; | 16833 return error::kNoError; |
16793 } | 16834 } |
16794 | 16835 |
16795 error::Error GLES2DecoderImpl::HandleStencilThenCoverFillPathCHROMIUM( | 16836 error::Error GLES2DecoderImpl::HandleStencilThenCoverFillPathCHROMIUM( |
16796 uint32_t immediate_data_size, | 16837 uint32_t immediate_data_size, |
16797 const void* cmd_data) { | 16838 const void* cmd_data) { |
16798 static const char kFunctionName[] = "glStencilThenCoverFillPathCHROMIUM"; | 16839 static const char kFunctionName[] = "glStencilThenCoverFillPathCHROMIUM"; |
16799 const gles2::cmds::StencilThenCoverFillPathCHROMIUM& c = | 16840 const gles2::cmds::StencilThenCoverFillPathCHROMIUM& c = |
16800 *static_cast<const gles2::cmds::StencilThenCoverFillPathCHROMIUM*>( | 16841 *static_cast<const gles2::cmds::StencilThenCoverFillPathCHROMIUM*>( |
16801 cmd_data); | 16842 cmd_data); |
16802 if (!features().chromium_path_rendering) | 16843 if (!features().chromium_path_rendering) |
16803 return error::kUnknownCommand; | 16844 return error::kUnknownCommand; |
16804 | 16845 |
16805 PathCommandValidatorContext v(this, kFunctionName); | 16846 PathCommandValidatorContext v(this, kFunctionName); |
16806 GLenum fill_mode = GL_COUNT_UP_CHROMIUM; | 16847 GLenum fill_mode = GL_COUNT_UP_CHROMIUM; |
16807 GLuint mask = 0; | 16848 GLuint mask = 0; |
16808 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; | 16849 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; |
16809 if (!v.GetFillModeAndMask(c, &fill_mode, &mask) || | 16850 if (!v.GetFillModeAndMask(c, &fill_mode, &mask) || |
16810 !v.GetCoverMode(c, &cover_mode)) | 16851 !v.GetCoverMode(c, &cover_mode)) |
16811 return v.error(); | 16852 return v.error(); |
16812 | 16853 |
16813 GLuint service_id = 0; | 16854 GLuint service_id = 0; |
16814 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) | 16855 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) |
16815 return error::kNoError; | 16856 return error::kNoError; |
16816 | 16857 |
16817 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16858 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16818 return error::kNoError; | 16859 return error::kNoError; |
16819 ApplyDirtyState(); | 16860 ApplyDirtyState(); |
16820 glStencilThenCoverFillPathNV(service_id, fill_mode, mask, cover_mode); | 16861 glStencilThenCoverFillPathNV(service_id, fill_mode, mask, cover_mode); |
16821 return error::kNoError; | 16862 return error::kNoError; |
16822 } | 16863 } |
16823 | 16864 |
16824 error::Error GLES2DecoderImpl::HandleStencilThenCoverStrokePathCHROMIUM( | 16865 error::Error GLES2DecoderImpl::HandleStencilThenCoverStrokePathCHROMIUM( |
16825 uint32_t immediate_data_size, | 16866 uint32_t immediate_data_size, |
16826 const void* cmd_data) { | 16867 const void* cmd_data) { |
16827 static const char kFunctionName[] = "glStencilThenCoverStrokePathCHROMIUM"; | 16868 static const char kFunctionName[] = "glStencilThenCoverStrokePathCHROMIUM"; |
16828 const gles2::cmds::StencilThenCoverStrokePathCHROMIUM& c = | 16869 const gles2::cmds::StencilThenCoverStrokePathCHROMIUM& c = |
16829 *static_cast<const gles2::cmds::StencilThenCoverStrokePathCHROMIUM*>( | 16870 *static_cast<const gles2::cmds::StencilThenCoverStrokePathCHROMIUM*>( |
16830 cmd_data); | 16871 cmd_data); |
16831 if (!features().chromium_path_rendering) | 16872 if (!features().chromium_path_rendering) |
16832 return error::kUnknownCommand; | 16873 return error::kUnknownCommand; |
16833 | 16874 |
16834 PathCommandValidatorContext v(this, kFunctionName); | 16875 PathCommandValidatorContext v(this, kFunctionName); |
16835 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; | 16876 GLenum cover_mode = GL_BOUNDING_BOX_CHROMIUM; |
16836 if (!v.GetCoverMode(c, &cover_mode)) | 16877 if (!v.GetCoverMode(c, &cover_mode)) |
16837 return v.error(); | 16878 return v.error(); |
16838 | 16879 |
16839 GLuint service_id = 0; | 16880 GLuint service_id = 0; |
16840 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) | 16881 if (!path_manager()->GetPath(static_cast<GLuint>(c.path), &service_id)) |
16841 return error::kNoError; | 16882 return error::kNoError; |
16842 | 16883 |
16843 GLint reference = static_cast<GLint>(c.reference); | 16884 GLint reference = static_cast<GLint>(c.reference); |
16844 GLuint mask = static_cast<GLuint>(c.mask); | 16885 GLuint mask = static_cast<GLuint>(c.mask); |
16845 | 16886 |
16846 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16887 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16847 return error::kNoError; | 16888 return error::kNoError; |
16848 ApplyDirtyState(); | 16889 ApplyDirtyState(); |
16849 glStencilThenCoverStrokePathNV(service_id, reference, mask, cover_mode); | 16890 glStencilThenCoverStrokePathNV(service_id, reference, mask, cover_mode); |
16850 return error::kNoError; | 16891 return error::kNoError; |
16851 } | 16892 } |
16852 | 16893 |
16853 error::Error GLES2DecoderImpl::HandleStencilFillPathInstancedCHROMIUM( | 16894 error::Error GLES2DecoderImpl::HandleStencilFillPathInstancedCHROMIUM( |
16854 uint32_t immediate_data_size, | 16895 uint32_t immediate_data_size, |
16855 const void* cmd_data) { | 16896 const void* cmd_data) { |
16856 static const char kFunctionName[] = "glStencilFillPathInstancedCHROMIUM"; | 16897 static const char kFunctionName[] = "glStencilFillPathInstancedCHROMIUM"; |
(...skipping 18 matching lines...) Expand all Loading... | |
16875 return error::kNoError; | 16916 return error::kNoError; |
16876 | 16917 |
16877 std::unique_ptr<GLuint[]> paths; | 16918 std::unique_ptr<GLuint[]> paths; |
16878 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) | 16919 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) |
16879 return v.error(); | 16920 return v.error(); |
16880 | 16921 |
16881 const GLfloat* transforms = nullptr; | 16922 const GLfloat* transforms = nullptr; |
16882 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) | 16923 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) |
16883 return v.error(); | 16924 return v.error(); |
16884 | 16925 |
16885 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16926 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16886 return error::kNoError; | 16927 return error::kNoError; |
16887 ApplyDirtyState(); | 16928 ApplyDirtyState(); |
16888 glStencilFillPathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, | 16929 glStencilFillPathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, |
16889 fill_mode, mask, transform_type, transforms); | 16930 fill_mode, mask, transform_type, transforms); |
16890 return error::kNoError; | 16931 return error::kNoError; |
16891 } | 16932 } |
16892 | 16933 |
16893 error::Error GLES2DecoderImpl::HandleStencilStrokePathInstancedCHROMIUM( | 16934 error::Error GLES2DecoderImpl::HandleStencilStrokePathInstancedCHROMIUM( |
16894 uint32_t immediate_data_size, | 16935 uint32_t immediate_data_size, |
16895 const void* cmd_data) { | 16936 const void* cmd_data) { |
(...skipping 18 matching lines...) Expand all Loading... | |
16914 std::unique_ptr<GLuint[]> paths; | 16955 std::unique_ptr<GLuint[]> paths; |
16915 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) | 16956 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) |
16916 return v.error(); | 16957 return v.error(); |
16917 | 16958 |
16918 const GLfloat* transforms = nullptr; | 16959 const GLfloat* transforms = nullptr; |
16919 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) | 16960 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) |
16920 return v.error(); | 16961 return v.error(); |
16921 | 16962 |
16922 GLint reference = static_cast<GLint>(c.reference); | 16963 GLint reference = static_cast<GLint>(c.reference); |
16923 GLuint mask = static_cast<GLuint>(c.mask); | 16964 GLuint mask = static_cast<GLuint>(c.mask); |
16924 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 16965 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16925 return error::kNoError; | 16966 return error::kNoError; |
16926 ApplyDirtyState(); | 16967 ApplyDirtyState(); |
16927 glStencilStrokePathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, | 16968 glStencilStrokePathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, |
16928 reference, mask, transform_type, transforms); | 16969 reference, mask, transform_type, transforms); |
16929 return error::kNoError; | 16970 return error::kNoError; |
16930 } | 16971 } |
16931 | 16972 |
16932 error::Error GLES2DecoderImpl::HandleCoverFillPathInstancedCHROMIUM( | 16973 error::Error GLES2DecoderImpl::HandleCoverFillPathInstancedCHROMIUM( |
16933 uint32_t immediate_data_size, | 16974 uint32_t immediate_data_size, |
16934 const void* cmd_data) { | 16975 const void* cmd_data) { |
(...skipping 18 matching lines...) Expand all Loading... | |
16953 return error::kNoError; | 16994 return error::kNoError; |
16954 | 16995 |
16955 std::unique_ptr<GLuint[]> paths; | 16996 std::unique_ptr<GLuint[]> paths; |
16956 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) | 16997 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) |
16957 return v.error(); | 16998 return v.error(); |
16958 | 16999 |
16959 const GLfloat* transforms = nullptr; | 17000 const GLfloat* transforms = nullptr; |
16960 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) | 17001 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) |
16961 return v.error(); | 17002 return v.error(); |
16962 | 17003 |
16963 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 17004 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
16964 return error::kNoError; | 17005 return error::kNoError; |
16965 ApplyDirtyState(); | 17006 ApplyDirtyState(); |
16966 glCoverFillPathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, | 17007 glCoverFillPathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, |
16967 cover_mode, transform_type, transforms); | 17008 cover_mode, transform_type, transforms); |
16968 return error::kNoError; | 17009 return error::kNoError; |
16969 } | 17010 } |
16970 | 17011 |
16971 error::Error GLES2DecoderImpl::HandleCoverStrokePathInstancedCHROMIUM( | 17012 error::Error GLES2DecoderImpl::HandleCoverStrokePathInstancedCHROMIUM( |
16972 uint32_t immediate_data_size, | 17013 uint32_t immediate_data_size, |
16973 const void* cmd_data) { | 17014 const void* cmd_data) { |
(...skipping 18 matching lines...) Expand all Loading... | |
16992 return error::kNoError; | 17033 return error::kNoError; |
16993 | 17034 |
16994 std::unique_ptr<GLuint[]> paths; | 17035 std::unique_ptr<GLuint[]> paths; |
16995 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) | 17036 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) |
16996 return v.error(); | 17037 return v.error(); |
16997 | 17038 |
16998 const GLfloat* transforms = nullptr; | 17039 const GLfloat* transforms = nullptr; |
16999 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) | 17040 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) |
17000 return v.error(); | 17041 return v.error(); |
17001 | 17042 |
17002 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 17043 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
17003 return error::kNoError; | 17044 return error::kNoError; |
17004 ApplyDirtyState(); | 17045 ApplyDirtyState(); |
17005 glCoverStrokePathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, | 17046 glCoverStrokePathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), 0, |
17006 cover_mode, transform_type, transforms); | 17047 cover_mode, transform_type, transforms); |
17007 return error::kNoError; | 17048 return error::kNoError; |
17008 } | 17049 } |
17009 | 17050 |
17010 error::Error GLES2DecoderImpl::HandleStencilThenCoverFillPathInstancedCHROMIUM( | 17051 error::Error GLES2DecoderImpl::HandleStencilThenCoverFillPathInstancedCHROMIUM( |
17011 uint32_t immediate_data_size, | 17052 uint32_t immediate_data_size, |
17012 const void* cmd_data) { | 17053 const void* cmd_data) { |
(...skipping 23 matching lines...) Expand all Loading... | |
17036 return error::kNoError; | 17077 return error::kNoError; |
17037 | 17078 |
17038 std::unique_ptr<GLuint[]> paths; | 17079 std::unique_ptr<GLuint[]> paths; |
17039 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) | 17080 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) |
17040 return v.error(); | 17081 return v.error(); |
17041 | 17082 |
17042 const GLfloat* transforms = nullptr; | 17083 const GLfloat* transforms = nullptr; |
17043 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) | 17084 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) |
17044 return v.error(); | 17085 return v.error(); |
17045 | 17086 |
17046 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 17087 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
17047 return error::kNoError; | 17088 return error::kNoError; |
17048 ApplyDirtyState(); | 17089 ApplyDirtyState(); |
17049 glStencilThenCoverFillPathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), | 17090 glStencilThenCoverFillPathInstancedNV(num_paths, GL_UNSIGNED_INT, paths.get(), |
17050 0, fill_mode, mask, cover_mode, | 17091 0, fill_mode, mask, cover_mode, |
17051 transform_type, transforms); | 17092 transform_type, transforms); |
17052 return error::kNoError; | 17093 return error::kNoError; |
17053 } | 17094 } |
17054 | 17095 |
17055 error::Error | 17096 error::Error |
17056 GLES2DecoderImpl::HandleStencilThenCoverStrokePathInstancedCHROMIUM( | 17097 GLES2DecoderImpl::HandleStencilThenCoverStrokePathInstancedCHROMIUM( |
(...skipping 24 matching lines...) Expand all Loading... | |
17081 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) | 17122 if (!v.GetPathNameData(c, num_paths, path_name_type, &paths)) |
17082 return v.error(); | 17123 return v.error(); |
17083 | 17124 |
17084 const GLfloat* transforms = nullptr; | 17125 const GLfloat* transforms = nullptr; |
17085 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) | 17126 if (!v.GetTransforms(c, num_paths, transform_type, &transforms)) |
17086 return v.error(); | 17127 return v.error(); |
17087 | 17128 |
17088 GLint reference = static_cast<GLint>(c.reference); | 17129 GLint reference = static_cast<GLint>(c.reference); |
17089 GLuint mask = static_cast<GLuint>(c.mask); | 17130 GLuint mask = static_cast<GLuint>(c.mask); |
17090 | 17131 |
17091 if (!CheckBoundDrawFramebufferValid(true, kFunctionName)) | 17132 if (!CheckBoundDrawFramebufferValid(kFunctionName)) |
17092 return error::kNoError; | 17133 return error::kNoError; |
17093 ApplyDirtyState(); | 17134 ApplyDirtyState(); |
17094 glStencilThenCoverStrokePathInstancedNV( | 17135 glStencilThenCoverStrokePathInstancedNV( |
17095 num_paths, GL_UNSIGNED_INT, paths.get(), 0, reference, mask, cover_mode, | 17136 num_paths, GL_UNSIGNED_INT, paths.get(), 0, reference, mask, cover_mode, |
17096 transform_type, transforms); | 17137 transform_type, transforms); |
17097 return error::kNoError; | 17138 return error::kNoError; |
17098 } | 17139 } |
17099 | 17140 |
17100 void GLES2DecoderImpl::DoBindFragmentInputLocationCHROMIUM( | 17141 void GLES2DecoderImpl::DoBindFragmentInputLocationCHROMIUM( |
17101 GLuint program_id, | 17142 GLuint program_id, |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
17348 } | 17389 } |
17349 | 17390 |
17350 // Include the auto-generated part of this file. We split this because it means | 17391 // Include the auto-generated part of this file. We split this because it means |
17351 // we can easily edit the non-auto generated parts right here in this file | 17392 // we can easily edit the non-auto generated parts right here in this file |
17352 // instead of having to edit some template or the code generator. | 17393 // instead of having to edit some template or the code generator. |
17353 #include "base/macros.h" | 17394 #include "base/macros.h" |
17354 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 17395 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
17355 | 17396 |
17356 } // namespace gles2 | 17397 } // namespace gles2 |
17357 } // namespace gpu | 17398 } // namespace gpu |
OLD | NEW |