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

Side by Side 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 unified diff | Download patch
OLDNEW
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 // This file is here so other GLES2 related files can have a common set of 5 // This file is here so other GLES2 related files can have a common set of
6 // includes where appropriate. 6 // includes where appropriate.
7 7
8 #include <sstream> 8 #include <sstream>
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #include <GLES2/gl2ext.h> 10 #include <GLES2/gl2ext.h>
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 return sizeof(GLint); // NOLINT 809 return sizeof(GLint); // NOLINT
810 case GL_UNSIGNED_INT: 810 case GL_UNSIGNED_INT:
811 return sizeof(GLuint); // NOLINT 811 return sizeof(GLuint); // NOLINT
812 case GL_FLOAT: 812 case GL_FLOAT:
813 return sizeof(GLfloat); // NOLINT 813 return sizeof(GLfloat); // NOLINT
814 case GL_FIXED: 814 case GL_FIXED:
815 return sizeof(GLfixed); // NOLINT 815 return sizeof(GLfixed); // NOLINT
816 case GL_HALF_FLOAT: 816 case GL_HALF_FLOAT:
817 return sizeof(GLushort); // NOLINT 817 return sizeof(GLushort); // NOLINT
818 case GL_INT_2_10_10_10_REV: 818 case GL_INT_2_10_10_10_REV:
819 return sizeof(GLint); // NOLINT 819 return sizeof(GLint) / 4; // NOLINT
820 case GL_UNSIGNED_INT_2_10_10_10_REV: 820 case GL_UNSIGNED_INT_2_10_10_10_REV:
821 return sizeof(GLuint); // NOLINT 821 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.
822 default: 822 default:
823 return 0; 823 return 0;
824 } 824 }
825 } 825 }
826 826
827 size_t GLES2Util::GetComponentCountForGLTransformType(uint32_t type) { 827 size_t GLES2Util::GetComponentCountForGLTransformType(uint32_t type) {
828 switch (type) { 828 switch (type) {
829 case GL_TRANSLATE_X_CHROMIUM: 829 case GL_TRANSLATE_X_CHROMIUM:
830 case GL_TRANSLATE_Y_CHROMIUM: 830 case GL_TRANSLATE_Y_CHROMIUM:
831 return 1; 831 return 1;
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 } 1517 }
1518 1518
1519 return true; 1519 return true;
1520 } 1520 }
1521 1521
1522 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" 1522 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h"
1523 1523
1524 } // namespace gles2 1524 } // namespace gles2
1525 } // namespace gpu 1525 } // namespace gpu
1526 1526
OLDNEW
« 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