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>
This commit is contained in:
parent
78c27d12e1
commit
d3d845ca9e
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user