Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Unified Diff: gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h

Issue 2354713004: Implement WEBGL_compressed_texture_es3_0 extension for WebGL 1/2 (Closed)
Patch Set: fixup Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_validation.h ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h
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 6dc24714031013b68f8268fb6a30e589e63bb959..99e60b06a8ad2ffeb88af9fea5259d4e52b81239 100644
--- a/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h
@@ -166,19 +166,6 @@ bool Validators::CmpFunctionValidator::IsValid(const GLenum value) const {
return false;
};
-static const GLenum valid_compressed_texture_format_table_es3[] = {
- GL_COMPRESSED_R11_EAC,
- GL_COMPRESSED_SIGNED_R11_EAC,
- GL_COMPRESSED_RG11_EAC,
- GL_COMPRESSED_SIGNED_RG11_EAC,
- GL_COMPRESSED_RGB8_ETC2,
- GL_COMPRESSED_SRGB8_ETC2,
- GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
- GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
- GL_COMPRESSED_RGBA8_ETC2_EAC,
- GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
-};
-
static const GLenum valid_coverage_modulation_components_table[] = {
GL_RGB, GL_RGBA, GL_ALPHA, GL_NONE,
};
@@ -1147,16 +1134,6 @@ static const GLenum valid_texture_internal_format_storage_table_es3[] = {
GL_DEPTH_COMPONENT32F,
GL_DEPTH24_STENCIL8,
GL_DEPTH32F_STENCIL8,
- GL_COMPRESSED_R11_EAC,
- GL_COMPRESSED_SIGNED_R11_EAC,
- GL_COMPRESSED_RG11_EAC,
- GL_COMPRESSED_SIGNED_RG11_EAC,
- GL_COMPRESSED_RGB8_ETC2,
- GL_COMPRESSED_SRGB8_ETC2,
- GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
- GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
- GL_COMPRESSED_RGBA8_ETC2_EAC,
- GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
};
static const GLenum deprecated_texture_internal_format_storage_table_es3[] = {
@@ -1467,9 +1444,6 @@ void Validators::UpdateValuesES3() {
buffer_usage.SetIsES3(true);
capability.AddValues(valid_capability_table_es3,
arraysize(valid_capability_table_es3));
- compressed_texture_format.AddValues(
- valid_compressed_texture_format_table_es3,
- arraysize(valid_compressed_texture_format_table_es3));
dst_blend_factor.AddValues(valid_dst_blend_factor_table_es3,
arraysize(valid_dst_blend_factor_table_es3));
equation.AddValues(valid_equation_table_es3,
@@ -1528,6 +1502,34 @@ void Validators::UpdateValuesES3() {
arraysize(valid_vertex_attrib_type_table_es3));
vertex_attribute.AddValues(valid_vertex_attribute_table_es3,
arraysize(valid_vertex_attribute_table_es3));
+ UpdateES30CompressedTextureFormats();
+}
+
+void Validators::UpdateES30CompressedTextureFormats() {
+ compressed_texture_format.AddValue(GL_COMPRESSED_R11_EAC);
+ compressed_texture_format.AddValue(GL_COMPRESSED_SIGNED_R11_EAC);
+ compressed_texture_format.AddValue(GL_COMPRESSED_RG11_EAC);
+ compressed_texture_format.AddValue(GL_COMPRESSED_SIGNED_RG11_EAC);
+ compressed_texture_format.AddValue(GL_COMPRESSED_RGB8_ETC2);
+ compressed_texture_format.AddValue(GL_COMPRESSED_SRGB8_ETC2);
+ compressed_texture_format.AddValue(
+ GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2);
+ compressed_texture_format.AddValue(
+ GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2);
+ compressed_texture_format.AddValue(GL_COMPRESSED_RGBA8_ETC2_EAC);
+ compressed_texture_format.AddValue(GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC);
+ texture_internal_format_storage.AddValue(GL_COMPRESSED_R11_EAC);
+ texture_internal_format_storage.AddValue(GL_COMPRESSED_SIGNED_R11_EAC);
+ texture_internal_format_storage.AddValue(GL_COMPRESSED_RG11_EAC);
+ texture_internal_format_storage.AddValue(GL_COMPRESSED_SIGNED_RG11_EAC);
+ texture_internal_format_storage.AddValue(GL_COMPRESSED_RGB8_ETC2);
+ texture_internal_format_storage.AddValue(GL_COMPRESSED_SRGB8_ETC2);
+ texture_internal_format_storage.AddValue(
+ GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2);
+ texture_internal_format_storage.AddValue(
+ GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2);
+ texture_internal_format_storage.AddValue(GL_COMPRESSED_RGBA8_ETC2_EAC);
+ texture_internal_format_storage.AddValue(GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC);
}
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_IMPLEMENTATION_AUTOGEN_H_
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_validation.h ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698