| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 #include <GLES2/gl2.h> | 5 #include <GLES2/gl2.h> |
| 6 #include <GLES2/gl2ext.h> | 6 #include <GLES2/gl2ext.h> |
| 7 #include <GLES2/gl2extchromium.h> | 7 #include <GLES2/gl2extchromium.h> |
| 8 #include <GLES3/gl3.h> | 8 #include <GLES3/gl3.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 // clang-format on | 293 // clang-format on |
| 294 CreateProgramWithFragmentShader(kFragColorShader); | 294 CreateProgramWithFragmentShader(kFragColorShader); |
| 295 glBindFragDataLocationIndexedEXT(program_, 0, 1, "SecondaryFragColor"); | 295 glBindFragDataLocationIndexedEXT(program_, 0, 1, "SecondaryFragColor"); |
| 296 LinkProgram(); | 296 LinkProgram(); |
| 297 DrawAndVerify(); | 297 DrawAndVerify(); |
| 298 } | 298 } |
| 299 | 299 |
| 300 TEST_P(EXTBlendFuncExtendedES3DrawTest, ESSL3BindArrayWithSimpleName) { | 300 TEST_P(EXTBlendFuncExtendedES3DrawTest, ESSL3BindArrayWithSimpleName) { |
| 301 if (!IsApplicable()) | 301 if (!IsApplicable()) |
| 302 return; | 302 return; |
| 303 |
| 304 // Fails on the Intel Mesa driver, see |
| 305 // https://bugs.freedesktop.org/show_bug.cgi?id=96765 |
| 306 gpu::GPUTestBotConfig bot_config; |
| 307 if (bot_config.LoadCurrentConfig(nullptr) && |
| 308 bot_config.Matches("linux intel")) { |
| 309 return; |
| 310 } |
| 311 |
| 303 // clang-format off | 312 // clang-format off |
| 304 static const char* kFragDataShader = | 313 static const char* kFragDataShader = |
| 305 "#version 300 es\n" | 314 "#version 300 es\n" |
| 306 BFE_SHADER( | 315 BFE_SHADER( |
| 307 precision mediump float; | 316 precision mediump float; |
| 308 uniform vec4 src; | 317 uniform vec4 src; |
| 309 uniform vec4 src1; | 318 uniform vec4 src1; |
| 310 out vec4 FragData[1]; | 319 out vec4 FragData[1]; |
| 311 out vec4 SecondaryFragData[1]; | 320 out vec4 SecondaryFragData[1]; |
| 312 void main() { | 321 void main() { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 361 |
| 353 glBindFragDataLocationEXT(program_, 0, "FragData"); | 362 glBindFragDataLocationEXT(program_, 0, "FragData"); |
| 354 glBindFragDataLocationIndexedEXT(program_, 0, 1, "SecondaryFragData"); | 363 glBindFragDataLocationIndexedEXT(program_, 0, 1, "SecondaryFragData"); |
| 355 EXPECT_TRUE(LinkProgram()); | 364 EXPECT_TRUE(LinkProgram()); |
| 356 DrawAndVerify(); | 365 DrawAndVerify(); |
| 357 } | 366 } |
| 358 | 367 |
| 359 TEST_P(EXTBlendFuncExtendedES3DrawTest, ESSL3BindArrayAsArray) { | 368 TEST_P(EXTBlendFuncExtendedES3DrawTest, ESSL3BindArrayAsArray) { |
| 360 if (!IsApplicable()) | 369 if (!IsApplicable()) |
| 361 return; | 370 return; |
| 371 |
| 372 // Fails on the Intel Mesa driver, see |
| 373 // https://bugs.freedesktop.org/show_bug.cgi?id=96765 |
| 374 gpu::GPUTestBotConfig bot_config; |
| 375 if (bot_config.LoadCurrentConfig(nullptr) && |
| 376 bot_config.Matches("linux intel")) { |
| 377 return; |
| 378 } |
| 379 |
| 362 // clang-format off | 380 // clang-format off |
| 363 static const char* kFragDataShader = | 381 static const char* kFragDataShader = |
| 364 "#version 300 es\n" | 382 "#version 300 es\n" |
| 365 BFE_SHADER( | 383 BFE_SHADER( |
| 366 precision mediump float; | 384 precision mediump float; |
| 367 uniform vec4 src; | 385 uniform vec4 src; |
| 368 uniform vec4 src1; | 386 uniform vec4 src1; |
| 369 out vec4 FragData[1]; | 387 out vec4 FragData[1]; |
| 370 out vec4 SecondaryFragData[1]; | 388 out vec4 SecondaryFragData[1]; |
| 371 void main() { | 389 void main() { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 // referring to the variable name with or without the first element array | 490 // referring to the variable name with or without the first element array |
| 473 // accessor. The getters can query location of the individual elements in | 491 // accessor. The getters can query location of the individual elements in |
| 474 // the array. The test does not actually use the base test drawing, | 492 // the array. The test does not actually use the base test drawing, |
| 475 // since the drivers at the time of writing do not support multiple | 493 // since the drivers at the time of writing do not support multiple |
| 476 // buffers and dual source blending. | 494 // buffers and dual source blending. |
| 477 TEST_P(EXTBlendFuncExtendedES3DrawTest, ES3GettersArray) { | 495 TEST_P(EXTBlendFuncExtendedES3DrawTest, ES3GettersArray) { |
| 478 if (!IsApplicable()) | 496 if (!IsApplicable()) |
| 479 return; | 497 return; |
| 480 | 498 |
| 481 // TODO(zmo): Figure out why this fails on AMD. crbug.com/585132. | 499 // TODO(zmo): Figure out why this fails on AMD. crbug.com/585132. |
| 500 // Also fails on the Intel Mesa driver, see |
| 501 // https://bugs.freedesktop.org/show_bug.cgi?id=96765 |
| 482 gpu::GPUTestBotConfig bot_config; | 502 gpu::GPUTestBotConfig bot_config; |
| 483 if (bot_config.LoadCurrentConfig(nullptr) && | 503 if (bot_config.LoadCurrentConfig(nullptr) && |
| 484 bot_config.Matches("linux amd")) { | 504 (bot_config.Matches("linux amd") || |
| 505 bot_config.Matches("linux intel"))) { |
| 485 return; | 506 return; |
| 486 } | 507 } |
| 487 | 508 |
| 488 const GLint kTestArraySize = 2; | 509 const GLint kTestArraySize = 2; |
| 489 const GLint kFragData0Location = 2; | 510 const GLint kFragData0Location = 2; |
| 490 const GLint kFragData1Location = 1; | 511 const GLint kFragData1Location = 1; |
| 491 const GLint kUnusedLocation = 5; | 512 const GLint kUnusedLocation = 5; |
| 492 | 513 |
| 493 // The test binds kTestArraySize -sized array to location 1 for test purposes. | 514 // The test binds kTestArraySize -sized array to location 1 for test purposes. |
| 494 // The GL_MAX_DRAW_BUFFERS must be > kTestArraySize, since an | 515 // The GL_MAX_DRAW_BUFFERS must be > kTestArraySize, since an |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 | 683 |
| 663 INSTANTIATE_TEST_CASE_P(TranslatorVariants, | 684 INSTANTIATE_TEST_CASE_P(TranslatorVariants, |
| 664 EXTBlendFuncExtendedDrawTest, | 685 EXTBlendFuncExtendedDrawTest, |
| 665 ::testing::Bool()); | 686 ::testing::Bool()); |
| 666 | 687 |
| 667 INSTANTIATE_TEST_CASE_P(TranslatorVariants, | 688 INSTANTIATE_TEST_CASE_P(TranslatorVariants, |
| 668 EXTBlendFuncExtendedES3DrawTest, | 689 EXTBlendFuncExtendedES3DrawTest, |
| 669 ::testing::Bool()); | 690 ::testing::Bool()); |
| 670 | 691 |
| 671 } // namespace gpu | 692 } // namespace gpu |
| OLD | NEW |