diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2014-09-25 15:27:22 +0900 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-09-29 13:17:57 -0700 |
commit | d3d845ca9e92f0a2ccde93f4242d7769cfe14164 (patch) | |
tree | 90c69179867e9854ae6eee1a23c1bfdab10cf465 /glamor | |
parent | 78c27d12e1f4857bfcfc92afbb69d5dd989232b9 (diff) |
glamor: Use GL_STREAM_READ also for read/write access to a PBO
Otherwise the CPU may end up reading from non-cacheable memory, which is
very slow.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84178
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Markus Wick <markus@selfnet.de>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'glamor')
-rw-r--r-- | glamor/glamor_prepare.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/glamor/glamor_prepare.c b/glamor/glamor_prepare.c index 561c55d19..fb85d9082 100644 --- a/glamor/glamor_prepare.c +++ b/glamor/glamor_prepare.c @@ -84,10 +84,7 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box) if (priv->base.pbo == 0) glGenBuffers(1, &priv->base.pbo); - if (access == GLAMOR_ACCESS_RW) - gl_usage = GL_DYNAMIC_DRAW; - else - gl_usage = GL_STREAM_READ; + gl_usage = GL_STREAM_READ; glBindBuffer(GL_PIXEL_PACK_BUFFER, priv->base.pbo); glBufferData(GL_PIXEL_PACK_BUFFER, |