From bdb41dfe2f3ffb2eb35214348fb4e1b0e19da14e Mon Sep 17 00:00:00 2001 From: hrydgard Date: Sun, 8 Mar 2009 19:36:00 +0000 Subject: [PATCH] fix an error message in d3d plugin git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2618 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp | 3 +-- Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp | 5 ++++- Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp b/Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp index e79f308f0d..51fd7a4d19 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/NativeVertexFormat.cpp @@ -69,7 +69,6 @@ D3DDECLTYPE VarToD3D(VarType t) // TODO: Ban signed bytes as normals - not likely that ATI supports them natively. // We probably won't see much of a speed loss, and any speed loss will be regained anyway // when we finally compile display lists. - void D3DVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl) { vertex_stride = _vtx_decl.stride; @@ -125,7 +124,7 @@ void D3DVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl) if (_vtx_decl.posmtx_offset != -1) { - PanicAlert("boo %i", _vtx_decl.posmtx_offset); + PanicAlert("Posmtx stream not supported correctly. %i", _vtx_decl.posmtx_offset); // glVertexAttribPointer(SHADER_POSMTX_ATTRIB, 4, GL_UNSIGNED_BYTE, GL_FALSE, vtx_decl.stride, (void *)vtx_decl.posmtx_offset); elems[elem_idx].Offset = _vtx_decl.posmtx_offset; elems[elem_idx].Usage = D3DDECLUSAGE_BLENDINDICES; diff --git a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp index 10c40d769e..25ba1ccdc8 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp @@ -100,8 +100,11 @@ void PixelShaderCache::SetShader() INCSTAT(stats.numPixelShadersCreated); SETSTAT(stats.numPixelShadersAlive, (int)PixelShaders.size()); - } else if(g_Config.bShowShaderErrors) + } + else if (g_Config.bShowShaderErrors) + { PanicAlert("Failed to compile Pixel Shader:\n\n%s", code); + } } LPDIRECT3DPIXELSHADER9 PixelShaderCache::CompileCgShader(const char *pstrprogram) diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp index 9ac69fb39d..cc501866c0 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexShaderCache.cpp @@ -100,9 +100,11 @@ void VertexShaderCache::SetShader(u32 components) INCSTAT(stats.numVertexShadersCreated); SETSTAT(stats.numVertexShadersAlive, (int)vshaders.size()); - } else if(g_Config.bShowShaderErrors) + } + else if (g_Config.bShowShaderErrors) + { PanicAlert("Failed to compile Vertex Shader:\n\n%s", code); - + } D3D::dev->SetFVF(NULL); D3D::dev->SetVertexShader(shader); }