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 <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 4665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4676 } | 4676 } |
4677 | 4677 |
4678 void GLES2DecoderImpl::DoUniform1iv( | 4678 void GLES2DecoderImpl::DoUniform1iv( |
4679 GLint fake_location, GLsizei count, const GLint *value) { | 4679 GLint fake_location, GLsizei count, const GLint *value) { |
4680 GLenum type = 0; | 4680 GLenum type = 0; |
4681 GLint real_location = -1; | 4681 GLint real_location = -1; |
4682 if (!PrepForSetUniformByLocation( | 4682 if (!PrepForSetUniformByLocation( |
4683 fake_location, "glUniform1iv", &real_location, &type, &count)) { | 4683 fake_location, "glUniform1iv", &real_location, &type, &count)) { |
4684 return; | 4684 return; |
4685 } | 4685 } |
4686 if (type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE || | 4686 if (type == GL_SAMPLER_2D || type == GL_SAMPLER_2D_RECT_ARB || |
4687 type == GL_SAMPLER_EXTERNAL_OES) { | 4687 type == GL_SAMPLER_CUBE || type == GL_SAMPLER_EXTERNAL_OES) { |
4688 if (!current_program_->SetSamplers( | 4688 if (!current_program_->SetSamplers( |
4689 group_->max_texture_units(), fake_location, count, value)) { | 4689 group_->max_texture_units(), fake_location, count, value)) { |
4690 SetGLError(GL_INVALID_VALUE, "glUniform1iv: texture unit out of range"); | 4690 SetGLError(GL_INVALID_VALUE, "glUniform1iv: texture unit out of range"); |
4691 return; | 4691 return; |
4692 } | 4692 } |
4693 } | 4693 } |
4694 glUniform1iv(real_location, count, value); | 4694 glUniform1iv(real_location, count, value); |
4695 } | 4695 } |
4696 | 4696 |
4697 void GLES2DecoderImpl::DoUniform1fv( | 4697 void GLES2DecoderImpl::DoUniform1fv( |
(...skipping 4030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8728 BindAndApplyTextureParameters(info); | 8728 BindAndApplyTextureParameters(info); |
8729 } | 8729 } |
8730 | 8730 |
8731 // Include the auto-generated part of this file. We split this because it means | 8731 // Include the auto-generated part of this file. We split this because it means |
8732 // we can easily edit the non-auto generated parts right here in this file | 8732 // we can easily edit the non-auto generated parts right here in this file |
8733 // instead of having to edit some template or the code generator. | 8733 // instead of having to edit some template or the code generator. |
8734 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 8734 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
8735 | 8735 |
8736 } // namespace gles2 | 8736 } // namespace gles2 |
8737 } // namespace gpu | 8737 } // namespace gpu |
OLD | NEW |