mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
THIS BREAKS THE D3D PLUGIN FOR THE NEAR TERM. Resurrect an old patch that moves D3D over to the common shader generator framework. Needs a lot more work.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2484 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
namespace D3D
|
||||
{
|
||||
|
||||
LPDIRECT3DVERTEXSHADER9 CompileVShader(const char *code, int len)
|
||||
LPDIRECT3DVERTEXSHADER9 CompileVertexShader(const char *code, int len)
|
||||
{
|
||||
//try to compile
|
||||
LPD3DXBUFFER shaderBuffer = 0;
|
||||
@ -43,8 +43,7 @@ LPDIRECT3DVERTEXSHADER9 CompileVShader(const char *code, int len)
|
||||
std::string hello = (char*)errorBuffer->GetBufferPointer();
|
||||
hello += "\n\n";
|
||||
hello += code;
|
||||
if (g_Config.bShowShaderErrors)
|
||||
MessageBox(0, hello.c_str(), "Error compiling vertex shader", MB_ICONERROR);
|
||||
MessageBox(0, hello.c_str(), "Error compiling vertex shader", MB_ICONERROR);
|
||||
vShader = 0;
|
||||
}
|
||||
else if (SUCCEEDED(hr))
|
||||
@ -55,8 +54,7 @@ LPDIRECT3DVERTEXSHADER9 CompileVShader(const char *code, int len)
|
||||
hr = D3D::dev->CreateVertexShader((DWORD *)shaderBuffer->GetBufferPointer(), &vShader);
|
||||
if (FAILED(hr) || vShader == 0)
|
||||
{
|
||||
if (g_Config.bShowShaderErrors)
|
||||
MessageBox(0,code,(char*)errorBuffer->GetBufferPointer(),MB_ICONERROR);
|
||||
MessageBox(0, code, (char*)errorBuffer->GetBufferPointer(),MB_ICONERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,7 +67,7 @@ LPDIRECT3DVERTEXSHADER9 CompileVShader(const char *code, int len)
|
||||
return vShader;
|
||||
}
|
||||
|
||||
LPDIRECT3DPIXELSHADER9 CompilePShader(const char *code, int len)
|
||||
LPDIRECT3DPIXELSHADER9 CompilePixelShader(const char *code, int len)
|
||||
{
|
||||
LPD3DXBUFFER shaderBuffer = 0;
|
||||
LPD3DXBUFFER errorBuffer = 0;
|
||||
@ -83,8 +81,7 @@ LPDIRECT3DPIXELSHADER9 CompilePShader(const char *code, int len)
|
||||
std::string hello = (char*)errorBuffer->GetBufferPointer();
|
||||
hello += "\n\n";
|
||||
hello += code;
|
||||
if (g_Config.bShowShaderErrors)
|
||||
MessageBox(0, hello.c_str(), "Error compiling pixel shader", MB_ICONERROR);
|
||||
MessageBox(0, hello.c_str(), "Error compiling pixel shader", MB_ICONERROR);
|
||||
pShader = 0;
|
||||
}
|
||||
else
|
||||
@ -93,8 +90,7 @@ LPDIRECT3DPIXELSHADER9 CompilePShader(const char *code, int len)
|
||||
HRESULT hr = D3D::dev->CreatePixelShader((DWORD *)shaderBuffer->GetBufferPointer(), &pShader);
|
||||
if (FAILED(hr) || pShader == 0)
|
||||
{
|
||||
if (g_Config.bShowShaderErrors)
|
||||
MessageBox(0,"damn","error creating pixelshader",MB_ICONERROR);
|
||||
MessageBox(0, "damn", "error creating pixelshader", MB_ICONERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,4 +102,5 @@ LPDIRECT3DPIXELSHADER9 CompilePShader(const char *code, int len)
|
||||
|
||||
return pShader;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
Reference in New Issue
Block a user