From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 106928] When starting a match Rocket League crashes on "Go" Date: Wed, 04 Jul 2018 07:50:56 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1695097426==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [IPv6:2610:10:20:722:a800:ff:fe98:4b55]) by gabe.freedesktop.org (Postfix) with ESMTP id EEA146EAC4 for ; Wed, 4 Jul 2018 07:50:55 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1695097426== Content-Type: multipart/alternative; boundary="15306906550.BDD0B2.17111" Content-Transfer-Encoding: 7bit --15306906550.BDD0B2.17111 Date: Wed, 4 Jul 2018 07:50:55 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D106928 --- Comment #18 from Miroslav =C5=A0ustek --- (In reply to Roland Scheidegger from comment #12) > (In reply to ubizjak from comment #11) > > The (effectively the same patch as yours) proposed patch would be: > >=20 > > diff --git a/src/gallium/drivers/r600/sb/sb_expr.cpp > > b/src/gallium/drivers/r600/sb/sb_expr.cpp > > index 7a5d62c8e8..a609d1377f 100644 > > --- a/src/gallium/drivers/r600/sb/sb_expr.cpp > > +++ b/src/gallium/drivers/r600/sb/sb_expr.cpp > > @@ -714,6 +714,8 @@ bool expr_handler::fold_assoc(alu_node *n) { > >=20=20 > > n->src.resize(2); > > n->bc.set_op(ALU_OP2_ADD); > > + fold_alu_op2(*n); > > + return true; > > } > > } else if (last_arg >=3D 0) { > > n->src[0] =3D a->src[last_arg]; > >=20 > > WDYT? >=20 > I am not quite convinced it's ok to return true (in fold_alu_op3) if the > expression hasn't really been folded. You are quite right that just above= it > looks similar, but all other places always return the return value of > fold_alu_op2 when calling into it from fold_alu_op3. > (Not saying it isn't correct, just saying I can't tell...) I guess it is OK. There already is the same pattern in fold_mul_add where it tries to fold: > ADD x, MUL(y, z) into: > MULADD y, z, x and when it succeeds, it does: > > fold_alu_op3(*n); > return true; That means that no matter if fold_alu_op3 folds the instruction any further, fold_mul_add returns true because it converted ADD and MUL into MULADD. In fold_alu_op2 where fold_mul_add is called, the return value is used in an early return condition: > if (n.bc.op =3D=3D ALU_OP2_ADD) { > if (fold_mul_add(&n)) > return true; > } It seems OK to me to return true after calling fold_alu_op2 in fold_alu_op3= as a sign that the node should not be folded as op3 anymore. Also, the return value of fold_alu_op* is thrown away anyway here: > bool expr_handler::try_fold(value* v) { > assert(!v->gvn_source); >=20 > if (v->def) Here expr_handler::try_fold(node* n) calls the fold_alu_op* methods: > try_fold(v->def); >=20 > if (v->gvn_source) > return true; >=20 > return false; > } I like the patch that ubizjak@gmail.com posted: > diff --git a/src/gallium/drivers/r600/sb/sb_expr.cpp b/src/gallium/driver= s/r600/sb/sb_expr.cpp > index 1df78da660..8cbff6f577 100644 > --- a/src/gallium/drivers/r600/sb/sb_expr.cpp > +++ b/src/gallium/drivers/r600/sb/sb_expr.cpp > @@ -723,6 +723,8 @@ bool expr_handler::fold_assoc(alu_node *n) { >=20=20 > n->src.resize(2); > n->bc.set_op(ALU_OP2_ADD); > + fold_alu_op2(n); > + return true; > } > } else if (last_arg >=3D 0) { > n->src[0] =3D a->src[last_arg]; --=20 You are receiving this mail because: You are the assignee for the bug.= --15306906550.BDD0B2.17111 Date: Wed, 4 Jul 2018 07:50:55 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Comme= nt # 18 on bug 10692= 8 from Miroslav =C5=A0ustek
(In reply to Roland Scheidegger from comment #12)
> (In reply to ubizjak from comment #11)
> > The (effectively the same patch as yours) proposed patch would be:
> >=20
> > diff --git a/src/gallium/drivers/r600/sb/sb_expr.cpp
> > b/src/gallium/drivers/r600/sb/sb_expr.cpp
> > index 7a5d62c8e8..a609d1377f 100644
> > --- a/src/gallium/drivers/r600/sb/sb_expr.cpp
> > +++ b/src/gallium/drivers/r600/sb/sb_expr.cpp
> > @@ -714,6 +714,8 @@ bool expr_handler::fold_assoc=
(alu_node *n) {
> >=20=20
> >                         n->src.resize(2);
> >                         n->bc.set_op(ALU_OP2_ADD);
> > +                       fold_alu_op2(*n);
> > +                       return true;
> >                 }
> >         } else if (last_arg >=3D 0) {
> >                 n->src[0] =3D a->src[last_arg];
> >=20
> > WDYT?
>=20
> I am not quite convinced it's ok to return true (in fold_alu_op3) if t=
he
> expression hasn't really been folded. You are quite right that just ab=
ove it
> looks similar, but all other places always return the return value of
> fold_alu_op2 when calling into it from fold_alu_op3.
> (Not saying it isn't correct, just saying I can't tell...)

I guess it is OK. There already is the same pattern in fold_mul_add where it
tries to fold:
> ADD x, MUL(y, z)
into:
> MULADD y, z, x

and when it succeeds, it does:
>
>     fold_alu_op3(*n);
>     return true;

That means that no matter if fold_alu_op3 folds the instruction any further,
fold_mul_add returns true because it converted ADD and MUL into MULADD.

In fold_alu_op2 where fold_mul_add is called, the return value is used in an
early return condition:
> 	if (n.bc.op =3D=3D ALU_OP2_ADD) {
> 		if (fold_mul_add(&n))
> 			return true;
> 	}

It seems OK to me to return true after calling fold_alu_op2 in fold_alu_op3=
 as
a sign that the node should not be folded as op3 anymore.

Also, the return value of fold_alu_op* is thrown away anyway here:
> bool expr_handler::try_fold(value* v) {
> 	assert(!v->gvn_source);
>=20
> 	if (v->def)
Here expr_handler::try_fold(node* n) calls the fold_alu_op* methods:
> 		try_fold(v->def);
>=20
> 	if (v->gvn_source)
> 		return true;
>=20
> 	return false;
> }

I like the patch that ubizjak@=
gmail.com posted:
> diff --git a/src/gallium/drivers/r600/sb/sb_expr=
.cpp b/src/gallium/drivers/r600/sb/sb_expr.cpp
> index 1df78da660..8cbff6f577 100644
> --- a/src/gallium/drivers/r600/sb/sb_expr.cpp
> +++ b/src/gallium/drivers/r600/sb/sb_expr.cpp
> @@ -723,6 +723,8 @@ bool expr_handler::fold_assoc(alu_=
node *n) {
>=20=20
>                         n->src.resize(2);
>                         n->bc.set_op(ALU_OP2_ADD);
> +                       fold_alu_op2(n);
> +                       return true;
>                 }
>         } else if (last_arg >=3D 0) {
>                 n->src[0] =3D a->src[last_arg];


You are receiving this mail because:
  • You are the assignee for the bug.
= --15306906550.BDD0B2.17111-- --===============1695097426== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1695097426==--