mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
ConstantManager: Do not use single-element arrays.
This commit is contained in:
parent
6c2971eaf6
commit
6e65e02c9e
@ -19,7 +19,7 @@ struct PixelShaderConstants
|
||||
int4 indtexscale[2];
|
||||
int4 indtexmtx[6];
|
||||
int4 fogcolor;
|
||||
int4 fogi[1];
|
||||
int4 fogi;
|
||||
float4 fogf[2];
|
||||
|
||||
// For pixel lighting
|
||||
|
@ -253,7 +253,7 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
|
||||
DeclareUniform(out, ApiType, C_INDTEXSCALE, "int4", I_INDTEXSCALE"[2]");
|
||||
DeclareUniform(out, ApiType, C_INDTEXMTX, "int4", I_INDTEXMTX"[6]");
|
||||
DeclareUniform(out, ApiType, C_FOGCOLOR, "int4", I_FOGCOLOR);
|
||||
DeclareUniform(out, ApiType, C_FOGI, "int4", I_FOGI"[1]");
|
||||
DeclareUniform(out, ApiType, C_FOGI, "int4", I_FOGI);
|
||||
DeclareUniform(out, ApiType, C_FOGF, "float4", I_FOGF"[2]");
|
||||
|
||||
// For pixel lighting - TODO: Should only be defined when per pixel lighting is enabled!
|
||||
@ -989,7 +989,7 @@ static inline void WriteFog(T& out, pixel_shader_uid_data& uid_data)
|
||||
// TODO: Verify that we want to drop lower bits here! (currently taken over from software renderer)
|
||||
// Maybe we want to use "ze = (A << B_SHF)/((B << B_SHF) - Zs)" instead?
|
||||
// That's equivalent, but keeps the lower bits of Zs.
|
||||
out.Write("\tfloat ze = (" I_FOGF"[1].x * 16777215.0) / float(" I_FOGI"[0].y - (zCoord >> " I_FOGI"[0].w));\n");
|
||||
out.Write("\tfloat ze = (" I_FOGF"[1].x * 16777215.0) / float(" I_FOGI".y - (zCoord >> " I_FOGI".w));\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -283,16 +283,16 @@ void PixelShaderManager::SetFogParamChanged()
|
||||
if (!g_ActiveConfig.bDisableFog)
|
||||
{
|
||||
constants.fogf[1][0] = bpmem.fog.a.GetA();
|
||||
constants.fogi[0][1] = bpmem.fog.b_magnitude;
|
||||
constants.fogi[1] = bpmem.fog.b_magnitude;
|
||||
constants.fogf[1][2] = bpmem.fog.c_proj_fsel.GetC();
|
||||
constants.fogi[0][3] = bpmem.fog.b_shift;
|
||||
constants.fogi[3] = bpmem.fog.b_shift;
|
||||
}
|
||||
else
|
||||
{
|
||||
constants.fogf[1][0] = 0.f;
|
||||
constants.fogi[0][1] = 1;
|
||||
constants.fogi[1] = 1;
|
||||
constants.fogf[1][2] = 0.f;
|
||||
constants.fogi[0][3] = 1;
|
||||
constants.fogi[3] = 1;
|
||||
}
|
||||
dirty = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user