summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authoryunchao.he <yunchao.he@intel.com>2015-12-29 18:33:16 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-30 02:34:01 +0000
commitc670faf42a716a6e1d66086b450612bf693aba14 (patch)
tree8a1192864d4bb42f3bbccc4f73ac224174597980 /gpu
parentbd4fab2d7da2657310f571960a12902c6da09f74 (diff)
downloadchromium_src-c670faf42a716a6e1d66086b450612bf693aba14.zip
chromium_src-c670faf42a716a6e1d66086b450612bf693aba14.tar.gz
chromium_src-c670faf42a716a6e1d66086b450612bf693aba14.tar.bz2
Command Buffer: add types for vertexAttribPointer against gles3. This change also generates
correct glErrors for vertexAttribPointer and vertexAttribIPointer to fix bugs in command buffer. BUG=429053 TEST=gpu_unittests Review URL: https://codereview.chromium.org/1546303002 Cr-Commit-Position: refs/heads/master@{#367136}
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils.cc6
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc10
2 files changed, 12 insertions, 4 deletions
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 787447a..86c0a7f 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -802,6 +802,12 @@ size_t GLES2Util::GetGLTypeSizeForTexturesAndBuffers(uint32_t type) {
return sizeof(GLfloat); // NOLINT
case GL_FIXED:
return sizeof(GLfixed); // NOLINT
+ case GL_HALF_FLOAT:
+ return sizeof(GLushort); // NOLINT
+ case GL_INT_2_10_10_10_REV:
+ return sizeof(GLint); // NOLINT
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ return sizeof(GLuint); // NOLINT
default:
return 0;
}
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 4ab92b2..a13cc92 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -8763,11 +8763,12 @@ error::Error GLES2DecoderImpl::HandleVertexAttribIPointer(
if (state_.vertex_attrib_manager.get() ==
state_.default_vertex_attrib_manager.get()) {
LOCAL_SET_GL_ERROR(
- GL_INVALID_VALUE, "glVertexAttribIPointer", "no array buffer bound");
+ GL_INVALID_OPERATION,
+ "glVertexAttribIPointer", "no array buffer bound");
return error::kNoError;
} else if (c.offset != 0) {
LOCAL_SET_GL_ERROR(
- GL_INVALID_VALUE,
+ GL_INVALID_OPERATION,
"glVertexAttribIPointer", "client side arrays are not allowed");
return error::kNoError;
}
@@ -8849,11 +8850,12 @@ error::Error GLES2DecoderImpl::HandleVertexAttribPointer(
if (state_.vertex_attrib_manager.get() ==
state_.default_vertex_attrib_manager.get()) {
LOCAL_SET_GL_ERROR(
- GL_INVALID_VALUE, "glVertexAttribPointer", "no array buffer bound");
+ GL_INVALID_OPERATION,
+ "glVertexAttribPointer", "no array buffer bound");
return error::kNoError;
} else if (c.offset != 0) {
LOCAL_SET_GL_ERROR(
- GL_INVALID_VALUE,
+ GL_INVALID_OPERATION,
"glVertexAttribPointer", "client side arrays are not allowed");
return error::kNoError;
}