diff options
author | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-19 05:39:17 +0000 |
---|---|---|
committer | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-19 05:39:17 +0000 |
commit | 96fba197b33d6d831f5cfd2469202db4b6506557 (patch) | |
tree | 84987c766b9437b61de2df51e4f3314d525aceaa /gpu | |
parent | e6aa46992d11da1581f65c47e4f4c9bf81a27036 (diff) | |
download | chromium_src-96fba197b33d6d831f5cfd2469202db4b6506557.zip chromium_src-96fba197b33d6d831f5cfd2469202db4b6506557.tar.gz chromium_src-96fba197b33d6d831f5cfd2469202db4b6506557.tar.bz2 |
Revert r118240 - gles_2_c_lib as a component.
Broke compile on windows.
TBR=gman@chromium.org
BUG=107735
TEST=waterfall greens up again
Review URL: https://chromiumcodereview.appspot.com/9264003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118252 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rwxr-xr-x | gpu/command_buffer/build_gles2_cmd_buffer.py | 6 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_c_lib.cc | 9 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_c_lib_autogen.h | 6 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_c_lib_export.h | 26 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_cmd_helper_autogen.h | 2 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation_autogen.h | 4 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_lib.h | 14 | ||||
-rw-r--r-- | gpu/command_buffer/common/gles2_cmd_format_autogen.h | 8 | ||||
-rw-r--r-- | gpu/command_buffer/common/gles2_cmd_format_test_autogen.h | 6 | ||||
-rw-r--r-- | gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h | 6 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder_autogen.h | 7 | ||||
-rw-r--r-- | gpu/demos/demos.gyp | 3 | ||||
-rw-r--r-- | gpu/gles2_conform_support/gles2_conform_support.gyp | 3 | ||||
-rw-r--r-- | gpu/gpu.gyp | 15 |
14 files changed, 35 insertions, 80 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py index 258031f..e39e95d 100755 --- a/gpu/command_buffer/build_gles2_cmd_buffer.py +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py @@ -15,7 +15,7 @@ _SIZE_OF_UINT32 = 4 _SIZE_OF_COMMAND_HEADER = 4 _FIRST_SPECIFIC_COMMAND_ID = 256 -_LICENSE = """// Copyright (c) 2012 The Chromium Authors. All rights reserved. +_LICENSE = """// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -201,7 +201,7 @@ GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLintVer GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); GL_APICALL void GL_APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenumBlitFilter filter); GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenumRenderBufferTarget target, GLsizei samples, GLenumRenderBufferFormat internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenumTextureTarget target, GLsizei levels, GLenumTextureInternalFormatStorage internalFormat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenumTextureTarget target, GLsizei levels, GLintTextureInternalFormatStorage internalFormat, GLsizei width, GLsizei height); // Non-GL commands. GL_APICALL void GL_APIENTRY glSwapBuffers (void); GL_APICALL GLuint GL_APIENTRY glGetMaxValueInBufferCHROMIUM (GLidBuffer buffer_id, GLsizei count, GLenumGetMaxIndexType type, GLuint offset); @@ -6022,7 +6022,7 @@ class GLGenerator(object): """Writes the GLES2 c lib implementation.""" file = CHeaderWriter( filename, - "// These functions emulate GLES2 over command buffers.\n") + "// These functions emluate GLES2 over command buffers.\n") for func in self.original_functions: func.WriteGLES2CLibImplementation(file) diff --git a/gpu/command_buffer/client/gles2_c_lib.cc b/gpu/command_buffer/client/gles2_c_lib.cc index 0bed5f8..4e853c2 100644 --- a/gpu/command_buffer/client/gles2_c_lib.cc +++ b/gpu/command_buffer/client/gles2_c_lib.cc @@ -1,17 +1,12 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// These functions emulate GLES2 over command buffers for C. +// These functions emluate GLES2 over command buffers for C. #include <assert.h> #include "../client/gles2_lib.h" -#ifndef GL_GLEXT_PROTOTYPES -#define GL_GLEXT_PROTOTYPES -#endif -#include <GLES2/gl2ext.h> - extern "C" { // Include the auto-generated part of this file. We split this because it means // we can easily edit the non-auto generated parts right here in this file diff --git a/gpu/command_buffer/client/gles2_c_lib_autogen.h b/gpu/command_buffer/client/gles2_c_lib_autogen.h index 9cef90b..76dc082 100644 --- a/gpu/command_buffer/client/gles2_c_lib_autogen.h +++ b/gpu/command_buffer/client/gles2_c_lib_autogen.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,7 +6,7 @@ // gpu/command_buffer/build_gles2_cmd_buffer.py // DO NOT EDIT! -// These functions emulate GLES2 over command buffers. +// These functions emluate GLES2 over command buffers. #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_C_LIB_AUTOGEN_H_ #define GPU_COMMAND_BUFFER_CLIENT_GLES2_C_LIB_AUTOGEN_H_ @@ -515,7 +515,7 @@ void GLES2RenderbufferStorageMultisampleEXT( target, samples, internalformat, width, height); } void GLES2TexStorage2DEXT( - GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, + GLenum target, GLsizei levels, GLint internalFormat, GLsizei width, GLsizei height) { gles2::GetGLContext()->TexStorage2DEXT( target, levels, internalFormat, width, height); diff --git a/gpu/command_buffer/client/gles2_c_lib_export.h b/gpu/command_buffer/client/gles2_c_lib_export.h deleted file mode 100644 index bccad52..0000000 --- a/gpu/command_buffer/client/gles2_c_lib_export.h +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_C_LIB_EXPORT_H_ -#define GPU_COMMAND_BUFFER_CLIENT_GLES2_C_LIB_EXPORT_H_ -#pragma once - -#if defined(COMPONENT_BUILD) -#if defined(WIN32) - -#if defined(GLES2_C_LIB_IMPLEMENTATION) -#define GLES2_C_LIB_EXPORT __declspec(dllexport) -#else -#define GLES2_C_LIB_EXPORT __declspec(dllimport) -#endif // defined(GLES2_C_LIB_IMPLEMENTATION) - -#else // defined(WIN32) -#define GLES2_C_LIB_EXPORT __attribute__((visibility("default"))) -#endif - -#else // defined(COMPONENT_BUILD) -#define GLES2_C_LIB_EXPORT -#endif - -#endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_C_LIB_EXPORT_H_ diff --git a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h index e01be22..9ba4763 100644 --- a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h +++ b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h @@ -1516,7 +1516,7 @@ } void TexStorage2DEXT( - GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, + GLenum target, GLsizei levels, GLint internalFormat, GLsizei width, GLsizei height) { gles2::TexStorage2DEXT* c = GetCmdSpace<gles2::TexStorage2DEXT>(); if (c) { diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h index 6686a0a..f039b98 100644 --- a/gpu/command_buffer/client/gles2_implementation_autogen.h +++ b/gpu/command_buffer/client/gles2_implementation_autogen.h @@ -1390,10 +1390,10 @@ void RenderbufferStorageMultisampleEXT( } void TexStorage2DEXT( - GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, + GLenum target, GLsizei levels, GLint internalFormat, GLsizei width, GLsizei height) { GPU_CLIENT_SINGLE_THREAD_CHECK(); - GPU_CLIENT_LOG("[" << this << "] glTexStorage2DEXT(" << GLES2Util::GetStringTextureTarget(target) << ", " << levels << ", " << GLES2Util::GetStringTextureInternalFormatStorage(internalFormat) << ", " << width << ", " << height << ")"); // NOLINT + GPU_CLIENT_LOG("[" << this << "] glTexStorage2DEXT(" << GLES2Util::GetStringTextureTarget(target) << ", " << levels << ", " << internalFormat << ", " << width << ", " << height << ")"); // NOLINT if (levels < 0) { SetGLError(GL_INVALID_VALUE, "glTexStorage2DEXT: levels < 0"); return; diff --git a/gpu/command_buffer/client/gles2_lib.h b/gpu/command_buffer/client/gles2_lib.h index 75ab989..799cd4e 100644 --- a/gpu/command_buffer/client/gles2_lib.h +++ b/gpu/command_buffer/client/gles2_lib.h @@ -1,29 +1,27 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// These functions emulate GLES2 over command buffers. +// These functions emluate GLES2 over command buffers. #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_LIB_H_ #define GPU_COMMAND_BUFFER_CLIENT_GLES2_LIB_H_ -#include "gpu/command_buffer/client/gles2_c_lib_export.h" - #include "../client/gles2_implementation.h" namespace gles2 { // Initialize the GLES2 library. -GLES2_C_LIB_EXPORT void Initialize(); +void Initialize(); // Terminate the GLES2 library. -GLES2_C_LIB_EXPORT void Terminate(); +void Terminate(); // Get the current GL context. -GLES2_C_LIB_EXPORT gpu::gles2::GLES2Implementation* GetGLContext(); +gpu::gles2::GLES2Implementation* GetGLContext(); // Set the current GL context. -GLES2_C_LIB_EXPORT void SetGLContext(gpu::gles2::GLES2Implementation* impl); +void SetGLContext(gpu::gles2::GLES2Implementation* impl); } // namespace gles2 diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h index b86740f..fd82bea 100644 --- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -8482,7 +8482,7 @@ struct TexStorage2DEXT { } void Init( - GLenum _target, GLsizei _levels, GLenum _internalFormat, GLsizei _width, + GLenum _target, GLsizei _levels, GLint _internalFormat, GLsizei _width, GLsizei _height) { SetHeader(); target = _target; @@ -8493,7 +8493,7 @@ struct TexStorage2DEXT { } void* Set( - void* cmd, GLenum _target, GLsizei _levels, GLenum _internalFormat, + void* cmd, GLenum _target, GLsizei _levels, GLint _internalFormat, GLsizei _width, GLsizei _height) { static_cast<ValueType*>( cmd)->Init(_target, _levels, _internalFormat, _width, _height); @@ -8503,7 +8503,7 @@ struct TexStorage2DEXT { gpu::CommandHeader header; uint32 target; int32 levels; - uint32 internalFormat; + int32 internalFormat; int32 width; int32 height; }; diff --git a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h index b7d8705..1873878 100644 --- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -3303,7 +3303,7 @@ TEST_F(GLES2FormatTest, TexStorage2DEXT) { &cmd, static_cast<GLenum>(11), static_cast<GLsizei>(12), - static_cast<GLenum>(13), + static_cast<GLint>(13), static_cast<GLsizei>(14), static_cast<GLsizei>(15)); EXPECT_EQ(static_cast<uint32>(TexStorage2DEXT::kCmdId), @@ -3311,7 +3311,7 @@ TEST_F(GLES2FormatTest, TexStorage2DEXT) { EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<GLenum>(11), cmd.target); EXPECT_EQ(static_cast<GLsizei>(12), cmd.levels); - EXPECT_EQ(static_cast<GLenum>(13), cmd.internalFormat); + EXPECT_EQ(static_cast<GLint>(13), cmd.internalFormat); EXPECT_EQ(static_cast<GLsizei>(14), cmd.width); EXPECT_EQ(static_cast<GLsizei>(15), cmd.height); CheckBytesWrittenMatchesExpectedSize( diff --git a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h index 1ce0b87..8433c1d 100644 --- a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -205,7 +205,7 @@ static GLES2Util::EnumToString enum_to_string_table[] = { { 0x00000400, "GL_STENCIL_BUFFER_BIT", }, { 0x800A, "GL_FUNC_SUBTRACT", }, { 0x8E2C, "GL_DEPTH_COMPONENT16_NONLINEAR_NV", }, - { 0x8508, "GL_DECR_WRAP", }, + { 0x889F, "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", }, { 0x8006, "GL_FUNC_ADD", }, { 0x8007, "GL_MIN_EXT", }, { 0x8004, "GL_ONE_MINUS_CONSTANT_ALPHA", }, @@ -465,7 +465,7 @@ static GLES2Util::EnumToString enum_to_string_table[] = { { 0x8CE4, "GL_COLOR_ATTACHMENT4_NV", }, { 0x8CD6, "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT", }, { 0x8872, "GL_MAX_TEXTURE_IMAGE_UNITS", }, - { 0x889F, "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", }, + { 0x8508, "GL_DECR_WRAP", }, { 0x8507, "GL_INCR_WRAP", }, { 0x8895, "GL_ELEMENT_ARRAY_BUFFER_BINDING", }, { 0x8894, "GL_ARRAY_BUFFER_BINDING", }, diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h index d36f425..5c06a57 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -2546,7 +2546,7 @@ error::Error GLES2DecoderImpl::HandleTexStorage2DEXT( uint32 immediate_data_size, const gles2::TexStorage2DEXT& c) { GLenum target = static_cast<GLenum>(c.target); GLsizei levels = static_cast<GLsizei>(c.levels); - GLenum internalFormat = static_cast<GLenum>(c.internalFormat); + GLint internalFormat = static_cast<GLint>(c.internalFormat); GLsizei width = static_cast<GLsizei>(c.width); GLsizei height = static_cast<GLsizei>(c.height); if (!validators_->texture_target.IsValid(target)) { @@ -2559,7 +2559,8 @@ error::Error GLES2DecoderImpl::HandleTexStorage2DEXT( } if (!validators_->texture_internal_format_storage.IsValid(internalFormat)) { SetGLError( - GL_INVALID_ENUM, "glTexStorage2DEXT: internalFormat GL_INVALID_ENUM"); + GL_INVALID_VALUE, + "glTexStorage2DEXT: internalFormat GL_INVALID_VALUE"); return error::kNoError; } if (width < 0) { diff --git a/gpu/demos/demos.gyp b/gpu/demos/demos.gyp index 59800c8c..6292564 100644 --- a/gpu/demos/demos.gyp +++ b/gpu/demos/demos.gyp @@ -1,4 +1,4 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -41,7 +41,6 @@ 'gpu_demo_framework', '../gpu.gyp:command_buffer_client', '../gpu.gyp:command_buffer_service', - '../gpu.gyp:gles2_implementation', '../../base/base.gyp:base', '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../../ui/ui.gyp:ui', diff --git a/gpu/gles2_conform_support/gles2_conform_support.gyp b/gpu/gles2_conform_support/gles2_conform_support.gyp index 2341657..c9881d7 100644 --- a/gpu/gles2_conform_support/gles2_conform_support.gyp +++ b/gpu/gles2_conform_support/gles2_conform_support.gyp @@ -1,4 +1,4 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -31,7 +31,6 @@ 'type': 'static_library', 'dependencies': [ '<(DEPTH)/base/base.gyp:base', - '<(DEPTH)/gpu/gpu.gyp:gles2_implementation', '<(DEPTH)/gpu/gpu.gyp:command_buffer_service', ], 'include_dirs': ['<(DEPTH)/third_party/khronos'], diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp index bc2395d..983285a 100644 --- a/gpu/gpu.gyp +++ b/gpu/gpu.gyp @@ -11,7 +11,6 @@ 'gles2_c_lib_source_files': [ 'command_buffer/client/gles2_c_lib.cc', 'command_buffer/client/gles2_c_lib_autogen.h', - 'command_buffer/client/gles2_c_lib_export.h', 'command_buffer/client/gles2_lib.h', 'command_buffer/client/gles2_lib.cc', ], @@ -142,15 +141,11 @@ # Stub to expose gles2_implemenation in C instead of C++. # so GLES2 C programs can work with no changes. 'target_name': 'gles2_c_lib', - 'type': '<(component)', + 'type': 'static_library', 'dependencies': [ '../base/base.gyp:base', - '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 'gles2_implementation', ], - 'defines': [ - 'GLES2_C_LIB_IMPLEMENTATION', - ], 'sources': [ '<@(gles2_c_lib_source_files)', ], @@ -159,14 +154,11 @@ # Same as gles2_c_lib except with no parameter checking. Required for # OpenGL ES 2.0 conformance tests. 'target_name': 'gles2_c_lib_nocheck', - 'type': '<(component)', + 'type': 'static_library', 'defines': [ - 'GLES2_C_LIB_IMPLEMENTATION', 'GLES2_CONFORMANCE_TESTS=1', ], 'dependencies': [ - '../base/base.gyp:base', - '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 'gles2_implementation_client_side_arrays_no_check', ], 'sources': [ @@ -297,9 +289,6 @@ 'gles2_implementation_client_side_arrays', 'gles2_cmd_helper', ], - 'defines': [ - 'GLES2_C_LIB_IMPLEMENTATION', - ], 'sources': [ '<@(gles2_c_lib_source_files)', 'command_buffer/client/cmd_buffer_helper_test.cc', |