Sort the elements of the D3D11 input layouts before we store them in the cache.
This prevents a D3D11 error complaining that the input layout
uses a different ordering of the vertex elements than the vertex shader.
TRAC #22561
Signed-off-by: Geoff Lang
Signed-off-by: Shannon Woods
Author: Jamie Madill
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1931 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/ProgramBinary.h b/src/libGLESv2/ProgramBinary.h
index 86d01e1..5209f25 100644
--- a/src/libGLESv2/ProgramBinary.h
+++ b/src/libGLESv2/ProgramBinary.h
@@ -28,6 +28,7 @@
{
class ShaderExecutable;
class Renderer;
+struct TranslatedAttribute;
}
namespace gl
@@ -113,6 +114,8 @@
unsigned int getSerial() const;
+ void sortAttributesByLayout(rx::TranslatedAttribute attributes[gl::MAX_VERTEX_ATTRIBS], int sortedSemanticIndices[MAX_VERTEX_ATTRIBS]) const;
+
static std::string decorateAttribute(const std::string &name); // Prepend an underscore
private: