mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-26 15:00:06 +00:00
Assert Scissor tests
This commit is contained in:
parent
561d79e034
commit
30ff42b8cc
@ -532,7 +532,21 @@ public:
|
|||||||
INSERT_PADDING_WORDS(0x3);
|
INSERT_PADDING_WORDS(0x3);
|
||||||
s32 clear_stencil;
|
s32 clear_stencil;
|
||||||
|
|
||||||
INSERT_PADDING_WORDS(0x6C);
|
INSERT_PADDING_WORDS(0x17);
|
||||||
|
|
||||||
|
struct {
|
||||||
|
u32 enable;
|
||||||
|
union {
|
||||||
|
BitField<0, 16, u32> min_x;
|
||||||
|
BitField<16, 16, u32> max_x;
|
||||||
|
};
|
||||||
|
union {
|
||||||
|
BitField<0, 16, u32> min_y;
|
||||||
|
BitField<16, 16, u32> max_y;
|
||||||
|
};
|
||||||
|
} scissor_test;
|
||||||
|
|
||||||
|
INSERT_PADDING_WORDS(0x52);
|
||||||
|
|
||||||
s32 stencil_back_func_ref;
|
s32 stencil_back_func_ref;
|
||||||
u32 stencil_back_mask;
|
u32 stencil_back_mask;
|
||||||
@ -1002,6 +1016,7 @@ ASSERT_REG_POSITION(vertex_buffer, 0x35D);
|
|||||||
ASSERT_REG_POSITION(clear_color[0], 0x360);
|
ASSERT_REG_POSITION(clear_color[0], 0x360);
|
||||||
ASSERT_REG_POSITION(clear_depth, 0x364);
|
ASSERT_REG_POSITION(clear_depth, 0x364);
|
||||||
ASSERT_REG_POSITION(clear_stencil, 0x368);
|
ASSERT_REG_POSITION(clear_stencil, 0x368);
|
||||||
|
ASSERT_REG_POSITION(scissor_test, 0x380);
|
||||||
ASSERT_REG_POSITION(stencil_back_func_ref, 0x3D5);
|
ASSERT_REG_POSITION(stencil_back_func_ref, 0x3D5);
|
||||||
ASSERT_REG_POSITION(stencil_back_mask, 0x3D6);
|
ASSERT_REG_POSITION(stencil_back_mask, 0x3D6);
|
||||||
ASSERT_REG_POSITION(stencil_back_func_mask, 0x3D7);
|
ASSERT_REG_POSITION(stencil_back_func_mask, 0x3D7);
|
||||||
|
@ -541,6 +541,7 @@ void RasterizerOpenGL::DrawArrays() {
|
|||||||
SyncLogicOpState();
|
SyncLogicOpState();
|
||||||
SyncCullMode();
|
SyncCullMode();
|
||||||
SyncAlphaTest();
|
SyncAlphaTest();
|
||||||
|
SyncScissorTest();
|
||||||
SyncTransformFeedback();
|
SyncTransformFeedback();
|
||||||
SyncPointState();
|
SyncPointState();
|
||||||
|
|
||||||
@ -972,6 +973,17 @@ void RasterizerOpenGL::SyncAlphaTest() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RasterizerOpenGL::SyncScissorTest() {
|
||||||
|
const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs;
|
||||||
|
|
||||||
|
// TODO(Rodrigo): Alpha testing is a legacy OpenGL feature, but it can be
|
||||||
|
// implemented with a test+discard in fragment shaders.
|
||||||
|
if (regs.scissor_test.enable != 0) {
|
||||||
|
LOG_CRITICAL(Render_OpenGL, "Scissor testing is not implemented");
|
||||||
|
UNREACHABLE();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void RasterizerOpenGL::SyncTransformFeedback() {
|
void RasterizerOpenGL::SyncTransformFeedback() {
|
||||||
const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs;
|
const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs;
|
||||||
|
|
||||||
|
@ -165,6 +165,9 @@ private:
|
|||||||
/// Syncs the alpha test state to match the guest state
|
/// Syncs the alpha test state to match the guest state
|
||||||
void SyncAlphaTest();
|
void SyncAlphaTest();
|
||||||
|
|
||||||
|
/// Syncs the scissor test state to match the guest state
|
||||||
|
void SyncScissorTest();
|
||||||
|
|
||||||
/// Syncs the transform feedback state to match the guest state
|
/// Syncs the transform feedback state to match the guest state
|
||||||
void SyncTransformFeedback();
|
void SyncTransformFeedback();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user