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

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: WebGL video to texture support and readPixels from R16UI for CPU access Created 4 years, 4 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 f6a75dd40e91325cd5bc88ee00c8f5b83fb822d3..31f4e351c06aaf9661192a28ce2cd5545a123d82 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -165,10 +165,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},
{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},
Ken Russell (switch to Gerrit) 2016/08/16 00:22:27 This one isn't mentioned in the switch statement b
aleksandar.stojiljkovic 2016/08/16 12:02:31 Code change in this file isn't needed here. I'll r
aleksandar.stojiljkovic 2016/09/20 12:22:54 Done. As part of work on gpu buffers support, this
{GL_R16I, GL_RED_INTEGER, GL_SHORT},
{GL_R32UI, GL_RED_INTEGER, GL_UNSIGNED_INT},
{GL_R32I, GL_RED_INTEGER, GL_INT},
@@ -2903,6 +2906,14 @@ GLenum TextureManager::AdjustTexFormat(const gles2::FeatureInfo* feature_info,
if (swizzle)
return swizzle->dest_format;
}
+ switch (format) {
+ case GL_R32F:
+ case GL_R16F:
+ case GL_R8:
+ return GL_RED;
+ default:
+ break;
+ }
return format;
}

Powered by Google App Engine
This is Rietveld 408576698