summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/RenderBase.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2021-02-10 18:11:31 -0800
committerPokechu22 <Pokechu022@gmail.com>2021-03-06 19:27:19 -0800
commit70f9fc4e7526fc9cfc008a43cd33229f62be99b6 (patch)
tree48fae2cac1ed47ec5912dca4bf00716509192225 /Source/Core/VideoCommon/RenderBase.cpp
parentdb8ced7e4e4724c38f148ee449c346e447dd3942 (diff)
Convert BPMemory to BitField and enum class
Additional changes: - For TevStageCombiner's ColorCombiner and AlphaCombiner, op/comparison and scale/compare_mode have been split as there are different meanings and enums if bias is set to compare. (Shift has also been renamed to scale) - In TexMode0, min_filter has been split into min_mip and min_filter. - In TexImage1, image_type is now cache_manually_managed. - The unused bit in GenMode is now exposed. - LPSize's lineaspect is now named adjust_for_aspect_ratio.
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
-rw-r--r--Source/Core/VideoCommon/RenderBase.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp
index 1a9af2f232..ba91c0551e 100644
--- a/Source/Core/VideoCommon/RenderBase.cpp
+++ b/Source/Core/VideoCommon/RenderBase.cpp
@@ -171,7 +171,7 @@ void Renderer::SetAndClearFramebuffer(AbstractFramebuffer* framebuffer,
bool Renderer::EFBHasAlphaChannel() const
{
- return m_prev_efb_format == PEControl::RGBA6_Z24;
+ return m_prev_efb_format == PixelFormat::RGBA6_Z24;
}
void Renderer::ClearScreen(const MathUtil::Rectangle<int>& rc, bool colorEnable, bool alphaEnable,
@@ -197,15 +197,15 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
// check what to do with the alpha channel (GX_PokeAlphaRead)
PixelEngine::UPEAlphaReadReg alpha_read_mode = PixelEngine::GetAlphaReadMode();
- if (bpmem.zcontrol.pixel_format == PEControl::RGBA6_Z24)
+ if (bpmem.zcontrol.pixel_format == PixelFormat::RGBA6_Z24)
{
color = RGBA8ToRGBA6ToRGBA8(color);
}
- else if (bpmem.zcontrol.pixel_format == PEControl::RGB565_Z16)
+ else if (bpmem.zcontrol.pixel_format == PixelFormat::RGB565_Z16)
{
color = RGBA8ToRGB565ToRGBA8(color);
}
- if (bpmem.zcontrol.pixel_format != PEControl::RGBA6_Z24)
+ if (bpmem.zcontrol.pixel_format != PixelFormat::RGBA6_Z24)
{
color |= 0xFF000000;
}
@@ -231,7 +231,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
depth = 1.0f - depth;
u32 ret = 0;
- if (bpmem.zcontrol.pixel_format == PEControl::RGB565_Z16)
+ if (bpmem.zcontrol.pixel_format == PixelFormat::RGB565_Z16)
{
// if Z is in 16 bit format you must return a 16 bit integer
ret = std::clamp<u32>(static_cast<u32>(depth * 65536.0f), 0, 0xFFFF);
@@ -994,10 +994,10 @@ bool Renderer::RecompileImGuiPipeline()
pconfig.depth_state = RenderState::GetNoDepthTestingDepthState();
pconfig.blending_state = RenderState::GetNoBlendingBlendState();
pconfig.blending_state.blendenable = true;
- pconfig.blending_state.srcfactor = BlendMode::SRCALPHA;
- pconfig.blending_state.dstfactor = BlendMode::INVSRCALPHA;
- pconfig.blending_state.srcfactoralpha = BlendMode::ZERO;
- pconfig.blending_state.dstfactoralpha = BlendMode::ONE;
+ pconfig.blending_state.srcfactor = SrcBlendFactor::SrcAlpha;
+ pconfig.blending_state.dstfactor = DstBlendFactor::InvSrcAlpha;
+ pconfig.blending_state.srcfactoralpha = SrcBlendFactor::Zero;
+ pconfig.blending_state.dstfactoralpha = DstBlendFactor::One;
pconfig.framebuffer_state.color_texture_format = m_backbuffer_format;
pconfig.framebuffer_state.depth_texture_format = AbstractTextureFormat::Undefined;
pconfig.framebuffer_state.samples = 1;
@@ -1697,7 +1697,7 @@ bool Renderer::UseVertexDepthRange() const
return false;
// We need a full depth range if a ztexture is used.
- if (bpmem.ztex2.op != ZTEXTURE_DISABLE && !bpmem.zcontrol.early_ztest)
+ if (bpmem.ztex2.op != ZTexOp::Disabled && !bpmem.zcontrol.early_ztest)
return true;
// If an inverted depth range is unsupported, we also need to check if the range is inverted.