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

Side by Side Diff: gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc

Issue 2591173002: Disable CopyTextureCHROMIUM gl_tests for RGB5_A1 format (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GL_GLEXT_PROTOTYPES 5 #ifndef GL_GLEXT_PROTOTYPES
6 #define GL_GLEXT_PROTOTYPES 6 #define GL_GLEXT_PROTOTYPES
7 #endif 7 #endif
8 8
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #include <GLES2/gl2ext.h> 10 #include <GLES2/gl2ext.h>
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 return !gl_.decoder() 288 return !gl_.decoder()
289 ->GetFeatureInfo() 289 ->GetFeatureInfo()
290 ->feature_flags() 290 ->feature_flags()
291 .ext_texture_format_bgra8888; 291 .ext_texture_format_bgra8888;
292 } 292 }
293 293
294 bool ShouldSkipSRGBEXT() const { 294 bool ShouldSkipSRGBEXT() const {
295 DCHECK(!ShouldSkipTest()); 295 DCHECK(!ShouldSkipTest());
296 return !gl_.decoder()->GetFeatureInfo()->feature_flags().ext_srgb; 296 return !gl_.decoder()->GetFeatureInfo()->feature_flags().ext_srgb;
297 } 297 }
298
299 // RGB5_A1 is not color-renderable on NVIDIA Mac, see crbug.com/676209.
300 bool ShouldSkipRGB5_A1() const {
301 DCHECK(!ShouldSkipTest());
302 return true;
303 }
298 }; 304 };
299 305
300 INSTANTIATE_TEST_CASE_P(CopyType, 306 INSTANTIATE_TEST_CASE_P(CopyType,
301 GLCopyTextureCHROMIUMTest, 307 GLCopyTextureCHROMIUMTest,
302 ::testing::ValuesIn(kCopyTypes)); 308 ::testing::ValuesIn(kCopyTypes));
303 309
304 INSTANTIATE_TEST_CASE_P(CopyType, 310 INSTANTIATE_TEST_CASE_P(CopyType,
305 GLCopyTextureCHROMIUMES3Test, 311 GLCopyTextureCHROMIUMES3Test,
306 ::testing::ValuesIn(kCopyTypes)); 312 ::testing::ValuesIn(kCopyTypes));
307 313
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 ShouldSkipBGRA()) { 424 ShouldSkipBGRA()) {
419 continue; 425 continue;
420 } 426 }
421 if (gles2::GLES2Util::IsFloatFormat(dest_format_type.internal_format) && 427 if (gles2::GLES2Util::IsFloatFormat(dest_format_type.internal_format) &&
422 ShouldSkipFloatFormat()) 428 ShouldSkipFloatFormat())
423 continue; 429 continue;
424 if ((dest_format_type.internal_format == GL_SRGB_EXT || 430 if ((dest_format_type.internal_format == GL_SRGB_EXT ||
425 dest_format_type.internal_format == GL_SRGB_ALPHA_EXT) && 431 dest_format_type.internal_format == GL_SRGB_ALPHA_EXT) &&
426 ShouldSkipSRGBEXT()) 432 ShouldSkipSRGBEXT())
427 continue; 433 continue;
434 if (dest_format_type.internal_format == GL_RGB5_A1 && ShouldSkipRGB5_A1())
435 continue;
428 436
429 const GLsizei kWidth = 8, kHeight = 8; 437 const GLsizei kWidth = 8, kHeight = 8;
430 const int src_channel_count = gles2::GLES2Util::ElementsPerGroup( 438 const int src_channel_count = gles2::GLES2Util::ElementsPerGroup(
431 src_format_type.format, src_format_type.type); 439 src_format_type.format, src_format_type.type);
432 uint8_t color[4] = {1, 63, 127, 255}; 440 uint8_t color[4] = {1, 63, 127, 255};
433 uint8_t pixels[8 * 8 * 4]; 441 uint8_t pixels[8 * 8 * 4];
434 for (int i = 0; i < kWidth * kHeight * src_channel_count; 442 for (int i = 0; i < kWidth * kHeight * src_channel_count;
435 i += src_channel_count) 443 i += src_channel_count)
436 for (int j = 0; j < src_channel_count; ++j) 444 for (int j = 0; j < src_channel_count; ++j)
437 pixels[i + j] = color[j]; 445 pixels[i + j] = color[j];
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 expected_color = y < copy_region_y + 1 ? blue : white; 1311 expected_color = y < copy_region_y + 1 ? blue : white;
1304 } 1312 }
1305 GLTestHelper::CheckPixels(x, y, 1, 1, 0, expected_color); 1313 GLTestHelper::CheckPixels(x, y, 1, 1, 0, expected_color);
1306 } 1314 }
1307 } 1315 }
1308 } 1316 }
1309 } 1317 }
1310 } 1318 }
1311 1319
1312 } // namespace gpu 1320 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698