Such buffers can only be useful by reading from them with the CPU, so we
need to make sure CPU reads are fast.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84178
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: mesa-stable@lists.freedesktop.org
/* BufferData */
switch (usage) {
case GL_STATIC_DRAW:
- case GL_STATIC_READ:
case GL_STATIC_COPY:
default:
pipe_usage = PIPE_USAGE_DEFAULT;
break;
case GL_DYNAMIC_DRAW:
- case GL_DYNAMIC_READ:
case GL_DYNAMIC_COPY:
pipe_usage = PIPE_USAGE_DYNAMIC;
break;
case GL_STREAM_DRAW:
- case GL_STREAM_READ:
case GL_STREAM_COPY:
pipe_usage = PIPE_USAGE_STREAM;
break;
+ case GL_STATIC_READ:
+ case GL_DYNAMIC_READ:
+ case GL_STREAM_READ:
+ pipe_usage = PIPE_USAGE_STAGING;
+ break;
}
}