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

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

Issue 2717953003: Support RGB32F and RGBA32F for CopyTextureCHROMIUM in ES2 with related extensions (Closed)
Patch Set: add more logging message Created 3 years, 10 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 | « no previous file | gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 67eab70d4c2b78f6cc40624311490d18bea8a6b8..cf4de7621aa459904e5f016ebbd778be3bc30d5f 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -13981,7 +13981,11 @@ bool GLES2DecoderImpl::ValidateCopyTexFormatHelper(
std::string("can not be used with depth or stencil textures");
return false;
}
- if (feature_info_->IsWebGL2OrES3Context()) {
+ if (feature_info_->IsWebGL2OrES3Context() ||
+ (feature_info_->feature_flags().chromium_color_buffer_float_rgb &&
+ internal_format == GL_RGB32F) ||
+ (feature_info_->feature_flags().chromium_color_buffer_float_rgba &&
+ internal_format == GL_RGBA32F)) {
if (GLES2Util::IsSizedColorFormat(internal_format)) {
int sr, sg, sb, sa;
GLES2Util::GetColorFormatComponentSizes(
@@ -16322,12 +16326,20 @@ CopyTextureMethod GLES2DecoderImpl::ValidateCopyTextureCHROMIUMInternalFormats(
case GL_RG16F:
case GL_RG32F:
case GL_RGB16F:
- case GL_RGB32F:
case GL_RGBA16F:
- case GL_RGBA32F:
case GL_R11F_G11F_B10F:
valid_dest_format = feature_info_->ext_color_buffer_float_available();
break;
+ case GL_RGB32F:
+ valid_dest_format =
+ feature_info_->ext_color_buffer_float_available() ||
+ feature_info_->feature_flags().chromium_color_buffer_float_rgb;
+ break;
+ case GL_RGBA32F:
+ valid_dest_format =
+ feature_info_->ext_color_buffer_float_available() ||
+ feature_info_->feature_flags().chromium_color_buffer_float_rgba;
+ break;
default:
valid_dest_format = false;
break;
« no previous file with comments | « no previous file | gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698