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

Unified Diff: gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.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 | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc b/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc
index 5be1671cb362b5b13c355f4a0166a1104ab58312..94d904f8a4f052c55315f8a2aaf1662d67d0f95a 100644
--- a/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc
+++ b/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc
@@ -773,6 +773,56 @@ TEST_P(GLCopyTextureCHROMIUMTest, InternalFormat) {
}
}
+TEST_P(GLCopyTextureCHROMIUMTest, InternalFormatRGBFloat) {
+ if (!GLTestHelper::HasExtension("GL_CHROMIUM_color_buffer_float_rgb")) {
+ LOG(INFO)
+ << "GL_CHROMIUM_color_buffer_float_rgb not supported. Skipping test...";
+ return;
+ }
+ // TODO(qiankun.miao@intel.com): since RunCopyTexture requires dest texture to
+ // be texture complete, skip this test if float texture is not color
+ // filterable. We should remove this limitation when we find a way doesn't
+ // require dest texture to be texture complete in RunCopyTexture.
+ if (!gl_.decoder()
+ ->GetFeatureInfo()
+ ->feature_flags()
+ .enable_texture_float_linear) {
+ LOG(INFO) << "RGB32F texture is not filterable. Skipping test...";
+ return;
+ }
+ CopyType copy_type = GetParam();
+ FormatType src_format_type = {GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE};
+ FormatType dest_format_type = {GL_RGB32F, GL_RGB, GL_FLOAT};
+
+ RunCopyTexture(GL_TEXTURE_2D, copy_type, src_format_type, 0, dest_format_type,
+ 0, false);
+}
+
+TEST_P(GLCopyTextureCHROMIUMTest, InternalFormatRGBAFloat) {
+ if (!GLTestHelper::HasExtension("GL_CHROMIUM_color_buffer_float_rgba")) {
+ LOG(INFO) << "GL_CHROMIUM_color_buffer_float_rgba not supported. Skipping "
+ "test...";
+ return;
+ }
+ // TODO(qiankun.miao@intel.com): since RunCopyTexture requires dest texture to
+ // be texture complete, skip this test if float texture is not color
+ // filterable. We should remove this limitation when we find a way doesn't
+ // require dest texture to be texture complete in RunCopyTexture.
+ if (!gl_.decoder()
+ ->GetFeatureInfo()
+ ->feature_flags()
+ .enable_texture_float_linear) {
+ LOG(INFO) << "RGBA32F texture is not filterable. Skipping test...";
+ return;
+ }
+ CopyType copy_type = GetParam();
+ FormatType src_format_type = {GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE};
+ FormatType dest_format_type = {GL_RGBA32F, GL_RGBA, GL_FLOAT};
+
+ RunCopyTexture(GL_TEXTURE_2D, copy_type, src_format_type, 0, dest_format_type,
+ 0, false);
+}
+
TEST_P(GLCopyTextureCHROMIUMTest, InternalFormatNotSupported) {
CopyType copy_type = GetParam();
CreateAndBindDestinationTextureAndFBO(GL_TEXTURE_2D);
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698