mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Move most backend functionality to VideoCommon
This commit is contained in:
@ -9,6 +9,8 @@
|
||||
#include "VideoCommon/BPMemory.h"
|
||||
#include "VideoCommon/BPStructs.h"
|
||||
|
||||
enum class AbstractTextureFormat : u32;
|
||||
|
||||
enum class PrimitiveType : u32
|
||||
{
|
||||
Points,
|
||||
@ -32,6 +34,20 @@ union RasterizationState
|
||||
u32 hex;
|
||||
};
|
||||
|
||||
union FramebufferState
|
||||
{
|
||||
BitField<0, 8, AbstractTextureFormat> color_texture_format;
|
||||
BitField<8, 8, AbstractTextureFormat> depth_texture_format;
|
||||
BitField<16, 8, u32> samples;
|
||||
BitField<24, 1, u32> per_sample_shading;
|
||||
|
||||
bool operator==(const FramebufferState& rhs) const { return hex == rhs.hex; }
|
||||
bool operator!=(const FramebufferState& rhs) const { return hex != rhs.hex; }
|
||||
FramebufferState& operator=(const FramebufferState& rhs);
|
||||
|
||||
u32 hex;
|
||||
};
|
||||
|
||||
union DepthState
|
||||
{
|
||||
void Generate(const BPMemory& bp);
|
||||
@ -114,12 +130,17 @@ union SamplerState
|
||||
namespace RenderState
|
||||
{
|
||||
RasterizationState GetInvalidRasterizationState();
|
||||
RasterizationState GetNoCullRasterizationState();
|
||||
RasterizationState GetNoCullRasterizationState(PrimitiveType primitive);
|
||||
RasterizationState GetCullBackFaceRasterizationState(PrimitiveType primitive);
|
||||
DepthState GetInvalidDepthState();
|
||||
DepthState GetNoDepthTestingDepthStencilState();
|
||||
DepthState GetNoDepthTestingDepthState();
|
||||
DepthState GetAlwaysWriteDepthState();
|
||||
BlendingState GetInvalidBlendingState();
|
||||
BlendingState GetNoBlendingBlendState();
|
||||
BlendingState GetNoColorWriteBlendState();
|
||||
SamplerState GetInvalidSamplerState();
|
||||
SamplerState GetPointSamplerState();
|
||||
SamplerState GetLinearSamplerState();
|
||||
}
|
||||
FramebufferState GetColorFramebufferState(AbstractTextureFormat format);
|
||||
FramebufferState GetRGBA8FramebufferState();
|
||||
} // namespace RenderState
|
||||
|
Reference in New Issue
Block a user