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

Unified Diff: gpu/command_buffer/service/texture_manager.cc

Issue 2146603005: Fix CopyTexImage2D when using unsized internal formats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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_decoder_unittest_textures.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_manager.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index f6a75dd40e91325cd5bc88ee00c8f5b83fb822d3..f57ea46eb192e81c65e18a253843643ddd815b69 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -3109,6 +3109,7 @@ void TextureManager::DumpTextureRef(base::trace_event::ProcessMemoryDump* pmd,
GLenum TextureManager::ExtractFormatFromStorageFormat(GLenum internalformat) {
switch (internalformat) {
+ case GL_RED:
case GL_R8:
case GL_R8_SNORM:
case GL_R16F:
@@ -3121,6 +3122,7 @@ GLenum TextureManager::ExtractFormatFromStorageFormat(GLenum internalformat) {
case GL_R32UI:
case GL_R32I:
return GL_RED_INTEGER;
+ case GL_RG:
case GL_RG8:
case GL_RG8_SNORM:
case GL_RG16F:
@@ -3155,6 +3157,8 @@ GLenum TextureManager::ExtractFormatFromStorageFormat(GLenum internalformat) {
case GL_RGB32UI:
case GL_RGB32I:
return GL_RGB_INTEGER;
+ case GL_SRGB:
+ return GL_SRGB;
case GL_ATC_RGBA_EXPLICIT_ALPHA_AMD:
case GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD:
case GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:
@@ -3172,6 +3176,8 @@ GLenum TextureManager::ExtractFormatFromStorageFormat(GLenum internalformat) {
case GL_RGBA16F:
case GL_RGBA32F:
return GL_RGBA;
+ case GL_SRGB_ALPHA:
+ return GL_SRGB_ALPHA;
case GL_RGBA8UI:
case GL_RGBA8I:
case GL_RGB10_A2UI:
@@ -3180,6 +3186,8 @@ GLenum TextureManager::ExtractFormatFromStorageFormat(GLenum internalformat) {
case GL_RGBA32UI:
case GL_RGBA32I:
return GL_RGBA_INTEGER;
+ case GL_BGRA_EXT:
+ return GL_BGRA_EXT;
case GL_DEPTH_COMPONENT16:
case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT32F:
@@ -3217,8 +3225,13 @@ GLenum TextureManager::ExtractFormatFromStorageFormat(GLenum internalformat) {
GLenum TextureManager::ExtractTypeFromStorageFormat(GLenum internalformat) {
switch (internalformat) {
+ case GL_RED:
+ case GL_RG:
case GL_RGB:
+ case GL_SRGB:
case GL_RGBA:
+ case GL_BGRA_EXT:
+ case GL_SRGB_ALPHA:
case GL_LUMINANCE_ALPHA:
case GL_LUMINANCE:
case GL_ALPHA:
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698