diff options
author | Jason Ekstrand <[email protected]> | 2017-05-31 17:04:13 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-10-12 19:58:40 -0700 |
commit | 52f39d69108b3c3cb5406d361d78ccafdd7b9c86 (patch) | |
tree | c2b72cd27f27b7e28739cd8e3d1c11beca2c3e89 /src/mesa/drivers/dri | |
parent | d9ed4f6c32b4cb1d7e0f41b1f342c336e70c0af4 (diff) |
i965/tex: Check if there is data to upload up-front
Reviewed-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_image.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c index 7396597d9f9..69860e28e3b 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_image.c +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c @@ -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) |