<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 17, 2017 at 5:53 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 Tue, May 16, 2017 at 03:45:20PM -0700, Jason Ekstrand wrote:<br>
> ---<br>
>  src/intel/blorp/blorp_genX_<wbr>exec.h | 56 ++++++++++++++++++++++--------<wbr>---------<br>
>  1 file changed, 31 insertions(+), 25 deletions(-)<br>
><br>
> diff --git a/src/intel/blorp/blorp_genX_<wbr>exec.h b/src/intel/blorp/blorp_genX_<wbr>exec.h<br>
> index 9e61f69..0bb4b9a 100644<br>
> --- a/src/intel/blorp/blorp_genX_<wbr>exec.h<br>
> +++ b/src/intel/blorp/blorp_genX_<wbr>exec.h<br>
> @@ -1316,33 +1316,14 @@ blorp_emit_viewport_state(<wbr>struct blorp_batch *batch,<br>
>  #endif<br>
>  }<br>
><br>
> -<br>
> -/**<br>
> - * \brief Execute a blit or render pass operation.<br>
> - *<br>
> - * To execute the operation, this function manually constructs and emits a<br>
> - * batch to draw a rectangle primitive. The batchbuffer is flushed before<br>
> - * constructing and after emitting the batch.<br>
> - *<br>
> - * This function alters no GL state.<br>
> - */<br>
>  static void<br>
> -blorp_exec(struct blorp_batch *batch, const struct blorp_params *params)<br>
> +blorp_emit_pipeline(struct blorp_batch *batch,<br>
> +                    const struct blorp_params *params)<br>
>  {<br>
>     uint32_t blend_state_offset = 0;<br>
> -   uint32_t color_calc_state_offset = 0;<br>
> +   uint32_t color_calc_state_offset;<br>
>     uint32_t depth_stencil_state_offset;<br>
><br>
> -#if GEN_GEN >= 8<br>
> -   if (params->hiz_op != BLORP_HIZ_OP_NONE) {<br>
> -      blorp_emit_gen8_hiz_op(batch, params);<br>
> -      return;<br>
> -   }<br>
> -#endif<br>
> -<br>
> -   blorp_emit_vertex_buffers(<wbr>batch, params);<br>
> -   blorp_emit_vertex_elements(<wbr>batch, params);<br>
> -<br>
>     emit_urb_config(batch, params);<br>
><br>
>     if (params->wm_prog_data) {<br>
> @@ -1351,7 +1332,7 @@ blorp_exec(struct blorp_batch *batch, const struct blorp_params *params)<br>
>     color_calc_state_offset = blorp_emit_color_calc_state(<wbr>batch, params);<br>
>     depth_stencil_state_offset = blorp_emit_depth_stencil_<wbr>state(batch, params);<br>
><br>
> -#if GEN_GEN <= 6<br>
> +#if GEN_GEN == 6<br>
>     /* 3DSTATE_CC_STATE_POINTERS<br>
>      *<br>
>      * The pointer offsets are relative to<br>
> @@ -1385,8 +1366,6 @@ blorp_exec(struct blorp_batch *batch, const struct blorp_params *params)<br>
>     blorp_emit(batch, GENX(3DSTATE_CONSTANT_GS), gs);<br>
>     blorp_emit(batch, GENX(3DSTATE_CONSTANT_PS), ps);<br>
><br>
> -   blorp_emit_surface_states(<wbr>batch, params);<br>
> -<br>
>     if (params->src.enabled)<br>
>        blorp_emit_sampler_state(<wbr>batch, params);<br>
><br>
> @@ -1423,6 +1402,33 @@ blorp_exec(struct blorp_batch *batch, const struct blorp_params *params)<br>
>     blorp_emit_ps_config(batch, params);<br>
><br>
>     blorp_emit_viewport_state(<wbr>batch, params);<br>
> +}<br>
> +<br>
> +/**<br>
> + * \brief Execute a blit or render pass operation.<br>
> + *<br>
> + * To execute the operation, this function manually constructs and emits a<br>
> + * batch to draw a rectangle primitive. The batchbuffer is flushed before<br>
> + * constructing and after emitting the batch.<br>
> + *<br>
> + * This function alters no GL state.<br>
> + */<br>
> +static void<br>
> +blorp_exec(struct blorp_batch *batch, const struct blorp_params *params)<br>
> +{<br>
> +#if GEN_GEN >= 8<br>
> +   if (params->hiz_op != BLORP_HIZ_OP_NONE) {<br>
> +      blorp_emit_gen8_hiz_op(batch, params);<br>
> +      return;<br>
> +   }<br>
> +#endif<br>
> +<br>
> +   blorp_emit_vertex_buffers(<wbr>batch, params);<br>
> +   blorp_emit_vertex_elements(<wbr>batch, params);<br>
> +<br>
> +   blorp_emit_pipeline(batch, params);<br>
> +<br>
> +   blorp_emit_surface_states(<wbr>batch, params);<br>
<br>
</div></div>I thought binding table had to be earlier but I can't actually see any reason<br>
why. Well, jenkins would scream if it had to be.</blockquote><div><br></div><div>I think the requirement you're thinking of is that BINDING_TABLE_POINTERS has to be emitted after 3DSTATE_CONSTANTS_*S on gen9.  I don't know of any other binding table ordering requirements. <br></div></div></div></div>