Add a get*Function method to the ShaderExecutable interface
Trac #22155
Signed-off-by: Geoff Lang
Signed-off-by: Nicolas Capens
This allows ProgramBinary::save to avoid knowing about D3D9 shaders
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1508 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/renderer/ShaderExecutable9.cpp b/src/libGLESv2/renderer/ShaderExecutable9.cpp
index 0a19af1..e81a652 100644
--- a/src/libGLESv2/renderer/ShaderExecutable9.cpp
+++ b/src/libGLESv2/renderer/ShaderExecutable9.cpp
@@ -48,6 +48,26 @@
return static_cast<ShaderExecutable9*>(executable);
}
+bool ShaderExecutable9::getVertexFunction(void *pData, UINT *pSizeOfData)
+{
+ HRESULT hr = D3DERR_INVALIDCALL;
+ if (mVertexExecutable)
+ {
+ hr = mVertexExecutable->GetFunction(pData, pSizeOfData);
+ }
+ return SUCCEEDED(hr);
+}
+
+bool ShaderExecutable9::getPixelFunction(void *pData, UINT *pSizeOfData)
+{
+ HRESULT hr = D3DERR_INVALIDCALL;
+ if (mPixelExecutable)
+ {
+ hr = mPixelExecutable->GetFunction(pData, pSizeOfData);
+ }
+ return SUCCEEDED(hr);
+}
+
IDirect3DVertexShader9 *ShaderExecutable9::getVertexShader()
{
return mVertexExecutable;