Skip to content

Commit

Permalink
Updated Khronos GLES2 headers. (Take 2, Original: https://codereview.…
Browse files Browse the repository at this point in the history
…chromium.org/99053007/)

There was a type conflict between the previous, out of date headers and the more
recent ones included in ANGLE that was causing failures on 64-bit Windows.

BUG=326382
TBR=kbr@chromium.org, piman@chromium.org, raymes@chromium.org, robertphillips@google.com

Review URL: https://codereview.chromium.org/115143004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242740 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
bajones@chromium.org committed Dec 30, 2013
1 parent 9dfed87 commit f4c7570
Show file tree
Hide file tree
Showing 13 changed files with 1,693 additions and 1,849 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ deps = {
"/trunk/deps/cdm@241073",

"src/third_party/mesa/src":
"/trunk/deps/third_party/mesa@229994",
"/trunk/deps/third_party/mesa@240938",

"src/third_party/cld_2/src":
(Var("googlecode_url") % "cld2") + "/trunk@84",
Expand Down
19 changes: 17 additions & 2 deletions gpu/command_buffer/build_gles2_cmd_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,17 @@
'GLclampf': 'float',
'GLvoid': 'void',
'GLfixed': 'int',
'GLclampx': 'int',
'GLclampx': 'int'
}

_GL_TYPES_32 = {
'GLintptr': 'long int',
'GLsizeiptr': 'long int',
'GLsizeiptr': 'long int'
}

_GL_TYPES_64 = {
'GLintptr': 'long long int',
'GLsizeiptr': 'long long int'
}

# Capabilites selected with glEnable
Expand Down Expand Up @@ -7600,6 +7608,13 @@ def WritePepperGLES2Interface(self, filename, dev):
file.Write("\n#ifndef __gl2_h_\n")
for (k, v) in _GL_TYPES.iteritems():
file.Write("typedef %s %s;\n" % (v, k))
file.Write("#ifdef _WIN64\n")
for (k, v) in _GL_TYPES_64.iteritems():
file.Write("typedef %s %s;\n" % (v, k))
file.Write("#else\n")
for (k, v) in _GL_TYPES_32.iteritems():
file.Write("typedef %s %s;\n" % (v, k))
file.Write("#endif // _WIN64\n")
file.Write("#endif // __gl2_h_\n\n")

for interface in self.pepper_interfaces:
Expand Down
6 changes: 3 additions & 3 deletions gpu/command_buffer/client/gles2_implementation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1228,13 +1228,13 @@ void GLES2Implementation::PixelStorei(GLenum pname, GLint param) {
case GL_UNPACK_ALIGNMENT:
unpack_alignment_ = param;
break;
case GL_UNPACK_ROW_LENGTH:
case GL_UNPACK_ROW_LENGTH_EXT:
unpack_row_length_ = param;
return;
case GL_UNPACK_SKIP_ROWS:
case GL_UNPACK_SKIP_ROWS_EXT:
unpack_skip_rows_ = param;
return;
case GL_UNPACK_SKIP_PIXELS:
case GL_UNPACK_SKIP_PIXELS_EXT:
unpack_skip_pixels_ = param;
return;
case GL_UNPACK_FLIP_Y_CHROMIUM:
Expand Down
6 changes: 3 additions & 3 deletions gpu/command_buffer/client/gles2_implementation_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2355,9 +2355,9 @@ TEST_F(GLES2ImplementationTest, SubImageUnpack) {

const void* commands = GetPut();
gl_->PixelStorei(GL_UNPACK_ALIGNMENT, alignment);
gl_->PixelStorei(GL_UNPACK_ROW_LENGTH, kSrcWidth);
gl_->PixelStorei(GL_UNPACK_SKIP_PIXELS, kSrcSubImageX0);
gl_->PixelStorei(GL_UNPACK_SKIP_ROWS, kSrcSubImageY0);
gl_->PixelStorei(GL_UNPACK_ROW_LENGTH_EXT, kSrcWidth);
gl_->PixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, kSrcSubImageX0);
gl_->PixelStorei(GL_UNPACK_SKIP_ROWS_EXT, kSrcSubImageY0);
gl_->PixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, flip_y);
if (sub) {
gl_->TexImage2D(
Expand Down
Loading

0 comments on commit f4c7570

Please sign in to comment.