tests:Use specified bindings for input buffers
diff --git a/tests/tony_objs.c b/tests/tony_objs.c
index f892fc0..c6a1fe9 100644
--- a/tests/tony_objs.c
+++ b/tests/tony_objs.c
@@ -540,7 +540,7 @@
     void AddShader(XglShaderObj* shaderObj);
     void AddVertexInputAttribs(XGL_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION* vi_attrib, int count);
     void AddVertexInputBindings(XGL_VERTEX_INPUT_BINDING_DESCRIPTION* vi_binding, int count);
-    void AddVertexDataBuffer(XglConstantBufferObj* vertexDataBuffer);
+    void AddVertexDataBuffer(XglConstantBufferObj* vertexDataBuffer, int binding);
 
 protected:
     XGL_PIPELINE pipeline;
@@ -558,6 +558,7 @@
     int m_vi_attrib_count;
     vector<XglShaderObj*> m_shaderObjs;
     vector<XglConstantBufferObj*> m_vertexBufferObjs;
+    vector<int> m_vertexBufferBindings;
     int m_vertexBufferCount;
 
 };
@@ -630,9 +631,10 @@
     m_vi_binding_count = count;
 }
 
-void XglPipelineObj::AddVertexDataBuffer(XglConstantBufferObj* vertexDataBuffer)
+void XglPipelineObj::AddVertexDataBuffer(XglConstantBufferObj* vertexDataBuffer, int binding)
 {
     m_vertexBufferObjs.push_back(vertexDataBuffer);
+    m_vertexBufferBindings.push_back(binding);
     m_vertexBufferCount++;
 }
 
@@ -678,7 +680,7 @@
 
     for (int i=0; i < m_vertexBufferCount; i++)
     {
-        xglCmdBindVertexData(m_cmdBuffer, m_vertexBufferObjs[i]->m_constantBufferView.mem, m_vertexBufferObjs[i]->m_constantBufferView.offset, i);
+        xglCmdBindVertexData(m_cmdBuffer, m_vertexBufferObjs[i]->m_constantBufferView.mem, m_vertexBufferObjs[i]->m_constantBufferView.offset, m_vertexBufferBindings[i]);
     }
 
 
diff --git a/tests/tony_render_tests.cpp b/tests/tony_render_tests.cpp
index a2032d0..3e52a75 100644
--- a/tests/tony_render_tests.cpp
+++ b/tests/tony_render_tests.cpp
@@ -1040,7 +1040,7 @@
 
     pipelineobj.AddVertexInputAttribs(vi_attribs,2);
     pipelineobj.AddVertexInputBindings(&vi_binding,1);
-    pipelineobj.AddVertexDataBuffer(&meshBuffer);
+    pipelineobj.AddVertexDataBuffer(&meshBuffer,0);
 
     GenericDrawTriangleTest(pipelineobj, descriptorSet, 12);
     QueueCommandBuffer(NULL, 0);
@@ -1184,6 +1184,7 @@
 
     pipelineobj.AddVertexInputBindings(&vi_binding,1);
     pipelineobj.AddVertexInputAttribs(vi_attribs,2);
+    pipelineobj.AddVertexDataBuffer(&meshBuffer,0);
 
     ClearDepthStencil(1.0f);
     GenericDrawTriangleTest(pipelineobj, descriptorSet, 12);
@@ -1346,6 +1347,7 @@
 
     pipelineobj.AddVertexInputBindings(&vi_binding,1);
     pipelineobj.AddVertexInputAttribs(vi_attribs,2);
+    pipelineobj.AddVertexDataBuffer(&meshBuffer,0);
 
     ClearDepthStencil(1.0f);
     GenericDrawTriangleTest(pipelineobj, descriptorSet, 12);