mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 00:49:04 +02:00
i965/tex: Check if there is data to upload up-front
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
d9ed4f6c32
commit
52f39d6910
1 changed files with 4 additions and 0 deletions
|
|
@ -296,6 +296,10 @@ intel_upload_tex(struct gl_context * ctx,
|
|||
struct intel_mipmap_tree *mt = intel_texture_image(texImage)->mt;
|
||||
bool ok;
|
||||
|
||||
/* Check that there is actually data to store. */
|
||||
if (pixels == NULL && !_mesa_is_bufferobj(packing->BufferObj))
|
||||
return;
|
||||
|
||||
bool tex_busy = mt && brw_bo_busy(mt->bo);
|
||||
|
||||
if (mt && mt->format == MESA_FORMAT_S_UINT8)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue