mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-16 02:10:03 +00:00
gl_state: Remove logic op tracker
This commit is contained in:
parent
915d73f3b8
commit
42708c762e
@ -1156,15 +1156,10 @@ void RasterizerOpenGL::SyncBlendState() {
|
||||
void RasterizerOpenGL::SyncLogicOpState() {
|
||||
const auto& regs = system.GPU().Maxwell3D().regs;
|
||||
|
||||
state.logic_op.enabled = regs.logic_op.enable != 0;
|
||||
|
||||
if (!state.logic_op.enabled)
|
||||
return;
|
||||
|
||||
ASSERT_MSG(regs.blend.enable[0] == 0,
|
||||
"Blending and logic op can't be enabled at the same time.");
|
||||
|
||||
state.logic_op.operation = MaxwellToGL::LogicOp(regs.logic_op.operation);
|
||||
oglEnable(GL_COLOR_LOGIC_OP, regs.logic_op.enable);
|
||||
if (regs.logic_op.enable) {
|
||||
glLogicOp(MaxwellToGL::LogicOp(regs.logic_op.operation));
|
||||
}
|
||||
}
|
||||
|
||||
void RasterizerOpenGL::SyncScissorTest(OpenGLState& current_state) {
|
||||
|
@ -332,14 +332,6 @@ void OpenGLState::ApplyBlending() {
|
||||
cur_state.independant_blend.enabled = independant_blend.enabled;
|
||||
}
|
||||
|
||||
void OpenGLState::ApplyLogicOp() {
|
||||
Enable(GL_COLOR_LOGIC_OP, cur_state.logic_op.enabled, logic_op.enabled);
|
||||
|
||||
if (UpdateValue(cur_state.logic_op.operation, logic_op.operation)) {
|
||||
glLogicOp(logic_op.operation);
|
||||
}
|
||||
}
|
||||
|
||||
void OpenGLState::ApplyClipControl() {
|
||||
if (UpdateTie(std::tie(cur_state.clip_control.origin, cur_state.clip_control.depth_mode),
|
||||
std::tie(clip_control.origin, clip_control.depth_mode))) {
|
||||
@ -400,7 +392,6 @@ void OpenGLState::Apply() {
|
||||
ApplyDepth();
|
||||
ApplyPrimitiveRestart();
|
||||
ApplyBlending();
|
||||
ApplyLogicOp();
|
||||
ApplyTextures();
|
||||
ApplySamplers();
|
||||
ApplyImages();
|
||||
|
@ -81,11 +81,6 @@ public:
|
||||
bool enabled = false;
|
||||
} independant_blend;
|
||||
|
||||
struct {
|
||||
bool enabled = false; // GL_LOGIC_OP_MODE
|
||||
GLenum operation = GL_COPY;
|
||||
} logic_op;
|
||||
|
||||
static constexpr std::size_t NumSamplers = 32 * 5;
|
||||
static constexpr std::size_t NumImages = 8 * 5;
|
||||
std::array<GLuint, NumSamplers> textures = {};
|
||||
@ -154,7 +149,6 @@ public:
|
||||
void ApplyTargetBlending(std::size_t target, bool force);
|
||||
void ApplyGlobalBlending();
|
||||
void ApplyBlending();
|
||||
void ApplyLogicOp();
|
||||
void ApplyTextures();
|
||||
void ApplySamplers();
|
||||
void ApplyImages();
|
||||
|
@ -574,6 +574,7 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x,
|
||||
|
||||
// TODO: Signal state tracker about these changes
|
||||
glEnable(GL_CULL_FACE);
|
||||
glDisable(GL_COLOR_LOGIC_OP);
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
glDisable(GL_POLYGON_OFFSET_FILL);
|
||||
glCullFace(GL_BACK);
|
||||
|
Loading…
Reference in New Issue
Block a user