summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-06-14 18:51:13 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-21 02:38:34 +0200
commit9422cf7c105106d794d4d2fb32822ab287e79422 (patch)
tree30a8d06d5def460e0df9c10ef0afb488b5f49de4 /src/video_core
parentgl_texture_cache: Correct Image Blit (diff)
downloadyuzu-9422cf7c105106d794d4d2fb32822ab287e79422.tar
yuzu-9422cf7c105106d794d4d2fb32822ab287e79422.tar.gz
yuzu-9422cf7c105106d794d4d2fb32822ab287e79422.tar.bz2
yuzu-9422cf7c105106d794d4d2fb32822ab287e79422.tar.lz
yuzu-9422cf7c105106d794d4d2fb32822ab287e79422.tar.xz
yuzu-9422cf7c105106d794d4d2fb32822ab287e79422.tar.zst
yuzu-9422cf7c105106d794d4d2fb32822ab287e79422.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_resource_manager.cpp5
-rw-r--r--src/video_core/renderer_opengl/gl_resource_manager.h2
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.cpp2
3 files changed, 4 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_resource_manager.cpp b/src/video_core/renderer_opengl/gl_resource_manager.cpp
index a1f91d677..9f840a42e 100644
--- a/src/video_core/renderer_opengl/gl_resource_manager.cpp
+++ b/src/video_core/renderer_opengl/gl_resource_manager.cpp
@@ -148,12 +148,11 @@ void OGLBuffer::Release() {
handle = 0;
}
-void OGLBuffer::MakePersistant(std::size_t buffer_size) {
+void OGLBuffer::MakeStreamCopy(std::size_t buffer_size) {
if (handle == 0 || buffer_size == 0)
return;
- const GLbitfield flags = GL_MAP_PERSISTENT_BIT | GL_MAP_WRITE_BIT | GL_MAP_READ_BIT;
- glNamedBufferStorage(handle, static_cast<GLsizeiptr>(buffer_size), nullptr, flags);
+ glNamedBufferData(handle, buffer_size, nullptr, GL_STREAM_COPY);
}
void OGLSync::Create() {
diff --git a/src/video_core/renderer_opengl/gl_resource_manager.h b/src/video_core/renderer_opengl/gl_resource_manager.h
index f2873ef96..b2aa558a1 100644
--- a/src/video_core/renderer_opengl/gl_resource_manager.h
+++ b/src/video_core/renderer_opengl/gl_resource_manager.h
@@ -187,7 +187,7 @@ public:
void Release();
// Converts the buffer into a persistant storage buffer
- void MakePersistant(std::size_t buffer_size);
+ void MakeStreamCopy(std::size_t buffer_size);
GLuint handle = 0;
};
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp
index edb4e3177..892f286b7 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp
@@ -599,7 +599,7 @@ GLuint TextureCacheOpenGL::FetchPBO(std::size_t buffer_size) {
if (cp.handle == 0) {
const std::size_t ceil_size = 1ULL << l2;
cp.Create();
- cp.MakePersistant(ceil_size);
+ cp.MakeStreamCopy(ceil_size);
}
return cp.handle;
}