diff options
author | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-20 22:43:37 +0000 |
---|---|---|
committer | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-20 22:43:37 +0000 |
commit | c1d82b6a3c955189c3a807906779c2966ed16db5 (patch) | |
tree | 48a03a69d6b288a02972cd8eddaa2ad35c2ecd42 /gpu | |
parent | 9de0befc8d6cfefd5d0639e29ea12352a15b1a35 (diff) | |
download | chromium_src-c1d82b6a3c955189c3a807906779c2966ed16db5.zip chromium_src-c1d82b6a3c955189c3a807906779c2966ed16db5.tar.gz chromium_src-c1d82b6a3c955189c3a807906779c2966ed16db5.tar.bz2 |
Enabled GL_POINT_SPRITE capability in desktop GL backend for command
buffer. This is required in order to properly enable support for the
gl_PointCoord built-in variable in GLSL fragment shaders. Ran GPU unit
tests; requires
http://code.google.com/p/angleproject/issues/detail?id=35 to fully test.
BUG=55884
TEST=none
Review URL: http://codereview.chromium.org/3404006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 5 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index edb0a7f..4a38f62 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -1646,9 +1646,12 @@ bool GLES2DecoderImpl::Initialize(gfx::GLContext* context, // OpenGL ES 2.0 implicitly enables the desktop GL capability // VERTEX_PROGRAM_POINT_SIZE and doesn't expose this enum. This fact // isn't well documented; it was discovered in the Khronos OpenGL ES - // mailing list archives. + // mailing list archives. It also implicitly enables the desktop GL + // capability GL_POINT_SPRITE to provide access to the gl_PointCoord + // variable in fragment shaders. if (gfx::GetGLImplementation() != gfx::kGLImplementationEGLGLES2) { glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); + glEnable(GL_POINT_SPRITE); } if (use_shader_translator_) { diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc index 440440b..9f3f769 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc @@ -85,6 +85,10 @@ void GLES2DecoderTestBase::InitDecoder(const char* extensions) { .Times(1) .RetiresOnSaturation(); + EXPECT_CALL(*gl_, Enable(GL_POINT_SPRITE)) + .Times(1) + .RetiresOnSaturation(); + engine_.reset(new StrictMock<MockCommandBufferEngine>()); Buffer buffer = engine_->GetSharedMemoryBuffer(kSharedMemoryId); shared_memory_offset_ = kSharedMemoryOffset; |