Remove points from fixed function.
Add basic GL performance test.

Change-Id: I421a41b6683b2c5f70045cdd0f610a6939105fee
diff --git a/rs.spec b/rs.spec
index 136c05d..80047c1 100644
--- a/rs.spec
+++ b/rs.spec
@@ -360,11 +360,6 @@
 	param float lw
 }
 
-ProgramRasterSetPointSize{
-	param RsProgramRaster pr
-	param float ps
-}
-
 
 ProgramBindConstants {
 	param RsProgram vp
diff --git a/rsProgramRaster.cpp b/rsProgramRaster.cpp
index 66f6ef8..7663840 100644
--- a/rsProgramRaster.cpp
+++ b/rsProgramRaster.cpp
@@ -41,8 +41,6 @@
     mPointSmooth = pointSmooth;
     mLineSmooth = lineSmooth;
     mPointSprite = pointSprite;
-
-    mPointSize = 1.0f;
     mLineWidth = 1.0f;
 }
 
@@ -55,11 +53,6 @@
     mLineWidth = s;
 }
 
-void ProgramRaster::setPointSize(float s)
-{
-    mPointSize = s;
-}
-
 void ProgramRaster::setupGL(const Context *rsc, ProgramRasterState *state)
 {
     if (state->mLast.get() == this) {
@@ -67,7 +60,6 @@
     }
     state->mLast.set(this);
 
-    glPointSize(mPointSize);
     if (mPointSmooth) {
         glEnable(GL_POINT_SMOOTH);
     } else {
@@ -102,7 +94,7 @@
 
 void ProgramRaster::serialize(OStream *stream) const
 {
-    
+
 }
 
 ProgramRaster *ProgramRaster::createFromStream(Context *rsc, IStream *stream)
@@ -147,12 +139,6 @@
     return pr;
 }
 
-void rsi_ProgramRasterSetPointSize(Context * rsc, RsProgramRaster vpr, float s)
-{
-    ProgramRaster *pr = static_cast<ProgramRaster *>(vpr);
-    pr->setPointSize(s);
-}
-
 void rsi_ProgramRasterSetLineWidth(Context * rsc, RsProgramRaster vpr, float s)
 {
     ProgramRaster *pr = static_cast<ProgramRaster *>(vpr);
diff --git a/rsProgramRaster.h b/rsProgramRaster.h
index 79b1475..ea78e76 100644
--- a/rsProgramRaster.h
+++ b/rsProgramRaster.h
@@ -41,17 +41,12 @@
     static ProgramRaster *createFromStream(Context *rsc, IStream *stream);
 
     void setLineWidth(float w);
-    void setPointSize(float s);
 
 protected:
     bool mPointSmooth;
     bool mLineSmooth;
     bool mPointSprite;
-
-    float mPointSize;
     float mLineWidth;
-
-
 };
 
 class ProgramRasterState
diff --git a/rsProgramVertex.cpp b/rsProgramVertex.cpp
index 85d90c7..5558007 100644
--- a/rsProgramVertex.cpp
+++ b/rsProgramVertex.cpp
@@ -191,7 +191,6 @@
         mShader.append("attribute vec4 ATTRIB_position;\n");
         mShader.append("attribute vec4 ATTRIB_color;\n");
         mShader.append("attribute vec3 ATTRIB_normal;\n");
-        mShader.append("attribute float ATTRIB_pointSize;\n");
         mShader.append("attribute vec4 ATTRIB_texture0;\n");
 
         for (uint32_t ct=0; ct < mUniformCount; ct++) {
@@ -202,7 +201,7 @@
 
         mShader.append("void main() {\n");
         mShader.append("  gl_Position = UNI_MVP * ATTRIB_position;\n");
-        mShader.append("  gl_PointSize = ATTRIB_pointSize;\n");
+        mShader.append("  gl_PointSize = 1.0;\n");
 
         mShader.append("  varColor = ATTRIB_color;\n");
         if (mTextureMatrixEnable) {
@@ -210,9 +209,6 @@
         } else {
             mShader.append("  varTex0 = ATTRIB_texture0;\n");
         }
-        //mShader.append("  pos.x = pos.x / 480.0;\n");
-        //mShader.append("  pos.y = pos.y / 800.0;\n");
-        //mShader.append("  gl_Position = pos;\n");
         mShader.append("}\n");
     }
 }
diff --git a/rsShaderCache.cpp b/rsShaderCache.cpp
index 504ffba..5c073b3 100644
--- a/rsShaderCache.cpp
+++ b/rsShaderCache.cpp
@@ -101,8 +101,7 @@
             glBindAttribLocation(pgm, 0, "ATTRIB_position");
             glBindAttribLocation(pgm, 1, "ATTRIB_color");
             glBindAttribLocation(pgm, 2, "ATTRIB_normal");
-            glBindAttribLocation(pgm, 3, "ATTRIB_pointSize");
-            glBindAttribLocation(pgm, 4, "ATTRIB_texture0");
+            glBindAttribLocation(pgm, 3, "ATTRIB_texture0");
         }
 
         //LOGE("e2 %x", glGetError());
diff --git a/rsVertexArray.cpp b/rsVertexArray.cpp
index 6937a85..001927c 100644
--- a/rsVertexArray.cpp
+++ b/rsVertexArray.cpp
@@ -144,10 +144,8 @@
                 slot = 1;
             } else if (mAttribs[ct].name == "normal") {
                 slot = 2;
-            } else if (mAttribs[ct].name == "pointSize") {
-                slot = 3;
             } else if (mAttribs[ct].name == "texture0") {
-                slot = 4;
+                slot = 3;
             } else {
                 continue;
             }
diff --git a/scriptc/rs_math.rsh b/scriptc/rs_math.rsh
index 3709296..4390a5d 100644
--- a/scriptc/rs_math.rsh
+++ b/scriptc/rs_math.rsh
@@ -48,6 +48,23 @@
 extern int rsSendToClient(void *data, int cmdID, int len, int waitForSpace);
 
 // Script to Script
+typedef struct rs_script_call_rec {
+    rs_script script;
+    rs_allocation input;
+    rs_allocation output;
+
+    uint32_t xStart;
+    uint32_t xEnd;
+    uint32_t yStart;
+    uint32_t yEnd;
+    uint32_t zStart;
+    uint32_t zEnd;
+    uint32_t arrayStart;
+    uint32_t arrayEnd;
+
+    const void * usrData;
+} rs_script_call;
+
 extern void __attribute__((overloadable))rsForEach(rs_script, rs_allocation input);
 extern void __attribute__((overloadable))rsForEach(rs_script, rs_allocation input, rs_allocation output);
 extern void __attribute__((overloadable))rsForEach(rs_script, rs_allocation input, int xStart, int xEnd);