summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorgman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-12 04:51:22 +0000
committergman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-12 04:51:22 +0000
commitd42398570e13c364a7f403fc9685ddb437b194f4 (patch)
tree739c99463efc13bec23138869d3baf9a4d3cc0de /gpu
parente505713377b0ec2e061933ab181854062cb16ffc (diff)
downloadchromium_src-d42398570e13c364a7f403fc9685ddb437b194f4.zip
chromium_src-d42398570e13c364a7f403fc9685ddb437b194f4.tar.gz
chromium_src-d42398570e13c364a7f403fc9685ddb437b194f4.tar.bz2
Rename and document glCommandBufferEnableCHROMIUM
moved to gl2ext.h. Got rid of gles2_command_buffer.h BUG=none TEST=none Review URL: http://codereview.chromium.org/7623001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96507 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rwxr-xr-xgpu/GLES2/extensions/CHROMIUM/CHROMIUM_enable_feature.txt67
-rw-r--r--gpu/GLES2/gl2ext.h13
-rw-r--r--gpu/GLES2/gles2_command_buffer.h38
-rwxr-xr-xgpu/command_buffer/build_gles2_cmd_buffer.py8
-rw-r--r--gpu/command_buffer/client/gles2_c_lib_autogen.h4
-rw-r--r--gpu/command_buffer/client/gles2_cmd_helper_autogen.h6
-rw-r--r--gpu/command_buffer/client/gles2_implementation.cc11
-rw-r--r--gpu/command_buffer/client/gles2_implementation_autogen.h2
-rw-r--r--gpu/command_buffer/client/gles2_implementation_unittest.cc1
-rw-r--r--gpu/command_buffer/common/gles2_cmd_format_autogen.h26
-rw-r--r--gpu/command_buffer/common/gles2_cmd_format_test_autogen.h6
-rw-r--r--gpu/command_buffer/common/gles2_cmd_id_test_autogen.h28
-rw-r--r--gpu/command_buffer/common/gles2_cmd_ids_autogen.h2
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils.cc1
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h6
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils_unittest.cc1
-rw-r--r--gpu/command_buffer/service/context_group.cc1
-rw-r--r--gpu/command_buffer/service/context_group_unittest.cc1
-rw-r--r--gpu/command_buffer/service/feature_info.cc1
-rw-r--r--gpu/command_buffer/service/feature_info_unittest.cc1
-rw-r--r--gpu/command_buffer/service/gl_utils.h1
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc13
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h2
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h1
-rw-r--r--gpu/command_buffer/service/test_helper.cc3
-rw-r--r--gpu/command_buffer/service/test_helper.h3
-rw-r--r--gpu/command_buffer/service/texture_manager.cc1
-rw-r--r--gpu/command_buffer/service/texture_manager_unittest.cc1
-rw-r--r--gpu/command_buffer/service/vertex_attrib_manager_unittest.cc1
-rw-r--r--gpu/gles2_conform_support/egl/display.cc9
30 files changed, 153 insertions, 106 deletions
diff --git a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_enable_feature.txt b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_enable_feature.txt
new file mode 100755
index 0000000..100cf0c
--- /dev/null
+++ b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_enable_feature.txt
@@ -0,0 +1,67 @@
+Name
+
+ CHROMIUM_enable_feature
+
+Name Strings
+
+ GL_CHROMIUM_enable_feature
+
+Version
+
+ Last Modifed Date: August 11, 2011
+
+Dependencies
+
+ OpenGL ES 2.0 is required.
+
+Overview
+
+ This extension allows certain optional features to be turned on in
+ the Chromium OpenGL ES 2.0 implementation.
+
+Issues
+
+
+New Tokens
+
+ None
+
+New Procedures and Functions
+
+ CommandBufferEnableCHROMIUM(const GLchar *feature)
+
+ <feature> is a null terminated string of the feature you wish to enable.
+ The requestable feature strings are as follows:
+
+ Note: If used this function MUST be called before any other GL commands
+ except GetString. Calling any other functions first will result in
+ undefined behavior.
+
+ pepper3d_allow_buffers_on_mulitple_targets
+
+ OpenGL ES 2.0 allows a single buffer to be bound to both the ARRAY_BUFFER
+ and ELEMENT_ARRAY_BUFFER bind points. By default Chromium does not allow
+ this.
+
+ This feature is only provided for full OpenGL ES 2.0 compatibility. It is
+ expensive to use and should generally be avoided.
+
+ pepper3d_support_fixed_attribs
+
+ Turns on support for the type GL_FIXED. By default this feature is off in
+ Chromium.
+
+ This feature is only provided for full OpenGL ES 2.0 compatibility. It is
+ expensive to use and should generally be avoided.
+
+Errors
+
+ None.
+
+New State
+
+ None.
+
+Revision History
+
+ 8/11/2011 Documented the extension
diff --git a/gpu/GLES2/gl2ext.h b/gpu/GLES2/gl2ext.h
index 68773a4..fe9d2f4 100644
--- a/gpu/GLES2/gl2ext.h
+++ b/gpu/GLES2/gl2ext.h
@@ -1046,6 +1046,19 @@ typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOCHROMIUM) ();
#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
#endif
+/* GL_CHROMIUM_enable_feature */
+#ifndef GL_CHROMIUM_enable_feature
+#define GL_CHROMIUM_enable_feature 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glEnableFeatureCHROMIUM GLES2_GET_FUN(EnableFeatureCHROMIUM)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glEnableFeatureCHROMIUM (const GLchar *feature);
+#endif
+#else
+typedef void (GL_APIENTRYP PFNGLENABLEFEATURECHROMIUM) (const GLchar *feature);
+#endif
+#endif
+
/* GL_ARB_robustness */
/* This extension is subsetted for the moment, incorporating only the
* enums necessary to describe the reasons that we might encounter for
diff --git a/gpu/GLES2/gles2_command_buffer.h b/gpu/GLES2/gles2_command_buffer.h
deleted file mode 100644
index c027afd..0000000
--- a/gpu/GLES2/gles2_command_buffer.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2010 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.
-
-// This file defines constants and functions for the Pepper gles2 command
-// buffers that fall outside the scope of OpenGL ES 2.0
-
-#ifndef GPU_GLES2_GLES2_COMMAND_BUFFER_H_
-#define GPU_GLES2_GLES2_COMMAND_BUFFER_H_
-
-// constants for CommandBufferEnableCHROMIUM command.
-#define PEPPER3D_ALLOW_BUFFERS_ON_MULTIPLE_TARGETS \
- "pepper3d_allow_buffers_on_multiple_targets"
-#define PEPPER3D_SUPPORT_FIXED_ATTRIBS \
- "pepper3d_support_fixed_attribs"
-// TODO(gman): remove this
-#define PEPPER3D_SKIP_GLSL_TRANSLATION \
- "pepper3d_skip_glsl_translation"
-
-// TODO(gman): move this somewhere else.
-#ifndef GL_READ_ONLY
-#define GL_READ_ONLY 0x88B8
-#endif
-#ifndef GL_WRITE_ONLY
-#define GL_WRITE_ONLY 0x88B9
-#endif
-#ifndef GL_BGRA_EXT
-#define GL_BGRA_EXT 0x80E1
-#endif
-#ifndef GL_HALF_FLOAT_OES
-#define GL_HALF_FLOAT_OES 0x8D61
-#endif
-
-#endif // GPU_GLES2_GLES2_COMMAND_BUFFER_H_
-
-
-
-
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index 4f0881f..2f79519 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -208,7 +208,7 @@ GL_APICALL GLuint GL_APIENTRY glGetMaxValueInBufferCHROMIUM (GLidBuffer bu
GL_APICALL void GL_APIENTRY glGenSharedIdsCHROMIUM (GLuint namespace_id, GLuint id_offset, GLsizeiNotNegative n, GLuint* ids);
GL_APICALL void GL_APIENTRY glDeleteSharedIdsCHROMIUM (GLuint namespace_id, GLsizeiNotNegative n, const GLuint* ids);
GL_APICALL void GL_APIENTRY glRegisterSharedIdsCHROMIUM (GLuint namespace_id, GLsizeiNotNegative n, const GLuint* ids);
-GL_APICALL GLboolean GL_APIENTRY glCommandBufferEnableCHROMIUM (const char* feature);
+GL_APICALL GLboolean GL_APIENTRY glEnableFeatureCHROMIUM (const char* feature);
GL_APICALL void* GL_APIENTRY glMapBufferSubDataCHROMIUM (GLuint target, GLintptrNotNegative offset, GLsizeiptr size, GLenum access);
GL_APICALL void GL_APIENTRY glUnmapBufferSubDataCHROMIUM (const void* mem);
GL_APICALL void* GL_APIENTRY glMapTexSubImage2DCHROMIUM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLenum access);
@@ -417,7 +417,7 @@ _CMD_ID_TABLE = {
'GenSharedIdsCHROMIUM': 439,
'DeleteSharedIdsCHROMIUM': 440,
'RegisterSharedIdsCHROMIUM': 441,
- 'CommandBufferEnableCHROMIUM': 442,
+ 'EnableFeatureCHROMIUM': 442,
'CompressedTexImage2DBucket': 443,
'CompressedTexSubImage2DBucket': 444,
'RenderbufferStorageMultisampleEXT': 445,
@@ -1169,10 +1169,10 @@ _FUNCTION_INFO = {
},
'ColorMask': {'decoder_func': 'DoColorMask', 'expectation': False},
'ClearStencil': {'decoder_func': 'DoClearStencil'},
- 'CommandBufferEnableCHROMIUM': {
+ 'EnableFeatureCHROMIUM': {
'type': 'Custom',
'immediate': False,
- 'decoder_func': 'DoCommandBufferEnableCHROMIUM',
+ 'decoder_func': 'DoEnableFeatureCHROMIUM',
'expectation': False,
'cmd_args': 'GLuint bucket_id, GLint* result',
'result': ['GLint'],
diff --git a/gpu/command_buffer/client/gles2_c_lib_autogen.h b/gpu/command_buffer/client/gles2_c_lib_autogen.h
index fdd781e..6e2dd2b 100644
--- a/gpu/command_buffer/client/gles2_c_lib_autogen.h
+++ b/gpu/command_buffer/client/gles2_c_lib_autogen.h
@@ -534,8 +534,8 @@ void GLES2RegisterSharedIdsCHROMIUM(
GLuint namespace_id, GLsizei n, const GLuint* ids) {
gles2::GetGLContext()->RegisterSharedIdsCHROMIUM(namespace_id, n, ids);
}
-GLboolean GLES2CommandBufferEnableCHROMIUM(const char* feature) {
- return gles2::GetGLContext()->CommandBufferEnableCHROMIUM(feature);
+GLboolean GLES2EnableFeatureCHROMIUM(const char* feature) {
+ return gles2::GetGLContext()->EnableFeatureCHROMIUM(feature);
}
void* GLES2MapBufferSubDataCHROMIUM(
GLuint target, GLintptr offset, GLsizeiptr size, GLenum access) {
diff --git a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
index 010443c..d6d1654 100644
--- a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
+++ b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
@@ -1188,10 +1188,10 @@
c.Init(namespace_id, n, ids_shm_id, ids_shm_offset);
}
- void CommandBufferEnableCHROMIUM(
+ void EnableFeatureCHROMIUM(
GLuint bucket_id, uint32 result_shm_id, uint32 result_shm_offset) {
- gles2::CommandBufferEnableCHROMIUM& c =
- GetCmdSpace<gles2::CommandBufferEnableCHROMIUM>();
+ gles2::EnableFeatureCHROMIUM& c =
+ GetCmdSpace<gles2::EnableFeatureCHROMIUM>();
c.Init(bucket_id, result_shm_id, result_shm_offset);
}
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index 0c052ce..fc4f547 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -7,7 +7,6 @@
#include "../client/gles2_implementation.h"
#include <GLES2/gl2ext.h>
-#include <GLES2/gles2_command_buffer.h>
#include "../client/mapped_memory.h"
#include "../client/program_info_manager.h"
#include "../common/gles2_cmd_utils.h"
@@ -2148,16 +2147,16 @@ void GLES2Implementation::GetVertexAttribiv(
});
}
-GLboolean GLES2Implementation::CommandBufferEnableCHROMIUM(
+GLboolean GLES2Implementation::EnableFeatureCHROMIUM(
const char* feature) {
- GPU_CLIENT_LOG("[" << this << "] glCommandBufferEnableCHROMIUM("
+ GPU_CLIENT_LOG("[" << this << "] glEnableFeatureCHROMIUM("
<< feature << ")");
- TRACE_EVENT0("gpu", "GLES2::CommandBufferEnableCHROMIUM");
- typedef CommandBufferEnableCHROMIUM::Result Result;
+ TRACE_EVENT0("gpu", "GLES2::EnableFeatureCHROMIUM");
+ typedef EnableFeatureCHROMIUM::Result Result;
Result* result = GetResultAs<Result*>();
*result = 0;
SetBucketAsCString(kResultBucketId, feature);
- helper_->CommandBufferEnableCHROMIUM(
+ helper_->EnableFeatureCHROMIUM(
kResultBucketId, result_shm_id(), result_shm_offset());
WaitForCmd();
helper_->SetBucketSize(kResultBucketId, 0);
diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h
index f0c5c4d..702ad02 100644
--- a/gpu/command_buffer/client/gles2_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_autogen.h
@@ -1253,7 +1253,7 @@ void DeleteSharedIdsCHROMIUM(
void RegisterSharedIdsCHROMIUM(
GLuint namespace_id, GLsizei n, const GLuint* ids);
-GLboolean CommandBufferEnableCHROMIUM(const char* feature);
+GLboolean EnableFeatureCHROMIUM(const char* feature);
void* MapBufferSubDataCHROMIUM(
GLuint target, GLintptr offset, GLsizeiptr size, GLenum access);
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc
index c526d76..68ae339 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest.cc
+++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc
@@ -8,7 +8,6 @@
#include <GLES2/gl2ext.h>
#include "gpu/command_buffer/common/command_buffer.h"
-#include "gpu/GLES2/gles2_command_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
index bddd5b7..59df77d 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -8719,9 +8719,9 @@ COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, ids_shm_id) == 12,
COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, ids_shm_offset) == 16,
OffsetOf_RegisterSharedIdsCHROMIUM_ids_shm_offset_not_16);
-struct CommandBufferEnableCHROMIUM {
- typedef CommandBufferEnableCHROMIUM ValueType;
- static const CommandId kCmdId = kCommandBufferEnableCHROMIUM;
+struct EnableFeatureCHROMIUM {
+ typedef EnableFeatureCHROMIUM ValueType;
+ static const CommandId kCmdId = kEnableFeatureCHROMIUM;
static const cmd::ArgFlags kArgFlags = cmd::kFixed;
typedef GLint Result;
@@ -8756,16 +8756,16 @@ struct CommandBufferEnableCHROMIUM {
uint32 result_shm_offset;
};
-COMPILE_ASSERT(sizeof(CommandBufferEnableCHROMIUM) == 16,
- Sizeof_CommandBufferEnableCHROMIUM_is_not_16);
-COMPILE_ASSERT(offsetof(CommandBufferEnableCHROMIUM, header) == 0,
- OffsetOf_CommandBufferEnableCHROMIUM_header_not_0);
-COMPILE_ASSERT(offsetof(CommandBufferEnableCHROMIUM, bucket_id) == 4,
- OffsetOf_CommandBufferEnableCHROMIUM_bucket_id_not_4);
-COMPILE_ASSERT(offsetof(CommandBufferEnableCHROMIUM, result_shm_id) == 8,
- OffsetOf_CommandBufferEnableCHROMIUM_result_shm_id_not_8);
-COMPILE_ASSERT(offsetof(CommandBufferEnableCHROMIUM, result_shm_offset) == 12,
- OffsetOf_CommandBufferEnableCHROMIUM_result_shm_offset_not_12);
+COMPILE_ASSERT(sizeof(EnableFeatureCHROMIUM) == 16,
+ Sizeof_EnableFeatureCHROMIUM_is_not_16);
+COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, header) == 0,
+ OffsetOf_EnableFeatureCHROMIUM_header_not_0);
+COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, bucket_id) == 4,
+ OffsetOf_EnableFeatureCHROMIUM_bucket_id_not_4);
+COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, result_shm_id) == 8,
+ OffsetOf_EnableFeatureCHROMIUM_result_shm_id_not_8);
+COMPILE_ASSERT(offsetof(EnableFeatureCHROMIUM, result_shm_offset) == 12,
+ OffsetOf_EnableFeatureCHROMIUM_result_shm_offset_not_12);
struct ResizeCHROMIUM {
typedef ResizeCHROMIUM ValueType;
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 d4dbf8f..66e45ae 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -3437,14 +3437,14 @@ TEST(GLES2FormatTest, RegisterSharedIdsCHROMIUM) {
EXPECT_EQ(static_cast<uint32>(14), cmd.ids_shm_offset);
}
-TEST(GLES2FormatTest, CommandBufferEnableCHROMIUM) {
- CommandBufferEnableCHROMIUM cmd = { { 0 } };
+TEST(GLES2FormatTest, EnableFeatureCHROMIUM) {
+ EnableFeatureCHROMIUM cmd = { { 0 } };
void* next_cmd = cmd.Set(
&cmd,
static_cast<GLuint>(11),
static_cast<uint32>(12),
static_cast<uint32>(13));
- EXPECT_EQ(static_cast<uint32>(CommandBufferEnableCHROMIUM::kCmdId),
+ EXPECT_EQ(static_cast<uint32>(EnableFeatureCHROMIUM::kCmdId),
cmd.header.command);
EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
EXPECT_EQ(static_cast<char*>(next_cmd),
diff --git a/gpu/command_buffer/common/gles2_cmd_id_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_id_test_autogen.h
index ff99a65..5d3ceb4 100644
--- a/gpu/command_buffer/common/gles2_cmd_id_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_id_test_autogen.h
@@ -1,8 +1,10 @@
-// Copyright (c) 2010 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.
-// This file is auto-generated. DO NOT EDIT!
+// This file is auto-generated from
+// gpu/command_buffer/build_gles2_cmd_buffer.py
+// DO NOT EDIT!
// This file contains unit tests for gles2 commmand ids
#ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_ID_TEST_AUTOGEN_H_
@@ -391,8 +393,26 @@ TEST(GLES2CommandIdTest, CommandIdsMatch) {
GLES2_DeleteSharedIdsCHROMIUM_kCmdId_mismatch);
COMPILE_ASSERT(RegisterSharedIdsCHROMIUM::kCmdId == 441,
GLES2_RegisterSharedIdsCHROMIUM_kCmdId_mismatch);
- COMPILE_ASSERT(CommandBufferEnableCHROMIUM::kCmdId == 442,
- GLES2_CommandBufferEnableCHROMIUM_kCmdId_mismatch);
+ COMPILE_ASSERT(EnableFeatureCHROMIUM::kCmdId == 442,
+ GLES2_EnableFeatureCHROMIUM_kCmdId_mismatch);
+ COMPILE_ASSERT(ResizeCHROMIUM::kCmdId == 448,
+ GLES2_ResizeCHROMIUM_kCmdId_mismatch);
+ COMPILE_ASSERT(GetRequestableExtensionsCHROMIUM::kCmdId == 449,
+ GLES2_GetRequestableExtensionsCHROMIUM_kCmdId_mismatch);
+ COMPILE_ASSERT(RequestExtensionCHROMIUM::kCmdId == 450,
+ GLES2_RequestExtensionCHROMIUM_kCmdId_mismatch);
+ COMPILE_ASSERT(SetSurfaceCHROMIUM::kCmdId == 453,
+ GLES2_SetSurfaceCHROMIUM_kCmdId_mismatch);
+ COMPILE_ASSERT(GetMultipleIntegervCHROMIUM::kCmdId == 454,
+ GLES2_GetMultipleIntegervCHROMIUM_kCmdId_mismatch);
+ COMPILE_ASSERT(GetProgramInfoCHROMIUM::kCmdId == 455,
+ GLES2_GetProgramInfoCHROMIUM_kCmdId_mismatch);
+ COMPILE_ASSERT(Placeholder447CHROMIUM::kCmdId == 447,
+ GLES2_Placeholder447CHROMIUM_kCmdId_mismatch);
+ COMPILE_ASSERT(Placeholder451CHROMIUM::kCmdId == 451,
+ GLES2_Placeholder451CHROMIUM_kCmdId_mismatch);
+ COMPILE_ASSERT(Placeholder452CHROMIUM::kCmdId == 452,
+ GLES2_Placeholder452CHROMIUM_kCmdId_mismatch);
}
#endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_ID_TEST_AUTOGEN_H_
diff --git a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h b/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
index 14cb3e4..910302b 100644
--- a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
@@ -196,7 +196,7 @@
OP(GenSharedIdsCHROMIUM) /* 439 */ \
OP(DeleteSharedIdsCHROMIUM) /* 440 */ \
OP(RegisterSharedIdsCHROMIUM) /* 441 */ \
- OP(CommandBufferEnableCHROMIUM) /* 442 */ \
+ OP(EnableFeatureCHROMIUM) /* 442 */ \
OP(CompressedTexImage2DBucket) /* 443 */ \
OP(CompressedTexSubImage2DBucket) /* 444 */ \
OP(RenderbufferStorageMultisampleEXT) /* 445 */ \
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index ca58967..648dbb1 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -8,7 +8,6 @@
#include <stdio.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-#include <GLES2/gles2_command_buffer.h>
#include "../common/gles2_cmd_utils.h"
#include "../common/gles2_cmd_format.h"
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 e8a1798..b74a318 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
@@ -179,7 +179,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", },
@@ -276,6 +276,8 @@ static GLES2Util::EnumToString enum_to_string_table[] = {
{ 0x84CF, "GL_TEXTURE15", },
{ 0x84CE, "GL_TEXTURE14", },
{ 0x84CD, "GL_TEXTURE13", },
+ { 0x83F3, "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT", },
+ { 0x83F2, "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT", },
{ 0x83F1, "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT", },
{ 0x83F0, "GL_COMPRESSED_RGB_S3TC_DXT1_EXT", },
{ 0x8C0A, "GL_SGX_BINARY_IMG", },
@@ -406,7 +408,7 @@ static GLES2Util::EnumToString enum_to_string_table[] = {
{ 0x80CA, "GL_BLEND_DST_ALPHA", },
{ 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/common/gles2_cmd_utils_unittest.cc b/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
index 0923616..1fcc9a8 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
@@ -6,7 +6,6 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-#include <GLES2/gles2_command_buffer.h>
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc
index f852835..36c8d03 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -11,7 +11,6 @@
#include "gpu/command_buffer/service/renderbuffer_manager.h"
#include "gpu/command_buffer/service/shader_manager.h"
#include "gpu/command_buffer/service/texture_manager.h"
-#include "gpu/GLES2/gles2_command_buffer.h"
#include "ui/gfx/gl/gl_implementation.h"
namespace gpu {
diff --git a/gpu/command_buffer/service/context_group_unittest.cc b/gpu/command_buffer/service/context_group_unittest.cc
index ed6686b..a651854 100644
--- a/gpu/command_buffer/service/context_group_unittest.cc
+++ b/gpu/command_buffer/service/context_group_unittest.cc
@@ -8,7 +8,6 @@
#include "gpu/command_buffer/common/gl_mock.h"
#include "gpu/command_buffer/service/test_helper.h"
#include "gpu/command_buffer/service/texture_manager.h"
-#include "gpu/GLES2/gles2_command_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
using ::gfx::MockGLInterface;
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index b9e0d36..4936e7a 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -6,7 +6,6 @@
#include <string>
#include "gpu/command_buffer/service/feature_info.h"
#include "gpu/command_buffer/service/gl_utils.h"
-#include "gpu/GLES2/gles2_command_buffer.h"
#include "ui/gfx/gl/gl_implementation.h"
namespace gpu {
diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc
index d9cd34e..5f87e92 100644
--- a/gpu/command_buffer/service/feature_info_unittest.cc
+++ b/gpu/command_buffer/service/feature_info_unittest.cc
@@ -8,7 +8,6 @@
#include "gpu/command_buffer/common/gl_mock.h"
#include "gpu/command_buffer/service/test_helper.h"
#include "gpu/command_buffer/service/texture_manager.h"
-#include "gpu/GLES2/gles2_command_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
using ::gfx::MockGLInterface;
diff --git a/gpu/command_buffer/service/gl_utils.h b/gpu/command_buffer/service/gl_utils.h
index 3648d4f..abc9ff2 100644
--- a/gpu/command_buffer/service/gl_utils.h
+++ b/gpu/command_buffer/service/gl_utils.h
@@ -31,6 +31,7 @@
#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
#define GL_RGB8_OES 0x8051
#define GL_RGBA8_OES 0x8058
+#define GL_HALF_FLOAT_OES 0x8D61
// GL_OES_EGL_image_external
#define GL_TEXTURE_EXTERNAL_OES 0x8D65
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 20e2b11..7a04a7c 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -37,7 +37,6 @@
#include "gpu/command_buffer/service/surface_manager.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "gpu/command_buffer/service/vertex_attrib_manager.h"
-#include "gpu/GLES2/gles2_command_buffer.h"
#include "ui/gfx/gl/gl_context.h"
#include "ui/gfx/gl/gl_implementation.h"
#include "ui/gfx/gl/gl_surface.h"
@@ -6584,10 +6583,10 @@ error::Error GLES2DecoderImpl::HandleSwapBuffers(
return error::kNoError;
}
-error::Error GLES2DecoderImpl::HandleCommandBufferEnableCHROMIUM(
- uint32 immediate_data_size, const gles2::CommandBufferEnableCHROMIUM& c) {
+error::Error GLES2DecoderImpl::HandleEnableFeatureCHROMIUM(
+ uint32 immediate_data_size, const gles2::EnableFeatureCHROMIUM& c) {
Bucket* bucket = GetBucket(c.bucket_id);
- typedef gles2::CommandBufferEnableCHROMIUM::Result Result;
+ typedef gles2::EnableFeatureCHROMIUM::Result Result;
Result* result = GetSharedMemoryAs<Result*>(
c.result_shm_id, c.result_shm_offset, sizeof(*result));
if (!result) {
@@ -6603,9 +6602,9 @@ error::Error GLES2DecoderImpl::HandleCommandBufferEnableCHROMIUM(
}
// TODO(gman): make this some kind of table to function pointer thingy.
- if (feature_str.compare(PEPPER3D_ALLOW_BUFFERS_ON_MULTIPLE_TARGETS) == 0) {
+ if (feature_str.compare("pepper3d_allow_buffers_on_multiple_targets") == 0) {
buffer_manager()->set_allow_buffers_on_multiple_targets(true);
- } else if (feature_str.compare(PEPPER3D_SUPPORT_FIXED_ATTRIBS) == 0) {
+ } else if (feature_str.compare("pepper3d_support_fixed_attribs") == 0) {
buffer_manager()->set_allow_buffers_on_multiple_targets(true);
// TODO(gman): decide how to remove the need for this const_cast.
// I could make validators_ non const but that seems bad as this is the only
@@ -6617,8 +6616,6 @@ error::Error GLES2DecoderImpl::HandleCommandBufferEnableCHROMIUM(
// needs to be done it seems like refactoring for one to one of those
// methods is a very low priority.
const_cast<Validators*>(validators_)->vertex_attrib_type.AddValue(GL_FIXED);
- } else if (feature_str.compare(PEPPER3D_SKIP_GLSL_TRANSLATION) == 0) {
- use_shader_translator_ = false;
} else {
return error::kNoError;
}
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
index ff07f42..1206925 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
@@ -1704,7 +1704,7 @@ TEST_F(GLES2DecoderTest2, ViewportInvalidArgs3_0) {
// TODO(gman): RegisterSharedIdsCHROMIUM
-// TODO(gman): CommandBufferEnableCHROMIUM
+// TODO(gman): EnableFeatureCHROMIUM
// TODO(gman): ResizeCHROMIUM
// TODO(gman): GetRequestableExtensionsCHROMIUM
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
index b7379a4..22d341a 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
@@ -18,7 +18,6 @@
#include "gpu/command_buffer/service/shader_manager.h"
#include "gpu/command_buffer/service/surface_manager_mock.h"
#include "gpu/command_buffer/service/texture_manager.h"
-#include "gpu/GLES2/gles2_command_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/gl/gl_context_stub.h"
#include "ui/gfx/gl/gl_surface_stub.h"
diff --git a/gpu/command_buffer/service/test_helper.cc b/gpu/command_buffer/service/test_helper.cc
index 2eff474..e441d6a 100644
--- a/gpu/command_buffer/service/test_helper.cc
+++ b/gpu/command_buffer/service/test_helper.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 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.
@@ -8,7 +8,6 @@
#include "gpu/command_buffer/common/gl_mock.h"
#include "gpu/command_buffer/common/types.h"
#include "gpu/command_buffer/service/gl_utils.h"
-#include "gpu/GLES2/gles2_command_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include <string.h>
diff --git a/gpu/command_buffer/service/test_helper.h b/gpu/command_buffer/service/test_helper.h
index 5793e44..16e3e0e 100644
--- a/gpu/command_buffer/service/test_helper.h
+++ b/gpu/command_buffer/service/test_helper.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 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,6 @@
#define GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_
#include "gpu/command_buffer/common/gl_mock.h"
-#include "gpu/GLES2/gles2_command_buffer.h"
namespace gpu {
namespace gles2 {
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index c37f375..02f5ab9 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -7,7 +7,6 @@
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/command_buffer/service/feature_info.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
-#include "gpu/GLES2/gles2_command_buffer.h"
namespace gpu {
namespace gles2 {
diff --git a/gpu/command_buffer/service/texture_manager_unittest.cc b/gpu/command_buffer/service/texture_manager_unittest.cc
index dd634e8..6800481 100644
--- a/gpu/command_buffer/service/texture_manager_unittest.cc
+++ b/gpu/command_buffer/service/texture_manager_unittest.cc
@@ -5,7 +5,6 @@
#include "gpu/command_buffer/service/texture_manager.h"
#include "base/memory/scoped_ptr.h"
-#include "gpu/GLES2/gles2_command_buffer.h"
#include "gpu/command_buffer/common/gl_mock.h"
#include "gpu/command_buffer/service/feature_info.h"
#include "gpu/command_buffer/service/test_helper.h"
diff --git a/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc b/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc
index 1d99ea7..49c1883 100644
--- a/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc
+++ b/gpu/command_buffer/service/vertex_attrib_manager_unittest.cc
@@ -5,7 +5,6 @@
#include "gpu/command_buffer/service/vertex_attrib_manager.h"
#include "base/memory/scoped_ptr.h"
-#include "gpu/GLES2/gles2_command_buffer.h"
#include "gpu/command_buffer/common/gl_mock.h"
#include "gpu/command_buffer/service/feature_info.h"
#include "gpu/command_buffer/service/test_helper.h"
diff --git a/gpu/gles2_conform_support/egl/display.cc b/gpu/gles2_conform_support/egl/display.cc
index 7baa94e..05603a0 100644
--- a/gpu/gles2_conform_support/egl/display.cc
+++ b/gpu/gles2_conform_support/egl/display.cc
@@ -10,7 +10,6 @@
#include "gpu/command_buffer/service/context_group.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
#include "gpu/command_buffer/service/gpu_scheduler.h"
-#include "gpu/GLES2/gles2_command_buffer.h"
#include "gpu/gles2_conform_support/egl/config.h"
#include "gpu/gles2_conform_support/egl/surface.h"
@@ -163,10 +162,10 @@ EGLContext Display::CreateContext(EGLConfig config,
transfer_buffer_id_,
share_resources));
- context_->CommandBufferEnableCHROMIUM(
- PEPPER3D_ALLOW_BUFFERS_ON_MULTIPLE_TARGETS);
- context_->CommandBufferEnableCHROMIUM(
- PEPPER3D_SUPPORT_FIXED_ATTRIBS);
+ context_->EnableFeatureCHROMIUM(
+ "pepper3d_allow_buffers_on_multiple_targets");
+ context_->EnableFeatureCHROMIUM(
+ "pepper3d_support_fixed_attribs");
return context_.get();
}