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

Unified Diff: gpu/command_buffer/common/gles2_cmd_utils_unittest.cc

Issue 10568003: Add support for GL_CHROMIUM_consistent_uniform_locations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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/common/gles2_cmd_utils_unittest.cc
diff --git a/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc b/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
index 277461ae7baec6a5ecf73178c72ec8cf0dd89945..d1c2714980a56b92c466e56a418679b71c9268b4 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils_unittest.cc
@@ -181,6 +181,17 @@ TEST_F(GLES2UtilTest, RenderbufferBytesPerPixel) {
EXPECT_EQ(0u, GLES2Util::RenderbufferBytesPerPixel(-1));
}
+TEST_F(GLES2UtilTest, SwizzleLocation) {
+ GLint power = 1;
+ for (GLint p = 0; p < 5; ++p, power *= 10) {
+ GLint limit = power * 20 + 1;
+ for (GLint ii = -limit; ii < limit; ii += power) {
+ GLint s = GLES2Util::SwizzleLocation(ii);
+ EXPECT_EQ(ii, GLES2Util::UnswizzleLocation(s));
+ }
+ }
+}
+
} // namespace gles2
} // namespace gpu

Powered by Google App Engine
This is Rietveld 408576698