summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorMarkus Wick <markus@selfnet.de>2018-11-06 19:15:44 +0100
committerMarkus Wick <markus@selfnet.de>2018-11-06 22:31:33 +0100
commit359db6a673b1fa13c80e6b8bf54d5c29bc3b25db (patch)
treeade5874bcf54c42c7afaf8ab47d5cbd33e8a440a /src/video_core/renderer_opengl
parentgl_rasterizer: Split VAO and VB setup functions. (diff)
downloadyuzu-359db6a673b1fa13c80e6b8bf54d5c29bc3b25db.tar
yuzu-359db6a673b1fa13c80e6b8bf54d5c29bc3b25db.tar.gz
yuzu-359db6a673b1fa13c80e6b8bf54d5c29bc3b25db.tar.bz2
yuzu-359db6a673b1fa13c80e6b8bf54d5c29bc3b25db.tar.lz
yuzu-359db6a673b1fa13c80e6b8bf54d5c29bc3b25db.tar.xz
yuzu-359db6a673b1fa13c80e6b8bf54d5c29bc3b25db.tar.zst
yuzu-359db6a673b1fa13c80e6b8bf54d5c29bc3b25db.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index d4c7191b3..6ae2adfab 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -124,10 +124,15 @@ RasterizerOpenGL::RasterizerOpenGL(Core::Frontend::EmuWindow& window, ScreenInfo
RasterizerOpenGL::~RasterizerOpenGL() {}
void RasterizerOpenGL::SetupVertexFormat() {
- MICROPROFILE_SCOPE(OpenGL_VAO);
- const auto& gpu = Core::System::GetInstance().GPU().Maxwell3D();
+ auto& gpu = Core::System::GetInstance().GPU().Maxwell3D();
const auto& regs = gpu.regs;
+ if (!gpu.dirty_flags.vertex_attrib_format)
+ return;
+ gpu.dirty_flags.vertex_attrib_format = false;
+
+ MICROPROFILE_SCOPE(OpenGL_VAO);
+
auto [iter, is_cache_miss] = vertex_array_cache.try_emplace(regs.vertex_attrib_format);
auto& VAO = iter->second;