Compiler - match pixel and vertex shader profiles
TRAC #11717
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@94 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Program.cpp b/src/libGLESv2/Program.cpp
index 71de712..df91db5 100644
--- a/src/libGLESv2/Program.cpp
+++ b/src/libGLESv2/Program.cpp
@@ -423,9 +423,9 @@
return;
}
- IDirect3DDevice9 *device = getDevice();
- const char *vertexProfile = D3DXGetVertexShaderProfile(device);
- const char *pixelProfile = D3DXGetPixelShaderProfile(device);
+ Context *context = getContext();
+ const char *vertexProfile = context->getVertexShaderProfile();
+ const char *pixelProfile = context->getPixelShaderProfile();
const char *pixelHLSL = mFragmentShader->linkHLSL();
const char *vertexHLSL = mVertexShader->linkHLSL(pixelHLSL);
@@ -434,6 +434,7 @@
if (vertexBinary && pixelBinary)
{
+ IDirect3DDevice9 *device = getDevice();
HRESULT vertexResult = device->CreateVertexShader((DWORD*)vertexBinary->GetBufferPointer(), &mVertexExecutable);
HRESULT pixelResult = device->CreatePixelShader((DWORD*)pixelBinary->GetBufferPointer(), &mPixelExecutable);