diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-18 16:31:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-18 16:31:06 +0100 |
commit | 93acfbd3a5c0e52a0031cc2d0475c82449e0f340 (patch) | |
tree | 5f49c1d148aa64551bfb792f9702e567a2e5547f /src/video_core/renderer_opengl/gl_resource_manager.cpp | |
parent | Merge pull request #3412 from Morph1984/aspect-ratio (diff) | |
parent | query_cache: Address feedback (diff) | |
download | yuzu-93acfbd3a5c0e52a0031cc2d0475c82449e0f340.tar yuzu-93acfbd3a5c0e52a0031cc2d0475c82449e0f340.tar.gz yuzu-93acfbd3a5c0e52a0031cc2d0475c82449e0f340.tar.bz2 yuzu-93acfbd3a5c0e52a0031cc2d0475c82449e0f340.tar.lz yuzu-93acfbd3a5c0e52a0031cc2d0475c82449e0f340.tar.xz yuzu-93acfbd3a5c0e52a0031cc2d0475c82449e0f340.tar.zst yuzu-93acfbd3a5c0e52a0031cc2d0475c82449e0f340.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_resource_manager.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_resource_manager.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_resource_manager.cpp b/src/video_core/renderer_opengl/gl_resource_manager.cpp index 5c96c1d46..f0ddfb276 100644 --- a/src/video_core/renderer_opengl/gl_resource_manager.cpp +++ b/src/video_core/renderer_opengl/gl_resource_manager.cpp @@ -207,4 +207,21 @@ void OGLFramebuffer::Release() { handle = 0; } +void OGLQuery::Create(GLenum target) { + if (handle != 0) + return; + + MICROPROFILE_SCOPE(OpenGL_ResourceCreation); + glCreateQueries(target, 1, &handle); +} + +void OGLQuery::Release() { + if (handle == 0) + return; + + MICROPROFILE_SCOPE(OpenGL_ResourceDeletion); + glDeleteQueries(1, &handle); + handle = 0; +} + } // namespace OpenGL |