[Mesa-dev] [PATCH] i965: Fix assertion in brw_alu3.

Kenneth Graunke kenneth at whitecape.org
Tue Nov 6 23:56:46 PST 2012


On 11/06/2012 11:43 PM, Vinson Lee wrote:
> Fixes side effect in assertion defect reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>   src/mesa/drivers/dri/i965/brw_eu_emit.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
> index 3d95b92..eada9d9 100644
> --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
> +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
> @@ -779,7 +779,7 @@ static struct brw_instruction *brw_alu3(struct brw_compile *p,
>   	  dest.file == BRW_MESSAGE_REGISTER_FILE);
>      assert(dest.nr < 128);
>      assert(dest.address_mode == BRW_ADDRESS_DIRECT);
> -   assert(dest.type = BRW_REGISTER_TYPE_F);
> +   assert(dest.type == BRW_REGISTER_TYPE_F);
>      insn->bits1.da3src.dest_reg_file = (dest.file == BRW_MESSAGE_REGISTER_FILE);
>      insn->bits1.da3src.dest_reg_nr = dest.nr;
>      insn->bits1.da3src.dest_subreg_nr = dest.subnr / 16;

Nice catch!

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the mesa-dev mailing list