summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2019-01-05 02:16:28 -0300
committerGravatar ReinUsesLisp2019-01-05 02:27:55 -0300
commitfc8a8789da457aa1ebde2e66b4adf00dcda8d82a (patch)
treed584bd222249e05ca1ab0ed1ad4a509de18fee46 /src
parentMerge pull request #1981 from ogniK5377/open-app-area-create (diff)
downloadyuzu-fc8a8789da457aa1ebde2e66b4adf00dcda8d82a.tar.gz
yuzu-fc8a8789da457aa1ebde2e66b4adf00dcda8d82a.tar.xz
yuzu-fc8a8789da457aa1ebde2e66b4adf00dcda8d82a.zip
gl_rasterizer_cache: Use GL_STREAM_COPY for PBOs
Since the data is doing the path CPU -> GPU -> GPU copy is the most approximate hint. Using GL_STREAM_DRAW generated a performance warning on Nvidia's stack. Changing this hint removed the warning.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index d3dcb9a46..bff0c65cd 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -452,7 +452,7 @@ static void CopySurface(const Surface& src_surface, const Surface& dst_surface,
452 const std::size_t buffer_size = std::max(src_params.size_in_bytes, dst_params.size_in_bytes); 452 const std::size_t buffer_size = std::max(src_params.size_in_bytes, dst_params.size_in_bytes);
453 453
454 glBindBuffer(GL_PIXEL_PACK_BUFFER, copy_pbo_handle); 454 glBindBuffer(GL_PIXEL_PACK_BUFFER, copy_pbo_handle);
455 glBufferData(GL_PIXEL_PACK_BUFFER, buffer_size, nullptr, GL_STREAM_DRAW); 455 glBufferData(GL_PIXEL_PACK_BUFFER, buffer_size, nullptr, GL_STREAM_COPY);
456 if (source_format.compressed) { 456 if (source_format.compressed) {
457 glGetCompressedTextureImage(src_surface->Texture().handle, src_attachment, 457 glGetCompressedTextureImage(src_surface->Texture().handle, src_attachment,
458 static_cast<GLsizei>(src_params.size_in_bytes), nullptr); 458 static_cast<GLsizei>(src_params.size_in_bytes), nullptr);