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

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

Issue 2121043002: 16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests: cc, skcanvas_video_renderer, wrtcrecorder... Fake capture supports Y16. 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
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 48b41c05511206835d60362f56dad766953c9844..c25b8ca8e75c337358a6c2833abbc530efd9e0c4 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -166,10 +166,13 @@ class FormatTypeValidator {
{GL_R8_SNORM, GL_RED, GL_BYTE},
{GL_R16F, GL_RED, GL_HALF_FLOAT},
{GL_R16F, GL_RED, GL_FLOAT},
+ {GL_R16F, GL_R16F, GL_HALF_FLOAT},
Ken Russell (switch to Gerrit) 2016/09/30 23:01:30 These entries are flat-out wrong. Please remove th
{GL_R32F, GL_RED, GL_FLOAT},
+ {GL_R32F, GL_R32F, GL_FLOAT},
{GL_R8UI, GL_RED_INTEGER, GL_UNSIGNED_BYTE},
{GL_R8I, GL_RED_INTEGER, GL_BYTE},
{GL_R16UI, GL_RED_INTEGER, GL_UNSIGNED_SHORT},
+ {GL_R16UI, GL_R16UI, GL_UNSIGNED_SHORT},
{GL_R16I, GL_RED_INTEGER, GL_SHORT},
{GL_R32UI, GL_RED_INTEGER, GL_UNSIGNED_INT},
{GL_R32I, GL_RED_INTEGER, GL_INT},
@@ -2905,6 +2908,18 @@ GLenum TextureManager::AdjustTexFormat(const gles2::FeatureInfo* feature_info,
if (swizzle)
return swizzle->dest_format;
}
+ switch (format) {
Ken Russell (switch to Gerrit) 2016/09/30 23:01:30 This mapping back of illegal formats to correct on
+ case GL_R32F:
+ case GL_R16F:
+ case GL_R8:
+ return GL_RED;
+ case GL_RG8:
+ return GL_RG;
+ case GL_R16UI:
+ return GL_RED_INTEGER;
+ default:
+ break;
+ }
return format;
}

Powered by Google App Engine
This is Rietveld 408576698