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; |
} |