summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.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_VideoDX9/Src/PixelShaderCache.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_VideoDX9/Src/PixelShaderCache.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp
index e309b7bcbf..f5790957c7 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/PixelShaderCache.cpp
@@ -48,7 +48,6 @@ static LPDIRECT3DPIXELSHADER9 s_DepthMatrixProgram[3];
static LPDIRECT3DPIXELSHADER9 s_ClearProgram = 0;
-
LPDIRECT3DPIXELSHADER9 PixelShaderCache::GetColorMatrixProgram(int SSAAMode)
{
return s_ColorMatrixProgram[SSAAMode % 3];
@@ -69,7 +68,7 @@ LPDIRECT3DPIXELSHADER9 PixelShaderCache::GetClearProgram()
return s_ClearProgram;
}
-void SetPSConstant4f(int const_number, float f1, float f2, float f3, float f4)
+void SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4)
{
if (lastPSconstants[const_number][0] != f1 || lastPSconstants[const_number][1] != f2 ||
lastPSconstants[const_number][2] != f3 || lastPSconstants[const_number][3] != f4)
@@ -83,7 +82,7 @@ void SetPSConstant4f(int const_number, float f1, float f2, float f3, float f4)
}
}
-void SetPSConstant4fv(int const_number, const float *f)
+void SetPSConstant4fv(unsigned int const_number, const float *f)
{
if (memcmp(&lastPSconstants[const_number], f, sizeof(float) * 4)) {
memcpy(&lastPSconstants[const_number], f, sizeof(float) * 4);
@@ -91,7 +90,7 @@ void SetPSConstant4fv(int const_number, const float *f)
}
}
-void SetMultiPSConstant4fv(int const_number, int count, const float *f)
+void SetMultiPSConstant4fv(unsigned int const_number, unsigned int count, const float *f)
{
if (memcmp(&lastPSconstants[const_number], f, count * sizeof(float) * 4)) {
memcpy(&lastPSconstants[const_number], f, count * sizeof(float) * 4);
@@ -260,7 +259,7 @@ void PixelShaderCache::Init()
File::CreateDir(File::GetUserPath(D_SHADERCACHE_IDX));
char cache_filename[MAX_PATH];
- sprintf(cache_filename, "%s%s-ps.cache", File::GetUserPath(D_SHADERCACHE_IDX), globals->unique_id);
+ sprintf(cache_filename, "%sdx9-%s-ps.cache", File::GetUserPath(D_SHADERCACHE_IDX), globals->unique_id);
PixelShaderCacheInserter inserter;
int read_items = g_ps_disk_cache.OpenAndRead(cache_filename, &inserter);
}