[Mesa-dev] [PATCH demos 1/3] Perf: Add command line capabilities to perf framework
Courtney Goeltzenleuchter
courtney at lunarg.com
Thu Nov 7 13:16:17 PST 2013
These were entirely interactive. Adding ability to pass in
command line arguments allows future tests to include
automated test capabilities.
Signed-off-by: Courtney Goeltzenleuchter <courtney at LunarG.com>
---
src/perf/copytex.c | 2 +-
src/perf/drawoverhead.c | 2 +-
src/perf/fbobind.c | 2 +-
src/perf/fill.c | 2 +-
src/perf/genmipmap.c | 2 +-
src/perf/glmain.c | 2 +-
src/perf/glmain.h | 2 +-
src/perf/glslstateschange.c | 2 +-
src/perf/readpixels.c | 2 +-
src/perf/swapbuffers.c | 2 +-
src/perf/teximage.c | 2 +-
src/perf/vbo.c | 2 +-
src/perf/vertexrate.c | 2 +-
13 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/perf/copytex.c b/src/perf/copytex.c
index f7a6b8a..376d699 100644
--- a/src/perf/copytex.c
+++ b/src/perf/copytex.c
@@ -57,7 +57,7 @@ static const struct vertex vertices[1] = {
/** Called from test harness/main */
void
-PerfInit(void)
+PerfInit(int argc, char *argv[])
{
const GLenum filter = GL_LINEAR;
GLenum stat;
diff --git a/src/perf/drawoverhead.c b/src/perf/drawoverhead.c
index f75c9bb..06a815f 100644
--- a/src/perf/drawoverhead.c
+++ b/src/perf/drawoverhead.c
@@ -55,7 +55,7 @@ static const struct vertex vertices[4] = {
/** Called from test harness/main */
void
-PerfInit(void)
+PerfInit(int argc, char *argv[])
{
/* setup VBO w/ vertex data */
glGenBuffersARB(1, &VBO);
diff --git a/src/perf/fbobind.c b/src/perf/fbobind.c
index fb52a93..4206294 100644
--- a/src/perf/fbobind.c
+++ b/src/perf/fbobind.c
@@ -56,7 +56,7 @@ static const struct vertex vertices[1] = {
/** Called from test harness/main */
void
-PerfInit(void)
+PerfInit(int argc, char *argv[])
{
const GLenum filter = GL_LINEAR;
GLenum stat;
diff --git a/src/perf/fill.c b/src/perf/fill.c
index 279f2b5..70cb64b 100644
--- a/src/perf/fill.c
+++ b/src/perf/fill.c
@@ -120,7 +120,7 @@ static GLuint ShaderProg1, ShaderProg2;
/** Called from test harness/main */
void
-PerfInit(void)
+PerfInit(int argc, char *argv[])
{
GLint u;
diff --git a/src/perf/genmipmap.c b/src/perf/genmipmap.c
index 20e2fa3..a37f7ab 100644
--- a/src/perf/genmipmap.c
+++ b/src/perf/genmipmap.c
@@ -52,7 +52,7 @@ static const struct vertex vertices[1] = {
/** Called from test harness/main */
void
-PerfInit(void)
+PerfInit(int argc, char *argv[])
{
if (!PerfExtensionSupported("GL_ARB_framebuffer_object")) {
printf("Sorry, this test requires GL_ARB_framebuffer_object\n");
diff --git a/src/perf/glmain.c b/src/perf/glmain.c
index 81c1173..3bc18ad 100644
--- a/src/perf/glmain.c
+++ b/src/perf/glmain.c
@@ -258,7 +258,7 @@ main(int argc, char *argv[])
glutSpecialFunc(SpecialKey);
glutDisplayFunc(Draw);
glutIdleFunc(Idle);
- PerfInit();
+ PerfInit(argc, argv);
glutMainLoop();
return 0;
}
diff --git a/src/perf/glmain.h b/src/perf/glmain.h
index d9bcd5f..18cde08 100644
--- a/src/perf/glmain.h
+++ b/src/perf/glmain.h
@@ -56,7 +56,7 @@ PerfExtensionSupported(const char *ext);
/** Test programs must implement these functions **/
extern void
-PerfInit(void);
+PerfInit(int argc, char *argv[]);
extern void
PerfNextRound(void);
diff --git a/src/perf/glslstateschange.c b/src/perf/glslstateschange.c
index 7422b78..83f8d6b 100644
--- a/src/perf/glslstateschange.c
+++ b/src/perf/glslstateschange.c
@@ -257,7 +257,7 @@ InitPrograms(void)
}
void
-PerfInit(void)
+PerfInit(int argc, char *argv[])
{
if (!ShadersSupported())
exit(1);
diff --git a/src/perf/readpixels.c b/src/perf/readpixels.c
index ac7dc42..1e777a6 100644
--- a/src/perf/readpixels.c
+++ b/src/perf/readpixels.c
@@ -51,7 +51,7 @@ static GLvoid *ReadBuffer;
/** Called from test harness/main */
void
-PerfInit(void)
+PerfInit(int argc, char *argv[])
{
/* setup VBO */
glGenBuffersARB(1, &VBO);
diff --git a/src/perf/swapbuffers.c b/src/perf/swapbuffers.c
index 63c7fc0..24436f7 100644
--- a/src/perf/swapbuffers.c
+++ b/src/perf/swapbuffers.c
@@ -50,7 +50,7 @@ static const struct vertex vertices[4] = {
/** Called from test harness/main */
void
-PerfInit(void)
+PerfInit(int argc, char *argv[])
{
/* setup VBO w/ vertex data */
glGenBuffersARB(1, &VBO);
diff --git a/src/perf/teximage.c b/src/perf/teximage.c
index a3005d0..88316f3 100644
--- a/src/perf/teximage.c
+++ b/src/perf/teximage.c
@@ -73,7 +73,7 @@ static const struct vertex vertices[1] = {
/** Called from test harness/main */
void
-PerfInit(void)
+PerfInit(int argc, char *argv[])
{
/* setup VBO w/ vertex data */
glGenBuffersARB(1, &VBO);
diff --git a/src/perf/vbo.c b/src/perf/vbo.c
index b326c05..6a0d313 100644
--- a/src/perf/vbo.c
+++ b/src/perf/vbo.c
@@ -51,7 +51,7 @@ static const GLfloat Vertex0[2] = { 0.0, 0.0 };
/** Called from test harness/main */
void
-PerfInit(void)
+PerfInit(int argc, char *argv[])
{
/* setup VBO */
glGenBuffersARB(1, &VBO);
diff --git a/src/perf/vertexrate.c b/src/perf/vertexrate.c
index b535552..833c2ba 100644
--- a/src/perf/vertexrate.c
+++ b/src/perf/vertexrate.c
@@ -91,7 +91,7 @@ InitializeVertexData(void)
/** Called from test harness/main */
void
-PerfInit(void)
+PerfInit(int argc, char *argv[])
{
InitializeVertexData();
--
1.8.1.2
More information about the mesa-dev
mailing list