summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-12-25 23:46:04 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-02-28 20:47:59 +0100
commit925521da5fbc1096f56933eba1683b60c6c19b20 (patch)
tree2b83322e281fead062bd51f8563a70231e77802c /src
parentgl_state: Remove point size tracking (diff)
downloadyuzu-925521da5fbc1096f56933eba1683b60c6c19b20.tar
yuzu-925521da5fbc1096f56933eba1683b60c6c19b20.tar.gz
yuzu-925521da5fbc1096f56933eba1683b60c6c19b20.tar.bz2
yuzu-925521da5fbc1096f56933eba1683b60c6c19b20.tar.lz
yuzu-925521da5fbc1096f56933eba1683b60c6c19b20.tar.xz
yuzu-925521da5fbc1096f56933eba1683b60c6c19b20.tar.zst
yuzu-925521da5fbc1096f56933eba1683b60c6c19b20.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp2
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp4
-rw-r--r--src/video_core/renderer_opengl/gl_state.h1
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp4
4 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index a0b0274fb..e9e9f9794 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -1025,7 +1025,7 @@ void RasterizerOpenGL::SyncCullMode() {
state.cull.mode = MaxwellToGL::CullFace(regs.cull.cull_face);
}
- state.cull.front_face = MaxwellToGL::FrontFace(regs.cull.front_face);
+ glFrontFace(MaxwellToGL::FrontFace(regs.cull.front_face));
}
void RasterizerOpenGL::SyncPrimitiveRestart() {
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index 02b3455cc..817676505 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -170,10 +170,6 @@ void OpenGLState::ApplyCulling() {
if (UpdateValue(cur_state.cull.mode, cull.mode)) {
glCullFace(cull.mode);
}
-
- if (UpdateValue(cur_state.cull.front_face, cull.front_face)) {
- glFrontFace(cull.front_face);
- }
}
void OpenGLState::ApplyRasterizerDiscard() {
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h
index acd24c042..1b5fde23a 100644
--- a/src/video_core/renderer_opengl/gl_state.h
+++ b/src/video_core/renderer_opengl/gl_state.h
@@ -34,7 +34,6 @@ public:
struct {
bool enabled = false; // GL_CULL_FACE
GLenum mode = GL_BACK; // GL_CULL_FACE_MODE
- GLenum front_face = GL_CCW; // GL_FRONT_FACE
} cull;
struct {
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index f71e23f9e..311053695 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -571,6 +571,10 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x,
state.textures[0] = screen_info.display_texture;
state.framebuffer_srgb.enabled = screen_info.display_srgb;
state.Apply();
+
+ // TODO: Signal state tracker about these changes
+ glFrontFace(GL_CW);
+
glNamedBufferSubData(vertex_buffer.handle, 0, sizeof(vertices), std::data(vertices));
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
// Restore default state