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

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

Issue 139013008: Implement support for rendering to 32-bit float textures on ES3 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Make TexSubImage validation agree with TexImage validation Created 6 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
Index: gpu/command_buffer/service/feature_info_unittest.cc
diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc
index 53d152778a347312570e1505ed7ba326b864f8b6..1a8cc126f5792e7c6c1c1cdda00637ad8824de0d 100644
--- a/gpu/command_buffer/service/feature_info_unittest.cc
+++ b/gpu/command_buffer/service/feature_info_unittest.cc
@@ -280,6 +280,10 @@ TEST_F(FeatureInfoTest, InitializeNoExtensions) {
GL_DEPTH24_STENCIL8));
EXPECT_FALSE(info_->validators()->texture_internal_format.IsValid(
GL_DEPTH_STENCIL));
+ EXPECT_FALSE(info_->validators()->texture_internal_format.IsValid(
+ GL_RGBA32F));
+ EXPECT_FALSE(info_->validators()->texture_internal_format.IsValid(
+ GL_RGB32F));
EXPECT_FALSE(info_->validators()->texture_format.IsValid(
GL_DEPTH_STENCIL));
EXPECT_FALSE(info_->validators()->pixel_type.IsValid(
@@ -407,6 +411,19 @@ TEST_F(FeatureInfoTest, InitializeEXT_read_format_bgra) {
GL_BGRA8_EXT));
}
+TEST_F(FeatureInfoTest, InitializeARB_texture_float) {
+ SetupInitExpectations("GL_ARB_texture_float");
+ EXPECT_TRUE(info_->feature_flags().chromium_color_buffer_float_rgba);
+ EXPECT_TRUE(info_->feature_flags().chromium_color_buffer_float_rgb);
+ std::string extensions = info_->extensions() + " ";
+ EXPECT_THAT(extensions, HasSubstr("GL_CHROMIUM_color_buffer_float_rgb "));
+ EXPECT_THAT(extensions, HasSubstr("GL_CHROMIUM_color_buffer_float_rgba"));
+ EXPECT_TRUE(info_->validators()->texture_internal_format.IsValid(
+ GL_RGBA32F));
+ EXPECT_TRUE(info_->validators()->texture_internal_format.IsValid(
+ GL_RGB32F));
+}
+
TEST_F(FeatureInfoTest, InitializeOES_texture_floatGLES2) {
SetupInitExpectations("GL_OES_texture_float");
EXPECT_FALSE(info_->feature_flags().enable_texture_float_linear);

Powered by Google App Engine
This is Rietveld 408576698