[Mesa-dev] [PATCH 17/30] i965: Finalize miptrees before prepare_texture
Jason Ekstrand
jason at jlekstrand.net
Fri May 26 23:30:21 UTC 2017
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.
---
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 593b325..78a3371 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -255,6 +255,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
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list