diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-17 19:24:18 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-17 19:24:18 +0000 |
commit | b1d2dcb6ca00ca1aab7017702a882f9df9eeaa5f (patch) | |
tree | 724b4744870f078601c0fef591e538fcc28b22bb /gpu | |
parent | 8d84301ae5bbb424b8c3e0f22c69841519324f10 (diff) | |
download | chromium_src-b1d2dcb6ca00ca1aab7017702a882f9df9eeaa5f.zip chromium_src-b1d2dcb6ca00ca1aab7017702a882f9df9eeaa5f.tar.gz chromium_src-b1d2dcb6ca00ca1aab7017702a882f9df9eeaa5f.tar.bz2 |
Makes shader translation a runtime switch.
For WebGL the shader translation is off. For Pepper
and other processes it is on. This will
be removed and the tranlator will always be on
at some point in the future
TEST=More conformance tests pass, manually ran WebGL demos in Chrome.
BUG=none
Review URL: http://codereview.chromium.org/2127001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
14 files changed, 147 insertions, 113 deletions
diff --git a/gpu/GLES2/gles2_command_buffer.h b/gpu/GLES2/gles2_command_buffer.h index 137cd78..1a860b4 100644 --- a/gpu/GLES2/gles2_command_buffer.h +++ b/gpu/GLES2/gles2_command_buffer.h @@ -9,7 +9,11 @@ #define GPU_GLES2_GLES2_COMMAND_BUFFER_H_ // constants for CommandBufferEnable command. -#define GLES2_ALLOW_BUFFERS_ON_MULTIPLE_TARGETS 0x0001 +#define PEPPER3D_ALLOW_BUFFERS_ON_MULTIPLE_TARGETS \ + "pepper3d_allow_buffers_on_multiple_targets" +// TODO(gman): remove this +#define PEPPER3D_SKIP_GLSL_TRANSLATION \ + "pepper3d_skip_glsl_translation" #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 89b943f..a211450 100755 --- a/gpu/command_buffer/build_gles2_cmd_buffer.py +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py @@ -181,7 +181,8 @@ GL_APICALL GLuint GL_APIENTRY glGetMaxValueInBuffer (GLidBuffer buffer_id, GL_APICALL void GL_APIENTRY glGenSharedIds (GLuint namespace_id, GLuint id_offset, GLsizei n, GLuint* ids); GL_APICALL void GL_APIENTRY glDeleteSharedIds (GLuint namespace_id, GLsizei n, const GLuint* ids); GL_APICALL void GL_APIENTRY glRegisterSharedIds (GLuint namespace_id, GLsizei n, const GLuint* ids); -GL_APICALL void GL_APIENTRY glCommandBufferEnable (GLenumCommandBufferState cap, GLboolean enable);""" +GL_APICALL GLboolean GL_APIENTRY glCommandBufferEnable (const char* feature); +""" # This is the list of all commmands that will be generated and their Id. # If a command is not listed in this table it is an error. @@ -522,12 +523,6 @@ _ENUM_LISTS = { 'GL_FOG_HINT', ], }, - 'CommandBufferState': { - 'type': 'GLenum', - 'valid': [ - 'GLES2_ALLOW_BUFFERS_ON_MULTIPLE_TARGETS', - ], - }, 'TextureTarget': { 'type': 'GLenum', 'valid': [ @@ -1027,8 +1022,12 @@ _FUNCTION_INFO = { }, 'ClearDepthf': {'decoder_func': 'glClearDepth'}, 'CommandBufferEnable': { + 'type': 'Custom', + 'immediate': False, 'decoder_func': 'DoCommandBufferEnable', 'expectation': False, + 'cmd_args': 'GLuint bucket_id, GLint* result', + 'result': ['GLint'], }, 'CompileShader': {'decoder_func': 'DoCompileShader', 'unit_test': False}, 'CompressedTexImage2D': { diff --git a/gpu/command_buffer/client/gles2_c_lib_autogen.h b/gpu/command_buffer/client/gles2_c_lib_autogen.h index d7983ea..e0d388c 100644 --- a/gpu/command_buffer/client/gles2_c_lib_autogen.h +++ b/gpu/command_buffer/client/gles2_c_lib_autogen.h @@ -519,8 +519,8 @@ void GLES2RegisterSharedIds( GLuint namespace_id, GLsizei n, const GLuint* ids) { gles2::GetGLContext()->RegisterSharedIds(namespace_id, n, ids); } -void GLES2CommandBufferEnable(GLenum cap, GLboolean enable) { - gles2::GetGLContext()->CommandBufferEnable(cap, enable); +GLboolean GLES2CommandBufferEnable(const char* feature) { + return gles2::GetGLContext()->CommandBufferEnable(feature); } #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_C_LIB_AUTOGEN_H_ diff --git a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h index 25394d0..aa2270b 100644 --- a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h +++ b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h @@ -1164,9 +1164,10 @@ c.Init(namespace_id, n, ids_shm_id, ids_shm_offset); } - void CommandBufferEnable(GLenum cap, GLboolean enable) { + void CommandBufferEnable( + GLuint bucket_id, uint32 result_shm_id, uint32 result_shm_offset) { gles2::CommandBufferEnable& c = GetCmdSpace<gles2::CommandBufferEnable>(); - c.Init(cap, enable); + c.Init(bucket_id, result_shm_id, result_shm_offset); } #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_AUTOGEN_H_ diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index a74d2982..fd72ed2 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -1448,6 +1448,18 @@ void GLES2Implementation::GetVertexAttribiv( result->CopyResult(params); } +GLboolean GLES2Implementation::CommandBufferEnable(const char* feature) { + typedef CommandBufferEnable::Result Result; + Result* result = GetResultAs<Result*>(); + *result = 0; + SetBucketAsCString(kResultBucketId, feature); + helper_->CommandBufferEnable( + kResultBucketId, result_shm_id(), result_shm_offset()); + WaitForCmd(); + helper_->SetBucketSize(kResultBucketId, 0); + return *result; +} + #endif // defined(GLES2_SUPPORT_CLIENT_SIDE_BUFFERS) } // namespace gles2 diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h index ae826d8..36e3e7f 100644 --- a/gpu/command_buffer/client/gles2_implementation_autogen.h +++ b/gpu/command_buffer/client/gles2_implementation_autogen.h @@ -790,9 +790,7 @@ void DeleteSharedIds(GLuint namespace_id, GLsizei n, const GLuint* ids); void RegisterSharedIds(GLuint namespace_id, GLsizei n, const GLuint* ids); -void CommandBufferEnable(GLenum cap, GLboolean enable) { - helper_->CommandBufferEnable(cap, enable); -} +GLboolean CommandBufferEnable(const char* feature); #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_ diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h index 785265b..eb46619 100644 --- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h @@ -8577,6 +8577,8 @@ struct CommandBufferEnable { static const CommandId kCmdId = kCommandBufferEnable; static const cmd::ArgFlags kArgFlags = cmd::kFixed; + typedef GLint Result; + static uint32 ComputeSize() { return static_cast<uint32>(sizeof(ValueType)); // NOLINT } @@ -8585,30 +8587,38 @@ struct CommandBufferEnable { header.SetCmd<ValueType>(); } - void Init(GLenum _cap, GLboolean _enable) { + void Init( + GLuint _bucket_id, uint32 _result_shm_id, uint32 _result_shm_offset) { SetHeader(); - cap = _cap; - enable = _enable; + bucket_id = _bucket_id; + result_shm_id = _result_shm_id; + result_shm_offset = _result_shm_offset; } - void* Set(void* cmd, GLenum _cap, GLboolean _enable) { - static_cast<ValueType*>(cmd)->Init(_cap, _enable); + void* Set( + void* cmd, GLuint _bucket_id, uint32 _result_shm_id, + uint32 _result_shm_offset) { + static_cast<ValueType*>( + cmd)->Init(_bucket_id, _result_shm_id, _result_shm_offset); return NextCmdAddress<ValueType>(cmd); } gpu::CommandHeader header; - uint32 cap; - uint32 enable; + uint32 bucket_id; + uint32 result_shm_id; + uint32 result_shm_offset; }; -COMPILE_ASSERT(sizeof(CommandBufferEnable) == 12, - Sizeof_CommandBufferEnable_is_not_12); +COMPILE_ASSERT(sizeof(CommandBufferEnable) == 16, + Sizeof_CommandBufferEnable_is_not_16); COMPILE_ASSERT(offsetof(CommandBufferEnable, header) == 0, OffsetOf_CommandBufferEnable_header_not_0); -COMPILE_ASSERT(offsetof(CommandBufferEnable, cap) == 4, - OffsetOf_CommandBufferEnable_cap_not_4); -COMPILE_ASSERT(offsetof(CommandBufferEnable, enable) == 8, - OffsetOf_CommandBufferEnable_enable_not_8); +COMPILE_ASSERT(offsetof(CommandBufferEnable, bucket_id) == 4, + OffsetOf_CommandBufferEnable_bucket_id_not_4); +COMPILE_ASSERT(offsetof(CommandBufferEnable, result_shm_id) == 8, + OffsetOf_CommandBufferEnable_result_shm_id_not_8); +COMPILE_ASSERT(offsetof(CommandBufferEnable, result_shm_offset) == 12, + OffsetOf_CommandBufferEnable_result_shm_offset_not_12); #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 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 3a64424..9969c2f 100644 --- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h @@ -3385,15 +3385,17 @@ TEST(GLES2FormatTest, CommandBufferEnable) { CommandBufferEnable cmd = { { 0 } }; void* next_cmd = cmd.Set( &cmd, - static_cast<GLenum>(11), - static_cast<GLboolean>(12)); + static_cast<GLuint>(11), + static_cast<uint32>(12), + static_cast<uint32>(13)); EXPECT_EQ(static_cast<uint32>(CommandBufferEnable::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); EXPECT_EQ(static_cast<char*>(next_cmd), reinterpret_cast<char*>(&cmd) + sizeof(cmd)); - EXPECT_EQ(static_cast<GLenum>(11), cmd.cap); - EXPECT_EQ(static_cast<GLboolean>(12), cmd.enable); + EXPECT_EQ(static_cast<GLuint>(11), cmd.bucket_id); + EXPECT_EQ(static_cast<uint32>(12), cmd.result_shm_id); + EXPECT_EQ(static_cast<uint32>(13), cmd.result_shm_offset); } #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ diff --git a/gpu/command_buffer/docs/gles2_cmd_format_docs.txt b/gpu/command_buffer/docs/gles2_cmd_format_docs.txt index ee6eb98..67306ab 100644 --- a/gpu/command_buffer/docs/gles2_cmd_format_docs.txt +++ b/gpu/command_buffer/docs/gles2_cmd_format_docs.txt @@ -1,32 +1,32 @@ //! \file //! -//! The public interface for 3D graphics is based on a commmand buffer. +//! The public interface for 3D graphics is based on a command buffer. //! -//! This was choosen because it provides an easy way to separate the process -//! writing commands from the process reading those commands without requiring -//! too much overhead to keep the two processes in sync. +//! This was chosen because it provides an easy way to separate the process of +//! writing commands from the process of reading those commands without +//! requiring too much overhead to keep the two processes in sync. //! //! You can use this info to write commands yourself. Most developers will use //! the provided OpenGL ES 2.0 implementation that issues these commands for //! them. //! -//! Each command starts with a header. The header is 32 bits where the first 21 +//! Each command starts with a header. The header is 32 bits, where the first 21 //! bits define the number of 32 bit entries, including the header, the command -//! represnts. The last 11 bits specify the specific command. +//! represents. The last 11 bits specify the command. //! //! Commands that send a variable amount of data have 1 to 3 ways to send that //! data. //! -//! For many commands they can send their data in shared memory. The command -//! will take an id of the shared memory and an offset into that shared memory -//! of where the data lives. Commands are executed asynchronously so the client +//! Many commands can send their data in shared memory. The command will take +//! an id of the shared memory and an offset into that shared memory of where +//! the data lives. Commands are executed asynchronously, so the client //! program must be careful to leave the data available until the command has //! executed. //! //! Some commands have an 'immediate' version where the data appears directly //! after the command in memory. //! -//! A 3rd way of passing data is through Buckets. Buckets are indentified by +//! A 3rd way of passing data is through Buckets. Buckets are identified by //! number. You create a bucket with the command SetBucketSize, you can then //! fill the bucket with SetBucketData commands. Once you've sent all your //! data you can then issue a command that uses the bucket and takes a bucket @@ -81,7 +81,7 @@ struct CommandHeader { //! the command failed its result size will 0. You must set the size to 0 //! before issuing the command. //! -//! To retreive the data you might do something like this pseudo code: +//! To retrieve the data you might do something like this pseudo code: //! //! GetAttachedShaders::Result* result = address-of-shared-memory //! int num_results = result->size / sizeof(GLuint); // the type returned @@ -123,7 +123,7 @@ struct Jump { //! The JumpRelative command jumps to another place in the command buffer //! relative to the end of this command. In other words. JumpRelative with an -//! offset of zero is effectively a noop. +//! offset of zero is effectively a no-op. struct JumpRelative { static const CommandId kCmdId = 4; @@ -2247,12 +2247,16 @@ struct RegisterSharedIds { uint32 ids_shm_offset; //!< uint32 }; -//! Command that enables or disables command buffer specific features. +//! Command that enables features. The bucket should contain the feature string. struct CommandBufferEnable { static const CommandId kCmdId = 442; + typedef GLint Result; + CommandHeader header; - uint32 cap; //!< GLenum - uint32 enable; //!< GLboolean + uint32 bucket_id; //!< GLuint + uint32 result_shm_id; //!< uint32 + uint32 result_shm_offset; //!< uint32 }; + diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 9146c9a..bc84352 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -804,9 +804,6 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>, // Wrapper for glCheckFramebufferStatus GLenum DoCheckFramebufferStatus(GLenum target); - // Helper for CommandBufferEnable cmd. - void DoCommandBufferEnable(GLenum pname, GLboolean enable); - // Wrapper for glCompileShader. void DoCompileShader(GLuint shader); @@ -1079,6 +1076,8 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>, // The last error message set. std::string last_error_; + bool use_shader_translator_; + DISALLOW_COPY_AND_ASSIGN(GLES2DecoderImpl); }; @@ -1341,7 +1340,8 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group) active_texture_unit_(0), black_2d_texture_id_(0), black_cube_texture_id_(0), - anti_aliased_(false) { + anti_aliased_(false), + use_shader_translator_(true) { } bool GLES2DecoderImpl::Initialize(gfx::GLContext* context, @@ -2355,7 +2355,9 @@ error::Error GLES2DecoderImpl::HandleBindAttribLocationBucket( return error::kInvalidArguments; } std::string name_str; - bucket->GetAsString(&name_str); + if (!bucket->GetAsString(&name_str)) { + return error::kInvalidArguments; + } glBindAttribLocation(info->service_id(), index, name_str.c_str()); return error::kNoError; } @@ -3068,29 +3070,32 @@ void GLES2DecoderImpl::DoCompileShader(GLuint client_id) { const char* shader_src = info->source().c_str(); #if !defined(GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2) && !defined(UNIT_TEST) #if defined(GLES2_GPU_SERVICE_TRANSLATE_SHADER) - int dbg_options = 0; - EShLanguage language = info->shader_type() == GL_VERTEX_SHADER ? - EShLangVertex : EShLangFragment; - TBuiltInResource resources; - // TODO(alokp): Ask gman how to get appropriate values. - resources.maxVertexAttribs = 8; - resources.maxVertexUniformVectors = 128; - resources.maxVaryingVectors = 8; - resources.maxVertexTextureImageUnits = 0; - resources.maxCombinedTextureImageUnits = 8; - resources.maxTextureImageUnits = 8; - resources.maxFragmentUniformVectors = 16; - resources.maxDrawBuffers = 1; - ShHandle compiler = ShConstructCompiler(language, dbg_options); - if (!ShCompile(compiler, &shader_src, 1, EShOptNone, &resources, - dbg_options)) { - // TODO(alokp): Ask gman where to set compile-status and info-log. - // May be add member variables to ShaderManager::ShaderInfo? - //const char* info_log = ShGetInfoLog(compiler); - ShDestruct(compiler); - return; + ShHandle compiler; + if (use_shader_translator_) { + int dbg_options = 0; + EShLanguage language = info->shader_type() == GL_VERTEX_SHADER ? + EShLangVertex : EShLangFragment; + TBuiltInResource resources; + // TODO(alokp): Ask gman how to get appropriate values. + resources.maxVertexAttribs = group_->max_vertex_attribs(); + resources.maxVertexUniformVectors = 128; + resources.maxVaryingVectors = 8; + resources.maxVertexTextureImageUnits = 0; + resources.maxCombinedTextureImageUnits = group_->max_texture_units(); + resources.maxTextureImageUnits = 8; + resources.maxFragmentUniformVectors = 16; + resources.maxDrawBuffers = 1; + compiler = ShConstructCompiler(language, dbg_options); + if (!ShCompile(compiler, &shader_src, 1, EShOptNone, &resources, + dbg_options)) { + // TODO(alokp): Ask gman where to set compile-status and info-log. + // May be add member variables to ShaderManager::ShaderInfo? + // const char* info_log = ShGetInfoLog(compiler); + ShDestruct(compiler); + return; + } + shader_src = ShGetObjectCode(compiler); } - shader_src = ShGetObjectCode(compiler); #endif // GLES2_GPU_SERVICE_TRANSLATE_SHADER #endif // GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2 @@ -3100,7 +3105,9 @@ void GLES2DecoderImpl::DoCompileShader(GLuint client_id) { #if !defined(GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2) && !defined(UNIT_TEST) #ifdef GLES2_GPU_SERVICE_TRANSLATE_SHADER - ShDestruct(compiler); + if (use_shader_translator_) { + ShDestruct(compiler); + } #endif // GLES2_GPU_SERVICE_TRANSLATE_SHADER #endif // GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2 }; @@ -3494,7 +3501,9 @@ error::Error GLES2DecoderImpl::HandleGetAttribLocationBucket( return error::kInvalidArguments; } std::string name_str; - bucket->GetAsString(&name_str); + if (!bucket->GetAsString(&name_str)) { + return error::kInvalidArguments; + } return GetAttribLocationHelper( c.program, c.location_shm_id, c.location_shm_offset, name_str); } @@ -3559,7 +3568,9 @@ error::Error GLES2DecoderImpl::HandleGetUniformLocationBucket( return error::kInvalidArguments; } std::string name_str; - bucket->GetAsString(&name_str); + if (!bucket->GetAsString(&name_str)) { + return error::kInvalidArguments; + } return GetUniformLocationHelper( c.program, c.location_shm_id, c.location_shm_offset, name_str); } @@ -4278,14 +4289,35 @@ error::Error GLES2DecoderImpl::HandleSwapBuffers( return error::kNoError; } -void GLES2DecoderImpl::DoCommandBufferEnable(GLenum pname, GLboolean enable) { - switch (pname) { - case GLES2_ALLOW_BUFFERS_ON_MULTIPLE_TARGETS: - buffer_manager()->set_allow_buffers_on_multiple_targets(enable != 0); - break; - default: - break; +error::Error GLES2DecoderImpl::HandleCommandBufferEnable( + uint32 immediate_data_size, const gles2::CommandBufferEnable& c) { + Bucket* bucket = GetBucket(c.bucket_id); + typedef gles2::CommandBufferEnable::Result Result; + Result* result = GetSharedMemoryAs<Result*>( + c.result_shm_id, c.result_shm_offset, sizeof(*result)); + if (!result) { + return error::kOutOfBounds; + } + // Check that the client initialized the result. + if (*result != 0) { + return error::kInvalidArguments; } + std::string feature_str; + if (!bucket->GetAsString(&feature_str)) { + return error::kInvalidArguments; + } + + // TODO(gman): make this some kind of table to function pointer thingy. + 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_SKIP_GLSL_TRANSLATION) == 0) { + use_shader_translator_ = false; + } else { + return error::kNoError; + } + + *result = 1; // true. + return error::kNoError; } // Include the auto-generated part of this file. We split this because it means diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h index ef78ba5..0b595e4 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h @@ -2735,17 +2735,5 @@ error::Error GLES2DecoderImpl::HandleGetMaxValueInBuffer( return error::kNoError; } -error::Error GLES2DecoderImpl::HandleCommandBufferEnable( - uint32 immediate_data_size, const gles2::CommandBufferEnable& c) { - GLenum cap = static_cast<GLenum>(c.cap); - GLboolean enable = static_cast<GLboolean>(c.enable); - if (!ValidateGLenumCommandBufferState(cap)) { - SetGLError(GL_INVALID_ENUM, "glCommandBufferEnable: cap GL_INVALID_ENUM"); - return error::kNoError; - } - DoCommandBufferEnable(cap, enable); - return error::kNoError; -} - #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ 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 9e4fbdc..75f237c 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 @@ -1626,13 +1626,7 @@ TEST_F(GLES2DecoderTest2, ViewportInvalidArgs3_0) { // TODO(gman): RegisterSharedIds +// TODO(gman): CommandBufferEnable -TEST_F(GLES2DecoderTest2, CommandBufferEnableValidArgs) { - SpecializedSetup<CommandBufferEnable, 0>(); - CommandBufferEnable cmd; - cmd.Init(GLES2_ALLOW_BUFFERS_ON_MULTIPLE_TARGETS, 2); - EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); - EXPECT_EQ(GL_NO_ERROR, GetGLError()); -} #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_ diff --git a/gpu/command_buffer/service/gles2_cmd_validation_autogen.h b/gpu/command_buffer/service/gles2_cmd_validation_autogen.h index aea171b..f787137 100644 --- a/gpu/command_buffer/service/gles2_cmd_validation_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_validation_autogen.h @@ -13,7 +13,6 @@ bool ValidateGLenumBufferTarget(GLenum value); bool ValidateGLenumBufferUsage(GLenum value); bool ValidateGLenumCapability(GLenum value); bool ValidateGLenumCmpFunction(GLenum value); -bool ValidateGLenumCommandBufferState(GLenum value); bool ValidateGLenumCompressedTextureFormat(GLenum value); bool ValidateGLenumDrawMode(GLenum value); bool ValidateGLenumDstBlendFactor(GLenum value); diff --git a/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h b/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h index 0964c56..d28f7f1 100644 --- a/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h @@ -82,15 +82,6 @@ bool ValidateGLenumCmpFunction(GLenum value) { } } -bool ValidateGLenumCommandBufferState(GLenum value) { - switch (value) { - case GLES2_ALLOW_BUFFERS_ON_MULTIPLE_TARGETS: - return true; - default: - return false; - } -} - bool ValidateGLenumCompressedTextureFormat(GLenum value) { switch (value) { case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: |