summaryrefslogtreecommitdiffstats
path: root/src/demos/es2
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-08-21 18:26:49 +0000
committerSven Gothel <[email protected]>2008-08-21 18:26:49 +0000
commit489ef12b7c618d485a3f6db288dd441f380096af (patch)
tree9c4d9c821233a38371a9a80084ed1c080dd414d1 /src/demos/es2
parent0b657e84188652ea4e400861f778bdebcd35d6b3 (diff)
Fix ES2 PerfTst for APX
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@278 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/es2')
-rwxr-xr-xsrc/demos/es2/perftst/PerfUniLoad.java21
-rwxr-xr-xsrc/demos/es2/perftst/PerfVBOLoad.java2
-rwxr-xr-xsrc/demos/es2/perftst/shader/bin/nvidia/uni-vert-col.bvpbin8148 -> 6404 bytes
-rw-r--r--src/demos/es2/perftst/shader/uni-vert-col.vp6
4 files changed, 20 insertions, 9 deletions
diff --git a/src/demos/es2/perftst/PerfUniLoad.java b/src/demos/es2/perftst/PerfUniLoad.java
index a85de7f..8cb753a 100755
--- a/src/demos/es2/perftst/PerfUniLoad.java
+++ b/src/demos/es2/perftst/PerfUniLoad.java
@@ -8,6 +8,8 @@ import javax.media.opengl.glsl.*;
import com.sun.javafx.newt.*;
public class PerfUniLoad extends PerfModule {
+ static final int MAX_ARRAYS = 12;
+ static final int MAX_ARRAY_ELEM = 16;
GLUniformData[] dummyA, dummyB, dummyC;
final int dataType=GL.GL_FLOAT;
@@ -26,12 +28,12 @@ public class PerfUniLoad extends PerfModule {
// Vertices Data setup
//
- if(numObjs>16) {
- throw new GLException("numObjs must be within 0..16");
+ if(numObjs>MAX_ARRAYS) {
+ throw new GLException("numObjs must be within 0.."+MAX_ARRAYS);
}
- if(numArrayElem>16) {
- throw new GLException("numArrayElem must be within 0..16");
+ if(numArrayElem>MAX_ARRAY_ELEM) {
+ throw new GLException("numArrayElem must be within 0.."+MAX_ARRAY_ELEM);
}
st.glUseProgram(gl, true);
@@ -155,7 +157,7 @@ public class PerfUniLoad extends PerfModule {
st.glUseProgram(gl, false);
try {
- Thread.sleep(1000);
+ Thread.sleep(100);
} catch (Exception e) {}
}
@@ -168,13 +170,18 @@ public class PerfUniLoad extends PerfModule {
runOneSet(drawable, 8, 1, loops);
runOneSet(drawable, 1, 8, loops);
- runOneSet(drawable, 16, 1, loops);
+ if(MAX_ARRAYS>8) {
+ runOneSet(drawable, MAX_ARRAYS, 1, loops);
+ runOneSet(drawable, 1, MAX_ARRAYS, loops);
+ }
runOneSet(drawable, 1, 16, loops);
runOneSet(drawable, 2, 16, loops);
runOneSet(drawable, 4, 16, loops);
runOneSet(drawable, 8, 16, loops);
- runOneSet(drawable, 16, 16, loops);
+ if(MAX_ARRAYS>8) {
+ runOneSet(drawable, MAX_ARRAYS, 16, loops);
+ }
}
}
diff --git a/src/demos/es2/perftst/PerfVBOLoad.java b/src/demos/es2/perftst/PerfVBOLoad.java
index cf61e15..a909e79 100755
--- a/src/demos/es2/perftst/PerfVBOLoad.java
+++ b/src/demos/es2/perftst/PerfVBOLoad.java
@@ -156,7 +156,7 @@ public class PerfVBOLoad extends PerfModule {
st.glUseProgram(gl, false);
try {
- Thread.sleep(1000);
+ Thread.sleep(100);
} catch (Exception e) {}
}
diff --git a/src/demos/es2/perftst/shader/bin/nvidia/uni-vert-col.bvp b/src/demos/es2/perftst/shader/bin/nvidia/uni-vert-col.bvp
index d31682c..b89137d 100755
--- a/src/demos/es2/perftst/shader/bin/nvidia/uni-vert-col.bvp
+++ b/src/demos/es2/perftst/shader/bin/nvidia/uni-vert-col.bvp
Binary files differ
diff --git a/src/demos/es2/perftst/shader/uni-vert-col.vp b/src/demos/es2/perftst/shader/uni-vert-col.vp
index f6fab17..0550a8f 100644
--- a/src/demos/es2/perftst/shader/uni-vert-col.vp
+++ b/src/demos/es2/perftst/shader/uni-vert-col.vp
@@ -20,10 +20,12 @@ uniform MEDIUMP vec4 mgl_Dummy8[16];
uniform MEDIUMP vec4 mgl_Dummy9[16];
uniform MEDIUMP vec4 mgl_Dummy10[16];
uniform MEDIUMP vec4 mgl_Dummy11[16];
+/*
uniform MEDIUMP vec4 mgl_Dummy12[16];
uniform MEDIUMP vec4 mgl_Dummy13[16];
uniform MEDIUMP vec4 mgl_Dummy14[16];
uniform MEDIUMP vec4 mgl_Dummy15[16];
+ */
attribute HIGHP vec4 mgl_Vertex;
attribute HIGHP vec4 mgl_Color;
varying HIGHP vec4 frontColor;
@@ -31,7 +33,7 @@ varying HIGHP vec4 frontColor;
void main(void)
{
int i;
- vec4 val;
+ vec4 val=vec4(0);
for(i=0; i<16; i++) {
val += mgl_Dummy0[i];
@@ -46,10 +48,12 @@ void main(void)
val += mgl_Dummy9[i];
val += mgl_Dummy10[i];
val += mgl_Dummy11[i];
+ /*
val += mgl_Dummy12[i];
val += mgl_Dummy13[i];
val += mgl_Dummy14[i];
val += mgl_Dummy15[i];
+ */
}
frontColor=mgl_Color+val;