Hi Nanley, On Fri, 18 Jan 2019 15:32:02 -0800 Nanley Chery <nanleych...@gmail.com> wrote:
> > diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c > > b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index > > e214fae140..4d1eafac91 100644 --- > > a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ > > b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -329,6 [...] > > @@ -474,6 +485,11 @@ static void brw_update_texture_surface(struct > > gl_context *ctx, struct intel_texture_object *intel_obj = > > intel_texture_object(obj); struct intel_mipmap_tree *mt = > > intel_obj->mt; > > + if (mt->needs_fake_etc) { > > + assert(mt->shadow_mt); > > + mt = mt->shadow_mt; > > + } > > + > > if (plane > 0) { > > if (mt->plane[plane - 1] == NULL) > > return; > > @@ -512,7 +528,7 @@ static void brw_update_texture_surface(struct > > gl_context *ctx, > > * is safe because texture views aren't allowed on > > depth/stencil. */ > > mesa_fmt = mt->format; > > - } else if (mt->etc_format != MESA_FORMAT_NONE) { > > + } else if (intel_obj->mt->etc_format != MESA_FORMAT_NONE) { > > mesa_fmt = mt->format; > > For uniformity, lets access mt->shadow_mt->format here and move the > mt->needs_fake_etc check from above to below this condition: > > } else if (devinfo->gen <= 7 && mt->format == > MESA_FORMAT_S_UINT8) { I'd like to ask you one more question on this change: if I do the check for the fake etc later, the following code will run for the main miptree that contains the compressed data and has ETC2 format: > > if (plane > 0) { > > if (mt->plane[plane - 1] == NULL) > > return; > > @@ -512,7 +528,7 @@ static void brw_update_texture_surface(struct > > gl_context *ctx, > > * is safe because texture views aren't allowed on > > depth/stencil. */ > > mesa_fmt = mt->format; Wouldn't this be a problem? Thank you in advance, Eleni _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev