[Mesa-dev] [PATCH 1/2] i965: Add a second successor to BRW_OPCODE_WHILE

Matt Turner mattst88 at gmail.com
Wed Oct 7 10:27:34 PDT 2015


On Mon, Oct 5, 2015 at 6:29 AM, Neil Roberts <neil at linux.intel.com> wrote:
> It is possible to directly predicate the WHILE instruction. In this
> case there will be a second successor block because the execution can
> resume from the instruction after the loop. This will be used in a
> subsequent patch.
> ---
>  src/mesa/drivers/dri/i965/brw_cfg.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp b/src/mesa/drivers/dri/i965/brw_cfg.cpp
> index 91d53ef..531fa16 100644
> --- a/src/mesa/drivers/dri/i965/brw_cfg.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_cfg.cpp
> @@ -305,6 +305,10 @@ cfg_t::cfg_t(exec_list *instructions)
>
>           assert(cur_do != NULL && cur_while != NULL);
>          cur->add_successor(mem_ctx, cur_do);
> +
> +         if (inst->predicate)
> +            cur->add_successor(mem_ctx, cur_while);
> +

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-dev mailing list