Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

Issue 1708983002: Command buffer: Fix bugs for drawing when the type of vertex attrib is a packed type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/common/gles2_cmd_utils.cc
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 0011053ad2d63e0892e809baf6c74e1feb57d83b..8d460ba06ad27e31859841c2752dfc8b864e48bb 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -816,9 +816,9 @@ size_t GLES2Util::GetGLTypeSizeForTexturesAndBuffers(uint32_t type) {
case GL_HALF_FLOAT:
return sizeof(GLushort); // NOLINT
case GL_INT_2_10_10_10_REV:
- return sizeof(GLint); // NOLINT
+ return sizeof(GLint) / 4; // NOLINT
case GL_UNSIGNED_INT_2_10_10_10_REV:
- return sizeof(GLuint); // NOLINT
+ return sizeof(GLuint) / 4; // NOLINT
yunchao 2016/02/18 14:47:55 the size of INT_2_10_10_10_REV and UNSIGNED_INT_2_
qiankun 2016/02/18 15:42:10 You should change the component count to 1 other t
Zhenyao Mo 2016/02/18 17:39:50 I agree with Qiankun. You can't change the return
yunchao 2016/02/19 00:03:10 No, the component_count should be 4, see the spec
yunchao 2016/02/19 00:34:31 Yes. these two types only have one element, but lo
Ken Russell (switch to Gerrit) 2016/02/19 18:54:51 The calling code will be incorrect in some cases i
Ken Russell (switch to Gerrit) 2016/02/23 22:56:00 If we are going to go forward with this change the
yunchao 2016/02/25 15:29:41 Done.
default:
return 0;
}
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698