mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Renderer: Move depth state to VideoCommon and seperate from bpmem
This commit is contained in:
@ -68,12 +68,14 @@ void SetScissor()
|
||||
|
||||
void SetDepthMode()
|
||||
{
|
||||
g_renderer->SetDepthMode();
|
||||
DepthState state = {};
|
||||
state.Generate(bpmem);
|
||||
g_renderer->SetDepthState(state);
|
||||
}
|
||||
|
||||
void SetBlendMode()
|
||||
{
|
||||
BlendingState state;
|
||||
BlendingState state = {};
|
||||
state.Generate(bpmem);
|
||||
g_renderer->SetBlendingState(state);
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
virtual void SetBlendingState(const BlendingState& state) {}
|
||||
virtual void SetScissorRect(const EFBRectangle& rc) {}
|
||||
virtual void SetGenerationMode() {}
|
||||
virtual void SetDepthMode() {}
|
||||
virtual void SetDepthState(const DepthState& state) {}
|
||||
virtual void SetSamplerState(int stage, int texindex, bool custom_tex) {}
|
||||
virtual void SetInterlacingMode() {}
|
||||
virtual void SetViewport() {}
|
||||
|
@ -4,6 +4,13 @@
|
||||
|
||||
#include "VideoCommon/RenderState.h"
|
||||
|
||||
void DepthState::Generate(const BPMemory& bp)
|
||||
{
|
||||
testenable = bp.zmode.testenable.Value();
|
||||
updateenable = bp.zmode.updateenable.Value();
|
||||
func = bp.zmode.func.Value();
|
||||
}
|
||||
|
||||
// If the framebuffer format has no alpha channel, it is assumed to
|
||||
// ONE on blending. As the backends may emulate this framebuffer
|
||||
// configuration with an alpha channel, we just drop all references
|
||||
|
@ -9,6 +9,17 @@
|
||||
#include "VideoCommon/BPMemory.h"
|
||||
#include "VideoCommon/BPStructs.h"
|
||||
|
||||
union DepthState
|
||||
{
|
||||
void Generate(const BPMemory& bp);
|
||||
|
||||
BitField<0, 1, u32> testenable;
|
||||
BitField<1, 1, u32> updateenable;
|
||||
BitField<2, 3, ZMode::CompareMode> func;
|
||||
|
||||
u32 hex;
|
||||
};
|
||||
|
||||
union BlendingState
|
||||
{
|
||||
void Generate(const BPMemory& bp);
|
||||
|
Reference in New Issue
Block a user