| Jason Sams | e448dd1 | 2010-07-09 15:34:32 -0700 | [diff] [blame] | 1 | /* | 
 | 2 |  * Copyright (C) 2007 The Android Open Source Project | 
 | 3 |  * | 
 | 4 |  * Licensed under the Apache License, Version 2.0 (the "License"); | 
 | 5 |  * you may not use this file except in compliance with the License. | 
 | 6 |  * You may obtain a copy of the License at | 
 | 7 |  * | 
 | 8 |  *      http://www.apache.org/licenses/LICENSE-2.0 | 
 | 9 |  * | 
 | 10 |  * Unless required by applicable law or agreed to in writing, software | 
 | 11 |  * distributed under the License is distributed on an "AS IS" BASIS, | 
 | 12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
 | 13 |  * See the License for the specific language governing permissions and | 
 | 14 |  * limitations under the License. | 
 | 15 |  */ | 
 | 16 |  | 
 | 17 | #include <stdlib.h> | 
 | 18 | #include <stdio.h> | 
 | 19 | #include <time.h> | 
 | 20 | #include <sched.h> | 
 | 21 | #include <sys/resource.h> | 
| Andy McFadden | a5c381f | 2010-07-12 09:17:13 -0700 | [diff] [blame] | 22 | #include <string.h> | 
| Jason Sams | e448dd1 | 2010-07-09 15:34:32 -0700 | [diff] [blame] | 23 |  | 
 | 24 | #include <GLES2/gl2.h> | 
 | 25 | #include <GLES2/gl2ext.h> | 
 | 26 | #include <utils/Timers.h> | 
 | 27 | #include <EGL/egl.h> | 
| Jason Sams | 7920987 | 2010-07-20 19:37:58 -0700 | [diff] [blame] | 28 | #include <utils/Log.h> | 
| Jason Sams | e448dd1 | 2010-07-09 15:34:32 -0700 | [diff] [blame] | 29 |  | 
 | 30 |  | 
 | 31 | using namespace android; | 
 | 32 |  | 
| Jason Sams | e448dd1 | 2010-07-09 15:34:32 -0700 | [diff] [blame] | 33 |  | 
| Jason Sams | 7920987 | 2010-07-20 19:37:58 -0700 | [diff] [blame] | 34 | #include "fill_common.cpp" | 
| Jason Sams | e448dd1 | 2010-07-09 15:34:32 -0700 | [diff] [blame] | 35 |  | 
| Jason Sams | e448dd1 | 2010-07-09 15:34:32 -0700 | [diff] [blame] | 36 |  | 
 | 37 | bool doTest(uint32_t w, uint32_t h) { | 
| Jason Sams | 74b28e4 | 2010-09-08 15:22:06 -0700 | [diff] [blame] | 38 |     gWidth = w; | 
 | 39 |     gHeight = h; | 
| Jason Sams | e448dd1 | 2010-07-09 15:34:32 -0700 | [diff] [blame] | 40 |     setupVA(); | 
 | 41 |     genTextures(); | 
 | 42 |  | 
| Jason Sams | e0f1cff | 2010-07-12 11:41:46 -0700 | [diff] [blame] | 43 |     printf("\nvarColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\n"); | 
 | 44 |  | 
| Jason Sams | 74b28e4 | 2010-09-08 15:22:06 -0700 | [diff] [blame] | 45 |     for (uint32_t num = 0; num < gFragmentTestCount; num++) { | 
 | 46 |         doSingleTest(num, 2); | 
 | 47 |         if (gFragmentTests[num]->texCount) { | 
 | 48 |             doSingleTest(num, 1); | 
| Jason Sams | e448dd1 | 2010-07-09 15:34:32 -0700 | [diff] [blame] | 49 |         } | 
 | 50 |     } | 
 | 51 |  | 
 | 52 |     exit(0); | 
 | 53 |     return true; | 
 | 54 | } |