mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 23:11:14 +01:00
VideoCommon/PixelShaderManager: Rename s_ variables.
This commit is contained in:
parent
725bd64ec2
commit
4549fb4acb
@ -17,8 +17,8 @@ void PixelShaderManager::Init()
|
|||||||
constants = {};
|
constants = {};
|
||||||
|
|
||||||
// Init any intial constants which aren't zero when bpmem is zero.
|
// Init any intial constants which aren't zero when bpmem is zero.
|
||||||
s_bFogRangeAdjustChanged = true;
|
m_fog_range_adjusted_changed = true;
|
||||||
s_bViewPortChanged = false;
|
m_viewport_changed = false;
|
||||||
|
|
||||||
SetIndMatrixChanged(0);
|
SetIndMatrixChanged(0);
|
||||||
SetIndMatrixChanged(1);
|
SetIndMatrixChanged(1);
|
||||||
@ -72,7 +72,7 @@ void PixelShaderManager::Dirty()
|
|||||||
{
|
{
|
||||||
// This function is called after a savestate is loaded.
|
// This function is called after a savestate is loaded.
|
||||||
// Any constants that can changed based on settings should be re-calculated
|
// Any constants that can changed based on settings should be re-calculated
|
||||||
s_bFogRangeAdjustChanged = true;
|
m_fog_range_adjusted_changed = true;
|
||||||
|
|
||||||
SetEfbScaleChanged(g_renderer->EFBToScaledXf(1), g_renderer->EFBToScaledYf(1));
|
SetEfbScaleChanged(g_renderer->EFBToScaledXf(1), g_renderer->EFBToScaledYf(1));
|
||||||
SetFogParamChanged();
|
SetFogParamChanged();
|
||||||
@ -82,7 +82,7 @@ void PixelShaderManager::Dirty()
|
|||||||
|
|
||||||
void PixelShaderManager::SetConstants()
|
void PixelShaderManager::SetConstants()
|
||||||
{
|
{
|
||||||
if (s_bFogRangeAdjustChanged)
|
if (m_fog_range_adjusted_changed)
|
||||||
{
|
{
|
||||||
// set by two components, so keep changed flag here
|
// set by two components, so keep changed flag here
|
||||||
// TODO: try to split both registers and move this logic to the shader
|
// TODO: try to split both registers and move this logic to the shader
|
||||||
@ -121,18 +121,18 @@ void PixelShaderManager::SetConstants()
|
|||||||
}
|
}
|
||||||
dirty = true;
|
dirty = true;
|
||||||
|
|
||||||
s_bFogRangeAdjustChanged = false;
|
m_fog_range_adjusted_changed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s_bViewPortChanged)
|
if (m_viewport_changed)
|
||||||
{
|
{
|
||||||
constants.zbias[1][0] = (s32)xfmem.viewport.farZ;
|
constants.zbias[1][0] = (s32)xfmem.viewport.farZ;
|
||||||
constants.zbias[1][1] = (s32)xfmem.viewport.zRange;
|
constants.zbias[1][1] = (s32)xfmem.viewport.zRange;
|
||||||
dirty = true;
|
dirty = true;
|
||||||
s_bViewPortChanged = false;
|
m_viewport_changed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s_bIndirectDirty)
|
if (m_indirect_dirty)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
constants.pack1[i][3] = 0;
|
constants.pack1[i][3] = 0;
|
||||||
@ -154,10 +154,10 @@ void PixelShaderManager::SetConstants()
|
|||||||
}
|
}
|
||||||
|
|
||||||
dirty = true;
|
dirty = true;
|
||||||
s_bIndirectDirty = false;
|
m_indirect_dirty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s_bDestAlphaDirty)
|
if (m_dest_alpha_dirty)
|
||||||
{
|
{
|
||||||
// Destination alpha is only enabled if alpha writes are enabled. Force entire uniform to zero
|
// Destination alpha is only enabled if alpha writes are enabled. Force entire uniform to zero
|
||||||
// when disabled.
|
// when disabled.
|
||||||
@ -232,7 +232,7 @@ void PixelShaderManager::SetTevCombiner(int index, int alpha, u32 combiner)
|
|||||||
|
|
||||||
void PixelShaderManager::SetTevIndirectChanged()
|
void PixelShaderManager::SetTevIndirectChanged()
|
||||||
{
|
{
|
||||||
s_bIndirectDirty = true;
|
m_indirect_dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PixelShaderManager::SetAlpha()
|
void PixelShaderManager::SetAlpha()
|
||||||
@ -260,7 +260,7 @@ void PixelShaderManager::SetAlphaTestChanged()
|
|||||||
|
|
||||||
void PixelShaderManager::SetDestAlphaChanged()
|
void PixelShaderManager::SetDestAlphaChanged()
|
||||||
{
|
{
|
||||||
s_bDestAlphaDirty = true;
|
m_dest_alpha_dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PixelShaderManager::SetTexDims(int texmapid, u32 width, u32 height)
|
void PixelShaderManager::SetTexDims(int texmapid, u32 width, u32 height)
|
||||||
@ -291,8 +291,8 @@ void PixelShaderManager::SetZTextureBias()
|
|||||||
|
|
||||||
void PixelShaderManager::SetViewportChanged()
|
void PixelShaderManager::SetViewportChanged()
|
||||||
{
|
{
|
||||||
s_bViewPortChanged = true;
|
m_viewport_changed = true;
|
||||||
s_bFogRangeAdjustChanged =
|
m_fog_range_adjusted_changed =
|
||||||
true; // TODO: Shouldn't be necessary with an accurate fog range adjust implementation
|
true; // TODO: Shouldn't be necessary with an accurate fog range adjust implementation
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,7 +422,7 @@ void PixelShaderManager::SetFogRangeAdjustChanged()
|
|||||||
if (g_ActiveConfig.bDisableFog)
|
if (g_ActiveConfig.bDisableFog)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
s_bFogRangeAdjustChanged = true;
|
m_fog_range_adjusted_changed = true;
|
||||||
|
|
||||||
if (constants.fogRangeBase != bpmem.fogRange.Base.hex)
|
if (constants.fogRangeBase != bpmem.fogRange.Base.hex)
|
||||||
{
|
{
|
||||||
@ -434,7 +434,7 @@ void PixelShaderManager::SetFogRangeAdjustChanged()
|
|||||||
void PixelShaderManager::SetGenModeChanged()
|
void PixelShaderManager::SetGenModeChanged()
|
||||||
{
|
{
|
||||||
constants.genmode = bpmem.genMode.hex;
|
constants.genmode = bpmem.genMode.hex;
|
||||||
s_bIndirectDirty = true;
|
m_indirect_dirty = true;
|
||||||
dirty = true;
|
dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -454,7 +454,7 @@ void PixelShaderManager::SetZModeControl()
|
|||||||
constants.dither = dither;
|
constants.dither = dither;
|
||||||
dirty = true;
|
dirty = true;
|
||||||
}
|
}
|
||||||
s_bDestAlphaDirty = true;
|
m_dest_alpha_dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PixelShaderManager::SetBlendModeChanged()
|
void PixelShaderManager::SetBlendModeChanged()
|
||||||
@ -512,7 +512,7 @@ void PixelShaderManager::SetBlendModeChanged()
|
|||||||
constants.logic_op_mode = state.logicmode;
|
constants.logic_op_mode = state.logicmode;
|
||||||
dirty = true;
|
dirty = true;
|
||||||
}
|
}
|
||||||
s_bDestAlphaDirty = true;
|
m_dest_alpha_dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PixelShaderManager::SetBoundingBoxActive(bool active)
|
void PixelShaderManager::SetBoundingBoxActive(bool active)
|
||||||
@ -527,10 +527,10 @@ void PixelShaderManager::SetBoundingBoxActive(bool active)
|
|||||||
|
|
||||||
void PixelShaderManager::DoState(PointerWrap& p)
|
void PixelShaderManager::DoState(PointerWrap& p)
|
||||||
{
|
{
|
||||||
p.Do(s_bFogRangeAdjustChanged);
|
p.Do(m_fog_range_adjusted_changed);
|
||||||
p.Do(s_bViewPortChanged);
|
p.Do(m_viewport_changed);
|
||||||
p.Do(s_bIndirectDirty);
|
p.Do(m_indirect_dirty);
|
||||||
p.Do(s_bDestAlphaDirty);
|
p.Do(m_dest_alpha_dirty);
|
||||||
|
|
||||||
p.Do(constants);
|
p.Do(constants);
|
||||||
|
|
||||||
|
@ -52,8 +52,9 @@ public:
|
|||||||
PixelShaderConstants constants{};
|
PixelShaderConstants constants{};
|
||||||
bool dirty = false;
|
bool dirty = false;
|
||||||
|
|
||||||
bool s_bFogRangeAdjustChanged = false;
|
private:
|
||||||
bool s_bViewPortChanged = false;
|
bool m_fog_range_adjusted_changed = false;
|
||||||
bool s_bIndirectDirty = false;
|
bool m_viewport_changed = false;
|
||||||
bool s_bDestAlphaDirty = false;
|
bool m_indirect_dirty = false;
|
||||||
|
bool m_dest_alpha_dirty = false;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user