diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-10-25 04:52:43 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-16 22:11:33 +0100 |
commit | 9fc1fa1b0dd015db15c6eaafe68206943bf4cbc1 (patch) | |
tree | aabaf59f591abb4b7348b2903df6024ae6022e05 /src/video_core/renderer_opengl/gl_resource_manager.cpp | |
parent | Texture Cache: Fix memory usage on ScaleDown. (diff) | |
download | yuzu-9fc1fa1b0dd015db15c6eaafe68206943bf4cbc1.tar yuzu-9fc1fa1b0dd015db15c6eaafe68206943bf4cbc1.tar.gz yuzu-9fc1fa1b0dd015db15c6eaafe68206943bf4cbc1.tar.bz2 yuzu-9fc1fa1b0dd015db15c6eaafe68206943bf4cbc1.tar.lz yuzu-9fc1fa1b0dd015db15c6eaafe68206943bf4cbc1.tar.xz yuzu-9fc1fa1b0dd015db15c6eaafe68206943bf4cbc1.tar.zst yuzu-9fc1fa1b0dd015db15c6eaafe68206943bf4cbc1.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 | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_resource_manager.cpp b/src/video_core/renderer_opengl/gl_resource_manager.cpp index 70947838c..5e7101d28 100644 --- a/src/video_core/renderer_opengl/gl_resource_manager.cpp +++ b/src/video_core/renderer_opengl/gl_resource_manager.cpp @@ -166,7 +166,12 @@ void OGLFramebuffer::Create() { return; MICROPROFILE_SCOPE(OpenGL_ResourceCreation); - glCreateFramebuffers(1, &handle); + // Bind to READ_FRAMEBUFFER to stop Nvidia's driver from creating an EXT_framebuffer instead of + // a core framebuffer. EXT framebuffer attachments have to match in size and can be shared + // across contexts. yuzu doesn't share framebuffers across contexts and we need attachments with + // mismatching size, this is why core framebuffers are preferred. + glGenFramebuffers(1, &handle); + glBindFramebuffer(GL_READ_FRAMEBUFFER, handle); } void OGLFramebuffer::Release() { |