summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gpu/command_buffer/service/gl_utils.h3
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc8
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc3
3 files changed, 14 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/gl_utils.h b/gpu/command_buffer/service/gl_utils.h
index 432dfb4..943681c 100644
--- a/gpu/command_buffer/service/gl_utils.h
+++ b/gpu/command_buffer/service/gl_utils.h
@@ -12,6 +12,9 @@
#if defined(UNIT_TEST)
#include "gpu/command_buffer/service/gl_mock.h"
+ #if !defined(GL_VERTEX_PROGRAM_POINT_SIZE)
+ #define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
+ #endif
#else
#if defined(GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2)
#include <GLES2/gl2.h> // NOLINT
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 63e267d..32308a5 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -1278,6 +1278,14 @@ bool GLES2DecoderImpl::Initialize(GLES2Decoder* parent,
DoBindFramebuffer(GL_FRAMEBUFFER, 0);
}
+#if !defined(GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2)
+ // 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.
+ glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
+#endif
+
return true;
}
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 2e78278..63a4bd5 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -83,6 +83,9 @@ void GLES2DecoderTestBase::SetUp() {
EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_CUBE_MAP, 0))
.Times(1)
.RetiresOnSaturation();
+ EXPECT_CALL(*gl_, Enable(GL_VERTEX_PROGRAM_POINT_SIZE))
+ .Times(1)
+ .RetiresOnSaturation();
engine_.reset(new StrictMock<MockCommandBufferEngine>());
Buffer buffer = engine_->GetSharedMemoryBuffer(kSharedMemoryId);