[Mesa-dev] [PATCH 2/3] i965: Avoid crashing while dumping vec4 insn operands
Matt Turner
mattst88 at gmail.com
Mon Jul 7 23:38:38 PDT 2014
On Sun, Jul 6, 2014 at 1:11 AM, Chris Forbes <chrisf at ijw.co.nz> wrote:
> We'd otherwise go looking into virtual_grf_sizes for things that aren't
> in there at all.
>
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
> src/mesa/drivers/dri/i965/brw_vec4.cpp | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> index 5ba7d9c..4b7576a 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> @@ -1337,7 +1337,9 @@ vec4_visitor::dump_instruction(backend_instruction *be_inst, FILE *file)
> break;
> }
>
> - if (virtual_grf_sizes[inst->src[i].reg] != 1)
> + if (inst->src[i].reg_offset &&
I totally ignored what the actual code in the if block was doing, so I
was confused by the relation of reg_offset != 0 and looking things up
in virtual_grf_sizes[]. Probably add the != 0, and maybe a comment
that says /* Don't print .0 */ or something.
For the series
Reviewed-by: Matt Turner <mattst88 at gmail.com>
More information about the mesa-dev
mailing list