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

Unified Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

Issue 1929203003: Revert of Fix ReadPixels from float fbo buffer in ES2/WebGL1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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.cc
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index 9f3cbb2585ae53ee1bf7cecf81961bc3a11e897b..8eeaf2488c4e18d0a9248a8743b47d7159ad749e 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -1067,16 +1067,30 @@
case GL_RG32F:
case GL_RGB32F:
case GL_RGBA32F:
- case GL_R11F_G11F_B10F:
- return GL_UNSIGNED_BYTE;
+ return GL_FLOAT;
case GL_R16F:
case GL_RG16F:
+ case GL_R11F_G11F_B10F:
case GL_RGB16F:
case GL_RGBA16F:
- return GL_HALF_FLOAT;
- default:
- // Unsized internal format.
- return texture_type;
+ // TODO(zmo): Consider return GL_UNSIGNED_INT_10F_11F_11F_REV and
+ // GL_HALF_FLOAT.
+ return GL_FLOAT;
+ case GL_RGBA:
+ case GL_RGB:
+ // Unsized internal format, check the type
+ switch (texture_type) {
+ case GL_FLOAT:
+ case GL_HALF_FLOAT_OES:
+ return GL_FLOAT;
+ // TODO(zmo): Consider return GL_UNSIGNED_SHORT_5_6_5,
+ // GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_5_5_5_1, and
+ // GL_UNSIGNED_INT_2_10_10_10_REV.
+ default:
+ return GL_UNSIGNED_BYTE;
+ }
+ default:
+ return GL_UNSIGNED_BYTE;
}
}
« no previous file with comments | « content/test/gpu/gpu_tests/webgl_conformance_expectations.py ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698