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

Unified Diff: gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h

Issue 1605323004: Check if internal_format is valid for GenerateMipmap(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
diff --git a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
index dcf3983162b6e72f9c3b302a53f644990810a61f..b501a188938e21ff39215a92e7b8d77555a5858d 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
@@ -4771,6 +4771,70 @@ std::string GLES2Util::GetStringTextureParameter(uint32_t value) {
arraysize(string_table), value);
}
+std::string GLES2Util::GetStringTextureSizedColorRenderableInternalFormat(
+ uint32_t value) {
+ static const EnumToString string_table[] = {
+ {GL_R8, "GL_R8"},
+ {GL_R8UI, "GL_R8UI"},
+ {GL_R8I, "GL_R8I"},
+ {GL_R16UI, "GL_R16UI"},
+ {GL_R16I, "GL_R16I"},
+ {GL_R32UI, "GL_R32UI"},
+ {GL_R32I, "GL_R32I"},
+ {GL_RG8, "GL_RG8"},
+ {GL_RG8UI, "GL_RG8UI"},
+ {GL_RG8I, "GL_RG8I"},
+ {GL_RG16UI, "GL_RG16UI"},
+ {GL_RG16I, "GL_RG16I"},
+ {GL_RG32UI, "GL_RG32UI"},
+ {GL_RG32I, "GL_RG32I"},
+ {GL_RGB8, "GL_RGB8"},
+ {GL_RGB565, "GL_RGB565"},
+ {GL_RGBA8, "GL_RGBA8"},
+ {GL_SRGB8_ALPHA8, "GL_SRGB8_ALPHA8"},
+ {GL_RGB5_A1, "GL_RGB5_A1"},
+ {GL_RGBA4, "GL_RGBA4"},
+ {GL_RGB10_A2, "GL_RGB10_A2"},
+ {GL_RGBA8UI, "GL_RGBA8UI"},
+ {GL_RGBA8I, "GL_RGBA8I"},
+ {GL_RGB10_A2UI, "GL_RGB10_A2UI"},
+ {GL_RGBA16UI, "GL_RGBA16UI"},
+ {GL_RGBA16I, "GL_RGBA16I"},
+ {GL_RGBA32UI, "GL_RGBA32UI"},
+ {GL_RGBA32I, "GL_RGBA32I"},
+ };
+ return GLES2Util::GetQualifiedEnumString(string_table,
+ arraysize(string_table), value);
+}
+
+std::string GLES2Util::GetStringTextureSizedTextureFilterableInternalFormat(
+ uint32_t value) {
+ static const EnumToString string_table[] = {
+ {GL_R8, "GL_R8"},
+ {GL_R8_SNORM, "GL_R8_SNORM"},
+ {GL_R16F, "GL_R16F"},
+ {GL_RG8, "GL_RG8"},
+ {GL_RG8_SNORM, "GL_RG8_SNORM"},
+ {GL_RG16F, "GL_RG16F"},
+ {GL_RGB8, "GL_RGB8"},
+ {GL_SRGB8, "GL_SRGB8"},
+ {GL_RGB565, "GL_RGB565"},
+ {GL_RGB8_SNORM, "GL_RGB8_SNORM"},
+ {GL_R11F_G11F_B10F, "GL_R11F_G11F_B10F"},
+ {GL_RGB9_E5, "GL_RGB9_E5"},
+ {GL_RGB16F, "GL_RGB16F"},
+ {GL_RGBA8, "GL_RGBA8"},
+ {GL_SRGB8_ALPHA8, "GL_SRGB8_ALPHA8"},
+ {GL_RGBA8_SNORM, "GL_RGBA8_SNORM"},
+ {GL_RGB5_A1, "GL_RGB5_A1"},
+ {GL_RGBA4, "GL_RGBA4"},
+ {GL_RGB10_A2, "GL_RGB10_A2"},
+ {GL_RGBA16F, "GL_RGBA16F"},
+ };
+ return GLES2Util::GetQualifiedEnumString(string_table,
+ arraysize(string_table), value);
+}
+
std::string GLES2Util::GetStringTextureTarget(uint32_t value) {
static const EnumToString string_table[] = {
{GL_TEXTURE_2D, "GL_TEXTURE_2D"},
@@ -4785,6 +4849,18 @@ std::string GLES2Util::GetStringTextureTarget(uint32_t value) {
arraysize(string_table), value);
}
+std::string GLES2Util::GetStringTextureUnsizedInternalFormat(uint32_t value) {
+ static const EnumToString string_table[] = {
+ {GL_ALPHA, "GL_ALPHA"},
+ {GL_LUMINANCE, "GL_LUMINANCE"},
+ {GL_LUMINANCE_ALPHA, "GL_LUMINANCE_ALPHA"},
+ {GL_RGB, "GL_RGB"},
+ {GL_RGBA, "GL_RGBA"},
+ };
+ return GLES2Util::GetQualifiedEnumString(string_table,
+ arraysize(string_table), value);
+}
+
std::string GLES2Util::GetStringTextureUsage(uint32_t value) {
static const EnumToString string_table[] = {
{GL_NONE, "GL_NONE"},
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_validation_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698