<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jul 12, 2017 at 11:39 AM, Chad Versace <span dir="ltr"><<a href="mailto:chadversary@chromium.org" target="_blank">chadversary@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu 29 Jun 2017, Jason Ekstrand wrote:<br>
> Instead of always doing a full resolve, only resolve the bits that are<br>
> needed. This means that we only do a partial resolve when the miptree<br>
> modifier is I915_FORMAT_MOD_Y_TILED_CCS.<br>
><br>
> Reviewed-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
> ---<br>
> src/mesa/drivers/dri/i965/brw_<wbr>context.c | 2 +-<br>
> src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c | 37 +++++++++++++++++++++++++++<br>
> src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h | 9 +++++++<br>
> 3 files changed, 47 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_context.c b/src/mesa/drivers/dri/i965/<wbr>brw_context.c<br>
> index 2525320..f086ed1 100644<br>
> --- a/src/mesa/drivers/dri/i965/<wbr>brw_context.c<br>
> +++ b/src/mesa/drivers/dri/i965/<wbr>brw_context.c<br>
> @@ -1338,7 +1338,7 @@ intel_resolve_for_dri2_flush(<wbr>struct brw_context *brw,<br>
> if (rb->mt->num_samples <= 1) {<br>
> assert(rb->mt_layer == 0 && rb->mt_level == 0 &&<br>
> rb->layer_count == 1);<br>
> - intel_miptree_prepare_access(<wbr>brw, rb->mt, 0, 1, 0, 1, false, false);<br>
> + intel_miptree_prepare_<wbr>external(brw, rb->mt);<br>
<br>
</span>Yes! Now it should be easy to hook up EGL_EXT_image_flush_external for CrOS.<br>
<span class=""><br>
> diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h<br>
> index c4ed525..c1bd3af 100644<br>
> --- a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h<br>
> +++ b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h<br>
> @@ -636,6 +636,12 @@ struct intel_mipmap_tree<br>
> */<br>
> bool is_scanout;<br>
><br>
> + /**<br>
> + * For external surfaces, this is DRM format modifier that was used to<br>
> + * create or import the surface.<br>
> + */<br>
> + uint64_t drm_modifier;<br>
<br>
</span>My natural question was "and what about non-external surfaces?". The<br>
question has a non-obvious answer since default initialization sets<br>
drm_modifier to a valid modifier (DRM_FORMAT_MOD_LINEAR). Please<br>
mention here that the modifier may be DRM_FORMAT_MOD_INVALID for<br>
non-external surfaces.<br></blockquote><div><br></div><div>Ok, I can say something such as: For internal surfaces, this will always be DRM_FORMAT_MOD_INVALID.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
With that extra comment, this is<br>
Reviewed-by: Chad Versace <<a href="mailto:chadversary@chromium.org">chadversary@chromium.org</a>><br>
</blockquote></div><br></div></div>