video_core: Add asserts for CS, TFB and alpha testing
Add asserts for compute shader dispatching, transform feedback being enabled and alpha testing. These have in common that they'll probably break rendering without logging.
This commit is contained in:
parent
7b81e1e525
commit
ab65fde9f4
5 changed files with 92 additions and 3 deletions
|
@ -450,6 +450,8 @@ void RasterizerOpenGL::DrawArrays() {
|
|||
SyncBlendState();
|
||||
SyncLogicOpState();
|
||||
SyncCullMode();
|
||||
SyncAlphaTest();
|
||||
SyncTransformFeedback();
|
||||
|
||||
// TODO(bunnei): Sync framebuffer_scale uniform here
|
||||
// TODO(bunnei): Sync scissorbox uniform(s) here
|
||||
|
@ -883,4 +885,24 @@ void RasterizerOpenGL::SyncLogicOpState() {
|
|||
state.logic_op.operation = MaxwellToGL::LogicOp(regs.logic_op.operation);
|
||||
}
|
||||
|
||||
void RasterizerOpenGL::SyncAlphaTest() {
|
||||
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.alpha_test_enabled != 0) {
|
||||
LOG_CRITICAL(Render_OpenGL, "Alpha testing is not implemented");
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
void RasterizerOpenGL::SyncTransformFeedback() {
|
||||
const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs;
|
||||
|
||||
if (regs.tfb_enabled != 0) {
|
||||
LOG_CRITICAL(Render_OpenGL, "Transform feedbacks are not implemented");
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace OpenGL
|
||||
|
|
|
@ -158,6 +158,12 @@ private:
|
|||
/// Syncs the LogicOp state to match the guest state
|
||||
void SyncLogicOpState();
|
||||
|
||||
/// Syncs the alpha test state to match the guest state
|
||||
void SyncAlphaTest();
|
||||
|
||||
/// Syncs the transform feedback state to match the guest state
|
||||
void SyncTransformFeedback();
|
||||
|
||||
bool has_ARB_direct_state_access = false;
|
||||
bool has_ARB_multi_bind = false;
|
||||
bool has_ARB_separate_shader_objects = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue