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

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

Issue 2474593002: Float formats are allowed for CopyTexImage with EXT_color_buffer_float (Closed)
Patch Set: Created 4 years, 1 month 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/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 9f5430b67b2a41cccc4f44be588b32b212e87c4c..ef5f15f559e5e90999d0b162e417b7220fb58075 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -13713,8 +13713,12 @@ bool GLES2DecoderImpl::ValidateCopyTexFormat(
}
if (feature_info_->IsES3Enabled()) {
GLint color_encoding = GetColorEncodingFromInternalFormat(read_format);
+ bool float_mismatch= feature_info_->ext_color_buffer_float_available() ?
+ (GLES2Util::IsIntegerFormat(internal_format) !=
+ GLES2Util::IsIntegerFormat(read_format)) :
+ GLES2Util::IsFloatFormat(internal_format);
if (color_encoding != GetColorEncodingFromInternalFormat(internal_format) ||
- GLES2Util::IsFloatFormat(internal_format) ||
+ float_mismatch ||
(GLES2Util::IsSignedIntegerFormat(internal_format) !=
GLES2Util::IsSignedIntegerFormat(read_format)) ||
(GLES2Util::IsUnsignedIntegerFormat(internal_format) !=

Powered by Google App Engine
This is Rietveld 408576698