summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Subv2018-07-02 13:33:41 -0500
committerGravatar Subv2018-07-02 19:51:29 -0500
commita6d4903aaff4633bcd5a39ca79ea368f86bc3ce5 (patch)
tree2414a4c2f301e3b4bc3e5f1e746639e748d2c3d8 /src
parentGPU: Set up the depth test state on every draw. (diff)
downloadyuzu-a6d4903aaff4633bcd5a39ca79ea368f86bc3ce5.tar.gz
yuzu-a6d4903aaff4633bcd5a39ca79ea368f86bc3ce5.tar.xz
yuzu-a6d4903aaff4633bcd5a39ca79ea368f86bc3ce5.zip
GPU: Set up the culling configuration on each draw.
Diffstat (limited to '')
-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() {
307 // Sync the depth test state before configuring the framebuffer surfaces. 307 // Sync the depth test state before configuring the framebuffer surfaces.
308 SyncDepthTestState(); 308 SyncDepthTestState();
309 309
310 // TODO(bunnei): Implement these 310 // TODO(bunnei): Implement this
311 const bool has_stencil = false; 311 const bool has_stencil = false;
312 const bool using_color_fb = true;
313 312
313 const bool using_color_fb = true;
314 const bool using_depth_fb = regs.zeta.Address() != 0; 314 const bool using_depth_fb = regs.zeta.Address() != 0;
315 315
316 const MathUtil::Rectangle<s32> viewport_rect{regs.viewport_transform[0].GetRect()}; 316 const MathUtil::Rectangle<s32> viewport_rect{regs.viewport_transform[0].GetRect()};
@@ -343,11 +343,9 @@ void RasterizerOpenGL::DrawArrays() {
343 // Bind the framebuffer surfaces 343 // Bind the framebuffer surfaces
344 BindFramebufferSurfaces(color_surface, depth_surface, has_stencil); 344 BindFramebufferSurfaces(color_surface, depth_surface, has_stencil);
345 345
346 // Sync the viewport
347 SyncViewport(surfaces_rect); 346 SyncViewport(surfaces_rect);
348
349 // Sync the blend state registers
350 SyncBlendState(); 347 SyncBlendState();
348 SyncCullMode();
351 349
352 // TODO(bunnei): Sync framebuffer_scale uniform here 350 // TODO(bunnei): Sync framebuffer_scale uniform here
353 // TODO(bunnei): Sync scissorbox uniform(s) here 351 // TODO(bunnei): Sync scissorbox uniform(s) here
@@ -711,7 +709,11 @@ void RasterizerOpenGL::SyncClipCoef() {
711} 709}
712 710
713void RasterizerOpenGL::SyncCullMode() { 711void RasterizerOpenGL::SyncCullMode() {
714 UNREACHABLE(); 712 const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs;
713
714 state.cull.enabled = regs.cull.enabled != 0;
715 state.cull.front_face = MaxwellToGL::FrontFace(regs.cull.front_face);
716 state.cull.mode = MaxwellToGL::CullFace(regs.cull.cull_face);
715} 717}
716 718
717void RasterizerOpenGL::SyncDepthScale() { 719void RasterizerOpenGL::SyncDepthScale() {