[Mesa-dev] [PATCH 5/5] i965/vec4: print predicate control at brw_vec4 dump_instruction
Matt Turner
mattst88 at gmail.com
Thu Oct 15 09:12:08 PDT 2015
On Sat, Oct 10, 2015 at 4:24 AM, Alejandro PiƱeiro <apinheiro at igalia.com> wrote:
> ---
>
> I found this useful while I was using INTEL_DEBUG=optimizer after
> changing how the ifs are emitted. And after all, that info is
> also included by brw_disasm.c
Definitely.
> I assumed that at the vec4_visitor we would not need to handle
> pred_ctrl_align1, but Im not totally sure.
That's correct.
>
> src/mesa/drivers/dri/i965/brw_vec4.cpp | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> index 55e381b..eb81523 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> @@ -1358,9 +1358,21 @@ vec4_visitor::dump_instruction(backend_instruction *be_inst, FILE *file)
> vec4_instruction *inst = (vec4_instruction *)be_inst;
>
> if (inst->predicate) {
> - fprintf(file, "(%cf0.%d) ",
> + static const char *const pred_ctrl_align16[16] = {
> + "",
> + "",
> + ".x",
> + ".y",
> + ".z",
> + ".w",
> + ".any4h",
> + ".all4h",
> + };
Let's just externalize pred_ctrl_align16 from brw_disasm.c and use it
here. See for example commit b9af66528e5b7bd.
With that change,
Reviewed-by: Matt Turner <mattst88 at gmail.com>
More information about the mesa-dev
mailing list