[Mesa-dev] [PATCH v2 4/5] i965: Fixed the CopyImageSubData for ETC2 on Gen < 8

Eleni Maria Stea estea at igalia.com
Sun Feb 3 13:07:35 UTC 2019


For CopyImageSubData to copy the data during the 1st draw call, we need
to update the shadow tree right before the rendering.
---
 src/mesa/drivers/dri/i965/brw_draw.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index ec4fe0b096f..d00e0a726b1 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -559,6 +559,11 @@ brw_predraw_resolve_inputs(struct brw_context *brw, bool rendering,
           tex_obj->mt->format == MESA_FORMAT_S_UINT8) {
          intel_update_r8stencil(brw, tex_obj->mt);
       }
+
+      if (intel_miptree_has_etc_shadow(brw, tex_obj->mt) &&
+          tex_obj->mt->shadow_needs_update) {
+         intel_miptree_update_etc_shadow_levels(brw, tex_obj->mt);
+      }
    }
 
    /* Resolve color for each active shader image. */
-- 
2.20.1



More information about the mesa-dev mailing list