| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS 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 BENCH_GL_MAIN_H_ | 5 #ifndef BENCH_GL_MAIN_H_ |
| 6 #define BENCH_GL_MAIN_H_ | 6 #define BENCH_GL_MAIN_H_ |
| 7 | 7 |
| 8 #include <gflags/gflags.h> | 8 #include <gflags/gflags.h> |
| 9 #include <sys/time.h> | 9 #include <sys/time.h> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 F(glGenBuffers, PFNGLGENBUFFERSPROC) \ | 29 F(glGenBuffers, PFNGLGENBUFFERSPROC) \ |
| 30 F(glGetAttribLocation, PFNGLGETATTRIBLOCATIONPROC) \ | 30 F(glGetAttribLocation, PFNGLGETATTRIBLOCATIONPROC) \ |
| 31 F(glGetInfoLogARB, PFNGLGETPROGRAMINFOLOGPROC) \ | 31 F(glGetInfoLogARB, PFNGLGETPROGRAMINFOLOGPROC) \ |
| 32 F(glGetProgramInfoLog, PFNGLGETPROGRAMINFOLOGPROC) \ | 32 F(glGetProgramInfoLog, PFNGLGETPROGRAMINFOLOGPROC) \ |
| 33 F(glGetShaderInfoLog, PFNGLGETSHADERINFOLOGPROC) \ | 33 F(glGetShaderInfoLog, PFNGLGETSHADERINFOLOGPROC) \ |
| 34 F(glGetUniformLocation, PFNGLGETUNIFORMLOCATIONPROC) \ | 34 F(glGetUniformLocation, PFNGLGETUNIFORMLOCATIONPROC) \ |
| 35 F(glLinkProgram, PFNGLLINKPROGRAMPROC) \ | 35 F(glLinkProgram, PFNGLLINKPROGRAMPROC) \ |
| 36 F(glShaderSource, PFNGLSHADERSOURCEPROC) \ | 36 F(glShaderSource, PFNGLSHADERSOURCEPROC) \ |
| 37 F(glUniform1f, PFNGLUNIFORM1FPROC) \ | 37 F(glUniform1f, PFNGLUNIFORM1FPROC) \ |
| 38 F(glUniform1i, PFNGLUNIFORM1IPROC) \ | 38 F(glUniform1i, PFNGLUNIFORM1IPROC) \ |
| 39 F(glUniform4fv, PFNGLUNIFORM4FVPROC) \ |
| 39 F(glUseProgram, PFNGLUSEPROGRAMPROC) \ | 40 F(glUseProgram, PFNGLUSEPROGRAMPROC) \ |
| 40 F(glVertexAttribPointer, PFNGLVERTEXATTRIBPOINTERPROC) \ | 41 F(glVertexAttribPointer, PFNGLVERTEXATTRIBPOINTERPROC) \ |
| 41 F(glXSwapIntervalSGI, PFNGLXSWAPINTERVALSGIPROC) \ | 42 F(glXSwapIntervalSGI, PFNGLXSWAPINTERVALSGIPROC) \ |
| 42 F(glXBindTexImageEXT, PFNGLXBINDTEXIMAGEEXTPROC) \ | 43 F(glXBindTexImageEXT, PFNGLXBINDTEXIMAGEEXTPROC) \ |
| 43 F(glXReleaseTexImageEXT, PFNGLXRELEASETEXIMAGEEXTPROC) | 44 F(glXReleaseTexImageEXT, PFNGLXRELEASETEXIMAGEEXTPROC) |
| 44 | 45 |
| 45 #define F(fun, type) extern type fun; | 46 #define F(fun, type) extern type fun; |
| 46 LIST_PROC_FUNCTIONS(F) | 47 LIST_PROC_FUNCTIONS(F) |
| 47 #undef F | 48 #undef F |
| 48 | 49 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // that: | 83 // that: |
| 83 // time it took to run x iterations = slope * x + bias | 84 // time it took to run x iterations = slope * x + bias |
| 84 // Returns false if one iteration of the test takes longer than | 85 // Returns false if one iteration of the test takes longer than |
| 85 // MAX_ITERATION_LENGTH_MS. The test is then assumed too slow to provide | 86 // MAX_ITERATION_LENGTH_MS. The test is then assumed too slow to provide |
| 86 // meaningful results. | 87 // meaningful results. |
| 87 bool Bench(BenchFunc func, float *slope, int64_t *bias); | 88 bool Bench(BenchFunc func, float *slope, int64_t *bias); |
| 88 | 89 |
| 89 void *MmapFile(const char *name, size_t *length); | 90 void *MmapFile(const char *name, size_t *length); |
| 90 | 91 |
| 91 #endif // BENCH_GL_MAIN_H_ | 92 #endif // BENCH_GL_MAIN_H_ |
| OLD | NEW |