mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-08 05:20:30 +01:00
meta: Abort texture upload if pixels == null and no pixel unpack buffer set
in case of glTexImage{1,2,3}D(). Texture has already been allocated
at this point and we have no data to upload. With out this patch,
with create_pbo = true, we end up creating a temporary pbo and then
uploading uninitialzed texture data.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
parent
a4ff47ade9
commit
8e9eec5cbf
1 changed files with 2 additions and 1 deletions
|
|
@ -151,7 +151,8 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,
|
|||
bool success = false;
|
||||
int z;
|
||||
|
||||
if (!_mesa_is_bufferobj(packing->BufferObj) && !create_pbo)
|
||||
if (!_mesa_is_bufferobj(packing->BufferObj) &&
|
||||
(!create_pbo || pixels == NULL))
|
||||
return false;
|
||||
|
||||
if (format == GL_DEPTH_COMPONENT ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue