i965: Reset miptree aux state on update_image_buffer
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 12 Sep 2017 22:24:40 +0000 (15:24 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 18 Sep 2017 19:16:50 +0000 (12:16 -0700)
commite97f4b748094466567c7f3bad1a02ecee13db9c8
tree316bab5c566a7be5c2366ce819bcf8a22938c760
parent400ffa748ec95bc8733f92084818cd073193669a
i965: Reset miptree aux state on update_image_buffer

When we get a miptree in through glxBindImageEXT, we don't know the
current aux state so we have to assume the worst-case.  If the image
gets recreated, everything is fine because miptreecreate_for_dri_image
sets it to the default.  However, if our miptree is recycled, then we
may have stale aux_usage and we need to reset to the default otherwise
our aux_state tracking will get messed up.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h