<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, May 30, 2017 at 12:34 AM, Pohjolainen, Topi <span dir="ltr"><<a href="mailto:topi.pohjolainen@gmail.com" target="_blank">topi.pohjolainen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, May 26, 2017 at 04:30:09PM -0700, Jason Ekstrand wrote:<br>
> ---<br>
> src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c | 70 ++++++++++++---------------<br>
> 1 file changed, 30 insertions(+), 40 deletions(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
> index 2701201..3a4fd89 100644<br>
> --- a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
> +++ b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
> @@ -1978,23 +1978,30 @@ intel_miptree_set_all_slices_<wbr>need_depth_resolve(struct intel_mipmap_tree *mt,<br>
> }<br>
><br>
> static bool<br>
> -intel_miptree_slice_resolve(<wbr>struct brw_context *brw,<br>
> - struct intel_mipmap_tree *mt,<br>
> - uint32_t level,<br>
> - uint32_t layer,<br>
> - enum blorp_hiz_op need)<br>
> +intel_miptree_depth_hiz_<wbr>resolve(struct brw_context *brw,<br>
> + struct intel_mipmap_tree *mt,<br>
> + uint32_t start_level, uint32_t num_levels,<br>
> + uint32_t start_layer, uint32_t num_layers,<br>
> + enum blorp_hiz_op need)<br>
> {<br>
> - intel_miptree_check_level_<wbr>layer(mt, level, layer);<br>
> + bool did_resolve = false;<br>
><br>
> - struct intel_resolve_map *item =<br>
> - intel_resolve_map_get(&mt-><wbr>hiz_map, level, layer);<br>
> + foreach_list_typed_safe(struct intel_resolve_map, map, link, &mt->hiz_map) {<br>
> + if (map->level < start_level ||<br>
> + map->level >= (start_level + num_levels) ||<br>
> + map->layer < start_layer ||<br>
> + map->layer >= (start_layer + num_layers))<br>
> + continue;<br>
><br>
> - if (!item || item->need != need)<br>
> - return false;<br>
> + if (map->need != need)<br>
> + continue;<br>
<br>
</div></div>Indentation looks a little odd here.<br><div><div class="h5"></div></div></blockquote><div><br></div><div>A tab snuck in there somehow. Fixed.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
><br>
> - intel_hiz_exec(brw, mt, level, layer, need);<br>
> - intel_resolve_map_remove(item)<wbr>;<br>
> - return true;<br>
> + intel_hiz_exec(brw, mt, map->level, map->layer, need);<br>
> + intel_resolve_map_remove(map);<br>
> + did_resolve = true;<br>
> + }<br>
> +<br>
> + return did_resolve;<br>
> }<br>
><br>
> bool<br>
> @@ -2003,8 +2010,8 @@ intel_miptree_slice_resolve_<wbr>hiz(struct brw_context *brw,<br>
> uint32_t level,<br>
> uint32_t layer)<br>
> {<br>
> - return intel_miptree_slice_resolve(<wbr>brw, mt, level, layer,<br>
> - BLORP_HIZ_OP_HIZ_RESOLVE);<br>
> + return intel_miptree_depth_hiz_<wbr>resolve(brw, mt, level, 1, layer, 1,<br>
> + BLORP_HIZ_OP_HIZ_RESOLVE);<br>
> }<br>
><br>
> bool<br>
> @@ -2013,43 +2020,26 @@ intel_miptree_slice_resolve_<wbr>depth(struct brw_context *brw,<br>
> uint32_t level,<br>
> uint32_t layer)<br>
> {<br>
> - return intel_miptree_slice_resolve(<wbr>brw, mt, level, layer,<br>
> - BLORP_HIZ_OP_DEPTH_RESOLVE);<br>
> -}<br>
> -<br>
> -static bool<br>
> -intel_miptree_all_slices_<wbr>resolve(struct brw_context *brw,<br>
> - struct intel_mipmap_tree *mt,<br>
> - enum blorp_hiz_op need)<br>
> -{<br>
> - bool did_resolve = false;<br>
> -<br>
> - foreach_list_typed_safe(struct intel_resolve_map, map, link, &mt->hiz_map) {<br>
> - if (map->need != need)<br>
> - continue;<br>
> -<br>
> - intel_hiz_exec(brw, mt, map->level, map->layer, need);<br>
> - intel_resolve_map_remove(map);<br>
> - did_resolve = true;<br>
> - }<br>
> -<br>
> - return did_resolve;<br>
> + return intel_miptree_depth_hiz_<wbr>resolve(brw, mt, level, 1, layer, 1,<br>
> + BLORP_HIZ_OP_DEPTH_RESOLVE);<br>
> }<br>
><br>
> bool<br>
> intel_miptree_all_slices_<wbr>resolve_hiz(struct brw_context *brw,<br>
> struct intel_mipmap_tree *mt)<br>
> {<br>
> - return intel_miptree_all_slices_<wbr>resolve(brw, mt,<br>
> - BLORP_HIZ_OP_HIZ_RESOLVE);<br>
> + return intel_miptree_depth_hiz_<wbr>resolve(brw, mt,<br>
> + 0, UINT32_MAX, 0, UINT32_MAX,<br>
> + BLORP_HIZ_OP_HIZ_RESOLVE);<br>
> }<br>
><br>
> bool<br>
> intel_miptree_all_slices_<wbr>resolve_depth(struct brw_context *brw,<br>
> struct intel_mipmap_tree *mt)<br>
> {<br>
> - return intel_miptree_all_slices_<wbr>resolve(brw, mt,<br>
> - BLORP_HIZ_OP_DEPTH_RESOLVE);<br>
> + return intel_miptree_depth_hiz_<wbr>resolve(brw, mt,<br>
> + 0, UINT32_MAX, 0, UINT32_MAX,<br>
> + BLORP_HIZ_OP_DEPTH_RESOLVE);<br>
> }<br>
><br>
> enum intel_fast_clear_state<br>
> --<br>
> 2.5.0.400.gff86faf<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div><br></div></div>