summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-07-02 20:33:41 +0200
committerSubv <subv2112@gmail.com>2018-07-03 02:51:29 +0200
commita6d4903aaff4633bcd5a39ca79ea368f86bc3ce5 (patch)
tree2414a4c2f301e3b4bc3e5f1e746639e748d2c3d8 /src/video_core
parentGPU: Set up the depth test state on every draw. (diff)
downloadyuzu-a6d4903aaff4633bcd5a39ca79ea368f86bc3ce5.tar
yuzu-a6d4903aaff4633bcd5a39ca79ea368f86bc3ce5.tar.gz
yuzu-a6d4903aaff4633bcd5a39ca79ea368f86bc3ce5.tar.bz2
yuzu-a6d4903aaff4633bcd5a39ca79ea368f86bc3ce5.tar.lz
yuzu-a6d4903aaff4633bcd5a39ca79ea368f86bc3ce5.tar.xz
yuzu-a6d4903aaff4633bcd5a39ca79ea368f86bc3ce5.tar.zst
yuzu-a6d4903aaff4633bcd5a39ca79ea368f86bc3ce5.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 0d0e0653d..a3c5ad2a9 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -307,10 +307,10 @@ void RasterizerOpenGL::DrawArrays() {
// Sync the depth test state before configuring the framebuffer surfaces.
SyncDepthTestState();
- // TODO(bunnei): Implement these
+ // TODO(bunnei): Implement this
const bool has_stencil = false;
- const bool using_color_fb = true;
+ const bool using_color_fb = true;
const bool using_depth_fb = regs.zeta.Address() != 0;
const MathUtil::Rectangle<s32> viewport_rect{regs.viewport_transform[0].GetRect()};
@@ -343,11 +343,9 @@ void RasterizerOpenGL::DrawArrays() {
// Bind the framebuffer surfaces
BindFramebufferSurfaces(color_surface, depth_surface, has_stencil);
- // Sync the viewport
SyncViewport(surfaces_rect);
-
- // Sync the blend state registers
SyncBlendState();
+ SyncCullMode();
// TODO(bunnei): Sync framebuffer_scale uniform here
// TODO(bunnei): Sync scissorbox uniform(s) here
@@ -711,7 +709,11 @@ void RasterizerOpenGL::SyncClipCoef() {
}
void RasterizerOpenGL::SyncCullMode() {
- UNREACHABLE();
+ const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs;
+
+ state.cull.enabled = regs.cull.enabled != 0;
+ state.cull.front_face = MaxwellToGL::FrontFace(regs.cull.front_face);
+ state.cull.mode = MaxwellToGL::CullFace(regs.cull.cull_face);
}
void RasterizerOpenGL::SyncDepthScale() {