BPMemory: Expose the pixel_format and zformat fields in PE_CONTROL as enumerations.

This commit is contained in:
Tony Wasserka
2014-03-23 21:44:23 +01:00
parent 77a7bab5ae
commit 8941f19cdb
22 changed files with 160 additions and 157 deletions

View File

@ -32,8 +32,8 @@ public:
void Init();
void Shutdown();
size_t Encode(u8* dst, unsigned int dstFormat,
unsigned int srcFormat, const EFBRectangle& srcRect, bool isIntensity,
bool scaleByHalf);
PEControl::PixelFormat srcFormat, const EFBRectangle& srcRect,
bool isIntensity, bool scaleByHalf);
private:
@ -54,15 +54,15 @@ private:
// Stuff only used in static-linking mode (SM4.0-compatible)
bool InitStaticMode();
bool SetStaticShader(unsigned int dstFormat, unsigned int srcFormat,
bool isIntensity, bool scaleByHalf);
bool SetStaticShader(unsigned int dstFormat,
PEControl::PixelFormat srcFormat, bool isIntensity, bool scaleByHalf);
typedef unsigned int ComboKey; // Key for a shader combination
ComboKey MakeComboKey(unsigned int dstFormat, unsigned int srcFormat,
bool isIntensity, bool scaleByHalf)
ComboKey MakeComboKey(unsigned int dstFormat,
PEControl::PixelFormat srcFormat, bool isIntensity, bool scaleByHalf)
{
return (dstFormat << 4) | (srcFormat << 2) | (isIntensity ? (1<<1) : 0)
return (dstFormat << 4) | (static_cast<int>(srcFormat) << 2) | (isIntensity ? (1<<1) : 0)
| (scaleByHalf ? (1<<0) : 0);
}
@ -74,8 +74,8 @@ private:
// Microsoft fixes their bloody HLSL compiler)
bool InitDynamicMode();
bool SetDynamicShader(unsigned int dstFormat, unsigned int srcFormat,
bool isIntensity, bool scaleByHalf);
bool SetDynamicShader(unsigned int dstFormat,
PEControl::PixelFormat srcFormat, bool isIntensity, bool scaleByHalf);
ID3D11PixelShader* m_dynamicShader;
ID3D11ClassLinkage* m_classLinkage;