<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 28, 2016 at 12:27 PM, 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 Sat, Oct 22, 2016 at 10:50:52AM -0700, Jason Ekstrand wrote:<br>
> ---<br>
>  src/intel/vulkan/anv_blorp.c       | 24 ++++++++++++++++++++++++<br>
>  src/intel/vulkan/anv_private.h     |  5 +++++<br>
>  src/intel/vulkan/genX_blorp_<wbr>exec.c | 18 ++----------------<br>
>  3 files changed, 31 insertions(+), 16 deletions(-)<br>
><br>
> diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c<br>
> index 5361c4b..f495815 100644<br>
> --- a/src/intel/vulkan/anv_blorp.c<br>
> +++ b/src/intel/vulkan/anv_blorp.c<br>
> @@ -868,6 +868,30 @@ void anv_CmdClearDepthStencilImage(<br>
>     blorp_batch_finish(&batch);<br>
>  }<br>
><br>
> +struct anv_state<br>
> +anv_cmd_buffer_alloc_blorp_<wbr>binding_table(struct anv_cmd_buffer *cmd_buffer,<br>
> +                                         uint32_t num_entries,<br>
> +                                         uint32_t *state_offset)<br>
> +{<br>
> +   struct anv_state bt_state =<br>
> +      anv_cmd_buffer_alloc_binding_<wbr>table(cmd_buffer, num_entries,<br>
> +                                         state_offset);<br>
> +   if (bt_state.map == NULL) {<br>
> +      /* We ran out of space.  Grab a new binding table block. */<br>
> +      VkResult result = anv_cmd_buffer_new_binding_<wbr>table_block(cmd_buffer);<br>
> +      assert(result == VK_SUCCESS);<br>
> +<br>
> +      /* Re-emit state base addresses so we get the new surface state base<br>
> +       * address before we start emitting binding tables etc.<br>
> +       */<br>
> +      anv_cmd_buffer_emit_state_<wbr>base_address(cmd_buffer);<br>
> +<br>
> +      bt_state = anv_cmd_buffer_alloc_binding_<wbr>table(cmd_buffer, num_entries,<br>
> +                                                    state_offset);<br>
> +      assert(bt_state.map != NULL);<br>
> +   }<br>
<br>
</div></div>This is not returning the state.<br></blockquote><div><br></div><div>Thanks for catching this.  I've got it fixed now.<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>
> +<br>
>  static void<br>
>  clear_color_attachment(struct anv_cmd_buffer *cmd_buffer,<br>
>                         struct blorp_batch *batch,<br>
> diff --git a/src/intel/vulkan/anv_<wbr>private.h b/src/intel/vulkan/anv_<wbr>private.h<br>
> index 5664a6e..44fe606 100644<br>
> --- a/src/intel/vulkan/anv_<wbr>private.h<br>
> +++ b/src/intel/vulkan/anv_<wbr>private.h<br>
> @@ -1271,6 +1271,11 @@ void anv_cmd_buffer_resolve_<wbr>subpass(struct anv_cmd_buffer *cmd_buffer);<br>
>  const struct anv_image_view *<br>
>  anv_cmd_buffer_get_depth_<wbr>stencil_view(const struct anv_cmd_buffer *cmd_buffer);<br>
><br>
> +struct anv_state<br>
> +anv_cmd_buffer_alloc_blorp_<wbr>binding_table(struct anv_cmd_buffer *cmd_buffer,<br>
> +                                         uint32_t num_entries,<br>
> +                                         uint32_t *state_offset);<br>
> +<br>
>  void anv_cmd_buffer_dump(struct anv_cmd_buffer *cmd_buffer);<br>
><br>
>  struct anv_fence {<br>
> diff --git a/src/intel/vulkan/genX_blorp_<wbr>exec.c b/src/intel/vulkan/genX_blorp_<wbr>exec.c<br>
> index 185aff6..a705de0 100644<br>
> --- a/src/intel/vulkan/genX_blorp_<wbr>exec.c<br>
> +++ b/src/intel/vulkan/genX_blorp_<wbr>exec.c<br>
> @@ -87,22 +87,8 @@ blorp_alloc_binding_table(<wbr>struct blorp_batch *batch, unsigned num_entries,<br>
><br>
>     uint32_t state_offset;<br>
>     struct anv_state bt_state =<br>
> -      anv_cmd_buffer_alloc_binding_<wbr>table(cmd_buffer, num_entries,<br>
> -                                         &state_offset);<br>
> -   if (bt_state.map == NULL) {<br>
> -      /* We ran out of space.  Grab a new binding table block. */<br>
> -      VkResult result = anv_cmd_buffer_new_binding_<wbr>table_block(cmd_buffer);<br>
> -      assert(result == VK_SUCCESS);<br>
> -<br>
> -      /* Re-emit state base addresses so we get the new surface state base<br>
> -       * address before we start emitting binding tables etc.<br>
> -       */<br>
> -      genX(cmd_buffer_emit_state_<wbr>base_address)(cmd_buffer);<br>
> -<br>
> -      bt_state = anv_cmd_buffer_alloc_binding_<wbr>table(cmd_buffer, num_entries,<br>
> -                                                    &state_offset);<br>
> -      assert(bt_state.map != NULL);<br>
> -   }<br>
> +      anv_cmd_buffer_alloc_blorp_<wbr>binding_table(cmd_buffer, num_entries,<br>
> +                                               &state_offset);<br>
><br>
>     uint32_t *bt_map = bt_state.map;<br>
>     *bt_offset = bt_state.offset;<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>