diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | src/common/assert.h | 2 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | 2 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 5 | ||||
-rw-r--r-- | src/yuzu/bootmanager.cpp | 13 |
5 files changed, 14 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore index 7999a40e1..5ec0d110b 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ src/common/scm_rev.cpp .idea/ .vs/ .vscode/ +CMakeLists.txt.user # *nix related # Common convention for backup or temporary files diff --git a/src/common/assert.h b/src/common/assert.h index 655446f34..0d4eddc19 100644 --- a/src/common/assert.h +++ b/src/common/assert.h @@ -52,5 +52,5 @@ __declspec(noinline, noreturn) #define DEBUG_ASSERT_MSG(_a_, _desc_, ...) #endif -#define UNIMPLEMENTED() DEBUG_ASSERT_MSG(false, "Unimplemented code!") +#define UNIMPLEMENTED() LOG_CRITICAL(Debug, "Unimplemented code!") #define UNIMPLEMENTED_MSG(...) ASSERT_MSG(false, __VA_ARGS__) diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index 303acdcb3..315f81e90 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp @@ -40,7 +40,7 @@ u32 nvhost_ctrl::NvOsGetConfigU32(const std::vector<u8>& input, std::vector<u8>& } else if (!strcmp(params.param_str.data(), "NVRM_GPU_PREVENT_USE")) { params.config_str[0] = '0'; } else { - params.config_str[0] = '\0'; + params.config_str[0] = '0'; } } else { UNIMPLEMENTED(); // unknown domain? Only nv has been seen so far on hardware diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index bacb389e1..ea138d402 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -775,10 +775,13 @@ void RasterizerOpenGL::SyncCullMode() { state.cull.front_face = MaxwellToGL::FrontFace(regs.cull.front_face); state.cull.mode = MaxwellToGL::CullFace(regs.cull.cull_face); + const bool flip_triangles{regs.screen_y_control.triangle_rast_flip == 0 || + regs.viewport_transform[0].scale_y < 0.0f}; + // If the GPU is configured to flip the rasterized triangles, then we need to flip the // notion of front and back. Note: We flip the triangles when the value of the register is 0 // because OpenGL already does it for us. - if (regs.screen_y_control.triangle_rast_flip == 0) { + if (flip_triangles) { if (state.cull.front_face == GL_CCW) state.cull.front_face = GL_CW; else if (state.cull.front_face == GL_CW) diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 5c17cd0d9..833085559 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -127,13 +127,14 @@ void GRenderWindow::moveContext() { } void GRenderWindow::SwapBuffers() { -#if !defined(QT_NO_DEBUG) - // Qt debug runtime prints a bogus warning on the console if you haven't called makeCurrent - // since the last time you called swapBuffers. This presumably means something if you're using - // QGLWidget the "regular" way, but in our multi-threaded use case is harmless since we never - // call doneCurrent in this thread. + // In our multi-threaded QGLWidget use case we shouldn't need to call `makeCurrent`, + // since we never call `doneCurrent` in this thread. + // However: + // - The Qt debug runtime prints a bogus warning on the console if `makeCurrent` wasn't called + // since the last time `swapBuffers` was executed; + // - On macOS, if `makeCurrent` isn't called explicitely, resizing the buffer breaks. child->makeCurrent(); -#endif + child->swapBuffers(); } |