summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp
diff options
context:
space:
mode:
authorNeoBrainX <NeoBrainX@googlemail.com>2010-06-12 15:49:21 +0000
committerNeoBrainX <NeoBrainX@googlemail.com>2010-06-12 15:49:21 +0000
commita6ebc8234f4e5aef62fb0ccf55dcf83211168896 (patch)
tree1ca68e54a11a005eb7f064c3f4a2147366367ad8 /Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp
parentf0d178122ed33972360ba9c268b0f814e45e0536 (diff)
Preparing stuff for DX11:
- be more strict with the input signature of generated pixel shaders - replace the D3D parameter with an API_TYPE one, so that we can further distinguish between DX9 and DX11 - for what it's worth dx11 (using vs_4_0) doesn't support D3DCOLORtoUBYTE4; added a workaround for this - add a "dx9-" prefix to the shader cache files to avoid conflicts with dx11 shaders Apart from that we're calling CommandProcessor::Shutdown() in main.cpp,Shutdown() now. Delete all files in User/ShaderCache if you want to save a few KB disk space :P git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5659 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp
index 2222b071aa..01d2f3edd7 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp
@@ -46,7 +46,7 @@ static VERTEXSHADER *pShaderLast = NULL;
static int s_nMaxVertexInstructions;
static float GC_ALIGNED16(lastVSconstants[C_FOGPARAMS+8][4]);
-void SetVSConstant4f(int const_number, float f1, float f2, float f3, float f4)
+void SetVSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4)
{
if ( lastVSconstants[const_number][0] != f1 ||
lastVSconstants[const_number][1] != f2 ||
@@ -61,7 +61,7 @@ void SetVSConstant4f(int const_number, float f1, float f2, float f3, float f4)
}
}
-void SetVSConstant4fv(int const_number, const float *f)
+void SetVSConstant4fv(unsigned int const_number, const float *f)
{
if (memcmp(&lastVSconstants[const_number], f, sizeof(float) * 4)) {
memcpy(&lastVSconstants[const_number], f, sizeof(float) * 4);
@@ -69,10 +69,10 @@ void SetVSConstant4fv(int const_number, const float *f)
}
}
-void SetMultiVSConstant4fv(int const_number, int count, const float *f)
+void SetMultiVSConstant4fv(unsigned int const_number, unsigned int count, const float *f)
{
const float *f0 = f;
- for (int i = 0; i < count; i++,f0+=4)
+ for (unsigned int i = 0; i < count; i++,f0+=4)
{
if (memcmp(&lastVSconstants[const_number + i], f0, sizeof(float) * 4)) {
memcpy(&lastVSconstants[const_number + i], f0, sizeof(float) * 4);
@@ -81,9 +81,9 @@ void SetMultiVSConstant4fv(int const_number, int count, const float *f)
}
}
-void SetMultiVSConstant3fv(int const_number, int count, const float *f)
+void SetMultiVSConstant3fv(unsigned int const_number, unsigned int count, const float *f)
{
- for (int i = 0; i < count; i++)
+ for (unsigned int i = 0; i < count; i++)
{
if (lastVSconstants[const_number + i][0] != f[0 + i*3] ||
lastVSconstants[const_number + i][1] != f[1 + i*3] ||
@@ -151,7 +151,7 @@ VERTEXSHADER* VertexShaderCache::GetShader(u32 components)
VSCacheEntry& entry = vshaders[uid];
entry.frameCount = frameCount;
pShaderLast = &entry.shader;
- const char *code = GenerateVertexShaderCode(components, false);
+ const char *code = GenerateVertexShaderCode(components, API_OPENGL);
#if defined(_DEBUG) || defined(DEBUGFAST)
if (g_ActiveConfig.iLog & CONF_SAVESHADERS && code) {