зеркало из https://github.com/AvaloniaUI/angle.git
HLSL compilation shouldn't assume a 3.0 profile
TRAC #11054 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@67 736b8ea6-26fd-11df-bfd4-992fa37f6226
This commit is contained in:
Родитель
d37dec85de
Коммит
debe2591cc
|
@ -414,14 +414,17 @@ void Program::link()
|
|||
return;
|
||||
}
|
||||
|
||||
IDirect3DDevice9 *device = getDevice();
|
||||
const char *vertexProfile = D3DXGetVertexShaderProfile(device);
|
||||
const char *pixelProfile = D3DXGetPixelShaderProfile(device);
|
||||
|
||||
const char *pixelHLSL = mFragmentShader->linkHLSL();
|
||||
const char *vertexHLSL = mVertexShader->linkHLSL(pixelHLSL);
|
||||
ID3DXBuffer *vertexBinary = compileToBinary(vertexHLSL, "vs_3_0", &mConstantTableVS);
|
||||
ID3DXBuffer *pixelBinary = compileToBinary(pixelHLSL, "ps_3_0", &mConstantTablePS);
|
||||
ID3DXBuffer *vertexBinary = compileToBinary(vertexHLSL, vertexProfile, &mConstantTableVS);
|
||||
ID3DXBuffer *pixelBinary = compileToBinary(pixelHLSL, pixelProfile, &mConstantTablePS);
|
||||
|
||||
if (vertexBinary && pixelBinary)
|
||||
{
|
||||
IDirect3DDevice9 *device = getDevice();
|
||||
HRESULT vertexResult = device->CreateVertexShader((DWORD*)vertexBinary->GetBufferPointer(), &mVertexExecutable);
|
||||
HRESULT pixelResult = device->CreatePixelShader((DWORD*)pixelBinary->GetBufferPointer(), &mPixelExecutable);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче