mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Put some stuff in the gfx plugins into namespaces, so that the symbols won't collide if someone decides to merge the gfx plugins into dolphin too. still more things left to do though.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6972 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -37,6 +37,9 @@
|
||||
#include "ImageWrite.h"
|
||||
#include "Debugger.h"
|
||||
|
||||
namespace DX9
|
||||
{
|
||||
|
||||
PixelShaderCache::PSCache PixelShaderCache::PixelShaders;
|
||||
const PixelShaderCache::PSCacheEntry *PixelShaderCache::last_entry;
|
||||
|
||||
@ -62,6 +65,15 @@ static LPDIRECT3DPIXELSHADER9 s_ClearProgram = NULL;
|
||||
static LPDIRECT3DPIXELSHADER9 s_rgba6_to_rgb8 = NULL;
|
||||
static LPDIRECT3DPIXELSHADER9 s_rgb8_to_rgba6 = NULL;
|
||||
|
||||
class PixelShaderCacheInserter : public LinearDiskCacheReader<PIXELSHADERUID, u8>
|
||||
{
|
||||
public:
|
||||
void Read(const PIXELSHADERUID &key, const u8 *value, u32 value_size)
|
||||
{
|
||||
PixelShaderCache::InsertByteCode(key, value, value_size, false);
|
||||
}
|
||||
};
|
||||
|
||||
LPDIRECT3DPIXELSHADER9 PixelShaderCache::GetColorMatrixProgram(int SSAAMode)
|
||||
{
|
||||
return s_CopyProgram[COPY_TYPE_MATRIXCOLOR][DEPTH_CONVERSION_TYPE_NONE][SSAAMode % MAX_SSAA_SHADERS];
|
||||
@ -141,31 +153,6 @@ LPDIRECT3DPIXELSHADER9 PixelShaderCache::ReinterpRGB8ToRGBA6()
|
||||
return s_rgb8_to_rgba6;
|
||||
}
|
||||
|
||||
void SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4)
|
||||
{
|
||||
float f[4] = { f1, f2, f3, f4 };
|
||||
D3D::dev->SetPixelShaderConstantF(const_number, f, 1);
|
||||
}
|
||||
|
||||
void SetPSConstant4fv(unsigned int const_number, const float *f)
|
||||
{
|
||||
D3D::dev->SetPixelShaderConstantF(const_number, f, 1);
|
||||
}
|
||||
|
||||
void SetMultiPSConstant4fv(unsigned int const_number, unsigned int count, const float *f)
|
||||
{
|
||||
D3D::dev->SetPixelShaderConstantF(const_number, f, count);
|
||||
}
|
||||
|
||||
class PixelShaderCacheInserter : public LinearDiskCacheReader<PIXELSHADERUID, u8>
|
||||
{
|
||||
public:
|
||||
void Read(const PIXELSHADERUID &key, const u8 *value, u32 value_size)
|
||||
{
|
||||
PixelShaderCache::InsertByteCode(key, value, value_size, false);
|
||||
}
|
||||
};
|
||||
|
||||
#define WRITE p+=sprintf
|
||||
|
||||
static LPDIRECT3DPIXELSHADER9 CreateCopyShader(int copyMatrixType, int depthConversionType, int SSAAMode)
|
||||
@ -430,3 +417,22 @@ bool PixelShaderCache::InsertByteCode(const PIXELSHADERUID &uid, const u8 *bytec
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace DX9
|
||||
|
||||
|
||||
void SetPSConstant4f(unsigned int const_number, float f1, float f2, float f3, float f4)
|
||||
{
|
||||
float f[4] = { f1, f2, f3, f4 };
|
||||
DX9::D3D::dev->SetPixelShaderConstantF(const_number, f, 1);
|
||||
}
|
||||
|
||||
void SetPSConstant4fv(unsigned int const_number, const float *f)
|
||||
{
|
||||
DX9::D3D::dev->SetPixelShaderConstantF(const_number, f, 1);
|
||||
}
|
||||
|
||||
void SetMultiPSConstant4fv(unsigned int const_number, unsigned int count, const float *f)
|
||||
{
|
||||
DX9::D3D::dev->SetPixelShaderConstantF(const_number, f, count);
|
||||
}
|
||||
|
Reference in New Issue
Block a user