Merge 'master' into shader-uids-awesome.

Conflicts:
	Source/Core/VideoCommon/Src/LightingShaderGen.cpp
	Source/Core/VideoCommon/Src/PixelShaderGen.cpp
	Source/Core/VideoCommon/Src/PixelShaderGen.h
	Source/Core/VideoCommon/Src/VertexShaderGen.cpp
This commit is contained in:
NeoBrainX
2013-06-17 12:05:47 +02:00
172 changed files with 4585 additions and 1736 deletions

View File

@ -4,6 +4,7 @@
#include <map>
#include <set>
#include <locale.h>
#include "Common.h"
#include "Hash.h"
@ -156,7 +157,8 @@ static LPDIRECT3DPIXELSHADER9 CreateCopyShader(int copyMatrixType, int depthConv
// this should create the same shaders as before (plus some extras added for DF16), just... more manageably than listing the full program for each combination
char text[3072];
setlocale(LC_NUMERIC, "C"); // Reset locale for compilation
locale_t locale = newlocale(LC_NUMERIC_MASK, "C", NULL); // New locale for compilation
locale_t old_locale = uselocale(locale); // Apply the locale for this thread
text[sizeof(text) - 1] = 0x7C; // canary
char* p = text;
@ -215,8 +217,9 @@ static LPDIRECT3DPIXELSHADER9 CreateCopyShader(int copyMatrixType, int depthConv
WRITE(p, "}\n");
if (text[sizeof(text) - 1] != 0x7C)
PanicAlert("PixelShaderCache copy shader generator - buffer too small, canary has been eaten!");
setlocale(LC_NUMERIC, ""); // restore locale
uselocale(old_locale); // restore locale
freelocale(locale);
return D3D::CompileAndCreatePixelShader(text, (int)strlen(text));
}

View File

@ -197,6 +197,8 @@ void VertexManager::PrepareDrawBuffers(u32 stride)
D3D::SetIndices(m_index_buffers[m_current_index_buffer]);
}
ADDSTAT(stats.thisFrame.bytesVertexStreamed, datasize);
ADDSTAT(stats.thisFrame.bytesIndexStreamed, IndexDataSize);
}
void VertexManager::DrawVertexBuffer(int stride)

View File

@ -72,7 +72,7 @@ void VideoBackend::UpdateFPSDisplay(const char *text)
std::string VideoBackend::GetName()
{
return "Direct3D9";
return "DX9";
}
std::string VideoBackend::GetDisplayName()