mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
meta: Pass null pointer for the pixel data to avoid unnecessary data upload
to a temporary pbo created in _mesa_meta_pbo_GetTexSubImage(). Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
parent
068ba4ac78
commit
688309374d
1 changed files with 4 additions and 1 deletions
|
|
@ -89,8 +89,11 @@ create_texture_for_pbo(struct gl_context *ctx, bool create_pbo,
|
|||
*/
|
||||
_mesa_BindBuffer(pbo_target, *tmp_pbo);
|
||||
|
||||
/* In case of GL_PIXEL_PACK_BUFFER, pass null pointer for the pixel
|
||||
* data to avoid unnecessary data copying in _mesa_BufferData().
|
||||
*/
|
||||
if (is_pixel_pack)
|
||||
_mesa_BufferData(pbo_target, row_stride * height, pixels,
|
||||
_mesa_BufferData(pbo_target, row_stride * height, NULL,
|
||||
GL_STREAM_READ);
|
||||
else
|
||||
_mesa_BufferData(pbo_target, row_stride * height, pixels,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue