summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils.cc2
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc4
-rw-r--r--gpu/command_buffer/service/program_manager.h4
3 files changed, 6 insertions, 4 deletions
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 9c10bb4..ea0bd73 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -497,6 +497,8 @@ uint32 GLES2Util::GetGLDataTypeSizeForUniforms(int type) {
return sizeof(GLfloat) * 4 * 4; // NOLINT
case GL_SAMPLER_2D:
return sizeof(GLint); // NOLINT
+ case GL_SAMPLER_2D_RECT_ARB:
+ return sizeof(GLint); // NOLINT
case GL_SAMPLER_CUBE:
return sizeof(GLint); // NOLINT
case GL_SAMPLER_EXTERNAL_OES:
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 31f6a8b..e53f1ee1 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -4695,8 +4695,8 @@ void GLES2DecoderImpl::DoUniform1iv(
fake_location, "glUniform1iv", &real_location, &type, &count)) {
return;
}
- if (type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE ||
- type == GL_SAMPLER_EXTERNAL_OES) {
+ if (type == GL_SAMPLER_2D || type == GL_SAMPLER_2D_RECT_ARB ||
+ type == GL_SAMPLER_CUBE || type == GL_SAMPLER_EXTERNAL_OES) {
if (!current_program_->SetSamplers(
group_->max_texture_units(), fake_location, count, value)) {
SetGLError(GL_INVALID_VALUE, "glUniform1iv", "texture unit out of range");
diff --git a/gpu/command_buffer/service/program_manager.h b/gpu/command_buffer/service/program_manager.h
index 650385c..553c313 100644
--- a/gpu/command_buffer/service/program_manager.h
+++ b/gpu/command_buffer/service/program_manager.h
@@ -42,8 +42,8 @@ class GPU_EXPORT ProgramManager {
~UniformInfo();
bool IsSampler() const {
- return type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE ||
- type == GL_SAMPLER_EXTERNAL_OES;
+ return type == GL_SAMPLER_2D || type == GL_SAMPLER_2D_RECT_ARB ||
+ type == GL_SAMPLER_CUBE || type == GL_SAMPLER_EXTERNAL_OES;
}
GLsizei size;