mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Allows DX9 shaders to be SM2 compatible again at the loss of accuracy. SM3 is recommended. Fixes issue 4546.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7585 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -53,7 +53,7 @@ public:
|
||||
u32 values[PIXELSHADERUID_MAX_VALUES];
|
||||
u16 tevstages, indstages;
|
||||
|
||||
PIXELSHADERUID()
|
||||
PIXELSHADERUID()
|
||||
{
|
||||
memset(values, 0, PIXELSHADERUID_MAX_VALUES * 4);
|
||||
tevstages = indstages = 0;
|
||||
@ -65,11 +65,11 @@ public:
|
||||
indstages = r.indstages;
|
||||
int N = GetNumValues();
|
||||
_assert_(N <= PIXELSHADERUID_MAX_VALUES);
|
||||
for (int i = 0; i < N; ++i)
|
||||
for (int i = 0; i < N; ++i)
|
||||
values[i] = r.values[i];
|
||||
}
|
||||
|
||||
int GetNumValues() const
|
||||
int GetNumValues() const
|
||||
{
|
||||
return tevstages + indstages + 4;
|
||||
}
|
||||
@ -81,7 +81,7 @@ public:
|
||||
else if (values[0] > _Right.values[0])
|
||||
return false;
|
||||
int N = GetNumValues();
|
||||
for (int i = 1; i < N; ++i)
|
||||
for (int i = 1; i < N; ++i)
|
||||
{
|
||||
if (values[i] < _Right.values[i])
|
||||
return true;
|
||||
@ -96,7 +96,7 @@ public:
|
||||
if (values[0] != _Right.values[0])
|
||||
return false;
|
||||
int N = GetNumValues();
|
||||
for (int i = 1; i < N; ++i)
|
||||
for (int i = 1; i < N; ++i)
|
||||
{
|
||||
if (values[i] != _Right.values[i])
|
||||
return false;
|
||||
@ -113,7 +113,7 @@ enum DSTALPHA_MODE
|
||||
DSTALPHA_DUAL_SOURCE_BLEND // Use dual-source blending
|
||||
};
|
||||
|
||||
const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType, u32 components);
|
||||
const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType, u32 components, bool hlsl_sm_2_0 = false);
|
||||
void GetPixelShaderId(PIXELSHADERUID *uid, DSTALPHA_MODE dstAlphaMode);
|
||||
|
||||
extern PIXELSHADERUID last_pixel_shader_uid;
|
||||
|
Reference in New Issue
Block a user