Adds support for OpenGL ES 2.0 extensions
this one specifically adds support for
GL_EXT_texture_compression_dxt1 and
GL_OES_texture_npot and
GL_EXT_texture_format_BGRA8888
TEST=unit tests
BUG=none
Review URL: http://codereview.chromium.org/2827051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52598 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index ceabfa79..e1df544f 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3006,7 +3006,7 @@
uniform_info->type == GL_SAMPLER_2D ?
texture_unit.bound_texture_2d :
texture_unit.bound_texture_cube_map;
- if (!texture_info || !texture_info->CanRender()) {
+ if (!texture_info || !texture_info->CanRender(texture_manager())) {
textures_set = true;
glActiveTexture(GL_TEXTURE0 + texture_unit_index);
glBindTexture(
@@ -3039,7 +3039,7 @@
uniform_info->type == GL_SAMPLER_2D ?
texture_unit.bound_texture_2d :
texture_unit.bound_texture_cube_map;
- if (!texture_info || !texture_info->CanRender()) {
+ if (!texture_info || !texture_info->CanRender(texture_manager())) {
glActiveTexture(GL_TEXTURE0 + texture_unit_index);
// Get the texture info that was previously bound here.
texture_info = texture_unit.bind_target == GL_TEXTURE_2D ?
@@ -4040,7 +4040,7 @@
str = "OpenGL ES GLSL ES 1.0 Chromium";
break;
case GL_EXTENSIONS:
- str = "";
+ str = group_->extensions().c_str();
break;
default:
str = gl_str;
@@ -4323,6 +4323,11 @@
}
texture_manager()->SetLevelInfo(info,
target, level, internal_format, width, height, 1, border, format, type);
+ #if !defined(GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2)
+ if (format == GL_BGRA_EXT && internal_format == GL_BGRA_EXT) {
+ internal_format = GL_RGBA;
+ }
+ #endif
glTexImage2D(
target, level, internal_format, width, height, border, format, type,
pixels);