Implemented support for DX11 driver uniforms by assigning fixed register slots.

TRAC #22369
Signed-off-by: Daniel Koch
Signed-off-by: Geoff Lang
Author: Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1682 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/renderer/Renderer11.cpp b/src/libGLESv2/renderer/Renderer11.cpp
index 18a5c1e..5857c60 100644
--- a/src/libGLESv2/renderer/Renderer11.cpp
+++ b/src/libGLESv2/renderer/Renderer11.cpp
@@ -867,7 +867,7 @@
     }
 }
 
-void Renderer11::applyUniforms(const gl::UniformArray *uniformArray)
+void Renderer11::applyUniforms(const gl::UniformArray *uniformArray, const dx_VertexConstants &vertexConstants, const dx_PixelConstants &pixelConstants)
 {
     D3D11_BUFFER_DESC constantBufferDescription = {0};
     constantBufferDescription.ByteWidth = D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT * sizeof(float[4]);
@@ -940,6 +940,10 @@
         }
     }
 
+    // Driver uniforms
+    memcpy(cVS, &vertexConstants, sizeof(dx_VertexConstants));
+    memcpy(cPS, &pixelConstants, sizeof(dx_PixelConstants));
+
     mDeviceContext->Unmap(constantBufferVS, 0);
     mDeviceContext->VSSetConstantBuffers(0, 1, &constantBufferVS);
     constantBufferVS->Release();