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 4677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4688 } | 4688 } |
4689 | 4689 |
4690 void GLES2DecoderImpl::DoUniform1iv( | 4690 void GLES2DecoderImpl::DoUniform1iv( |
4691 GLint fake_location, GLsizei count, const GLint *value) { | 4691 GLint fake_location, GLsizei count, const GLint *value) { |
4692 GLenum type = 0; | 4692 GLenum type = 0; |
4693 GLint real_location = -1; | 4693 GLint real_location = -1; |
4694 if (!PrepForSetUniformByLocation( | 4694 if (!PrepForSetUniformByLocation( |
4695 fake_location, "glUniform1iv", &real_location, &type, &count)) { | 4695 fake_location, "glUniform1iv", &real_location, &type, &count)) { |
4696 return; | 4696 return; |
4697 } | 4697 } |
4698 if (type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE || | 4698 if (type == GL_SAMPLER_2D || type == GL_SAMPLER_2D_RECT_ARB || |
4699 type == GL_SAMPLER_EXTERNAL_OES) { | 4699 type == GL_SAMPLER_CUBE || type == GL_SAMPLER_EXTERNAL_OES) { |
4700 if (!current_program_->SetSamplers( | 4700 if (!current_program_->SetSamplers( |
4701 group_->max_texture_units(), fake_location, count, value)) { | 4701 group_->max_texture_units(), fake_location, count, value)) { |
4702 SetGLError(GL_INVALID_VALUE, "glUniform1iv", "texture unit out of range"); | 4702 SetGLError(GL_INVALID_VALUE, "glUniform1iv", "texture unit out of range"); |
4703 return; | 4703 return; |
4704 } | 4704 } |
4705 } | 4705 } |
4706 glUniform1iv(real_location, count, value); | 4706 glUniform1iv(real_location, count, value); |
4707 } | 4707 } |
4708 | 4708 |
4709 void GLES2DecoderImpl::DoUniform1fv( | 4709 void GLES2DecoderImpl::DoUniform1fv( |
(...skipping 4298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9008 BindAndApplyTextureParameters(info); | 9008 BindAndApplyTextureParameters(info); |
9009 } | 9009 } |
9010 | 9010 |
9011 // Include the auto-generated part of this file. We split this because it means | 9011 // Include the auto-generated part of this file. We split this because it means |
9012 // we can easily edit the non-auto generated parts right here in this file | 9012 // we can easily edit the non-auto generated parts right here in this file |
9013 // instead of having to edit some template or the code generator. | 9013 // instead of having to edit some template or the code generator. |
9014 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 9014 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
9015 | 9015 |
9016 } // namespace gles2 | 9016 } // namespace gles2 |
9017 } // namespace gpu | 9017 } // namespace gpu |
OLD | NEW |