Mesa (master): i965: Finalize miptrees before prepare_texture

Jason Ekstrand jekstrand at kemper.freedesktop.org
Mon Jun 5 16:26:38 UTC 2017


Module: Mesa
Branch: master
Commit: 708664159e18487b6676fd5b4c33f52003f81d9e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=708664159e18487b6676fd5b4c33f52003f81d9e

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Fri May 26 10:57:33 2017 -0700

i965: Finalize miptrees before prepare_texture

In order to do resolves for texture views with different formats, we
need intel_texture_object::_Format to be valid.  Calling
intel_finalize_mipmap_tree can safely be done multiple times in a row
and should be a fairly cheap operation.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>

---

 src/mesa/drivers/dri/i965/brw_context.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 9878cae9d4..0a5120d32d 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -253,6 +253,10 @@ intel_update_state(struct gl_context * ctx, GLuint new_state)
       tex_obj = intel_texture_object(ctx->Texture.Unit[i]._Current);
       if (!tex_obj || !tex_obj->mt)
 	 continue;
+
+      /* We need inte_texture_object::_Format to be valid */
+      intel_finalize_mipmap_tree(brw, i);
+
       if (intel_miptree_sample_with_hiz(brw, tex_obj->mt))
          intel_miptree_all_slices_resolve_hiz(brw, tex_obj->mt);
       else




More information about the mesa-commit mailing list