From: Eric Anholt Subject: Re: [PATCH 05/11] i965: setup system routine Date: Fri, 24 Jun 2011 17:39:33 -0700 Message-ID: <8739iy68xm.fsf@eliezer.anholt.net> References: <1308944576-12740-1-git-send-email-ben@bwidawsk.net> <1308944576-12740-6-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0934939558==" Return-path: In-Reply-To: <1308944576-12740-6-git-send-email-ben@bwidawsk.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Ben Widawsky , intel-gfx@lists.freedesktop.org Cc: mesa-dev@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0934939558== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable On Fri, 24 Jun 2011 12:42:50 -0700, Ben Widawsky wrote: > Upload the system routine as part of the invariant state if debugging. >=20 > Remove SIP setting if not debugging to make it more friendly for others > that may be debugging shaders or media kernels. Instructions are from an offset of the brw->cache.bo these days. So you'd need to load the program data into there, and be careful to retain the SIP when brw_clear_cache() is called. > Signed-off-by: Ben Widawsky > --- > src/mesa/drivers/dri/i965/brw_misc_state.c | 24 +++++++++++-----------= -- > 1 files changed, 11 insertions(+), 13 deletions(-) >=20 > diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/driver= s/dri/i965/brw_misc_state.c > index 1f3b64f..2465bc0 100644 > --- a/src/mesa/drivers/dri/i965/brw_misc_state.c > +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c > @@ -633,19 +633,17 @@ static void upload_invarient_state( struct brw_cont= ext *brw ) > } > } > } > - > - /* 0x61020000 State Instruction Pointer */ > - { > - struct brw_system_instruction_pointer sip; > - memset(&sip, 0, sizeof(sip)); > - > - sip.header.opcode =3D CMD_STATE_INSN_POINTER; > - sip.header.length =3D 0; > - sip.bits0.pad =3D 0; > - sip.bits0.system_instruction_pointer =3D 0; > - BRW_BATCH_STRUCT(brw, &sip); > - } > - > + /* The system routine must be set after a change to Instruction bas= e */ > + if (brw->wm.debugging) { > + assert(brw->wm.system_routine !=3D NULL); > + /* assert instruction base =3D=3D 0 */ > + BEGIN_BATCH(4); > + OUT_BATCH(CMD_STATE_INSN_POINTER << 16); > + OUT_RELOC(brw->wm.system_routine, I915_GEM_DOMAIN_RENDER, 0, 0); > + OUT_BATCH(MI_FLUSH | 1 << 1); > + OUT_BATCH(MI_NOOP); > + ADVANCE_BATCH(); > + } >=20=20 > { > struct brw_vf_statistics vfs; > --=20 > 1.7.5.2 >=20 > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk4FLkUACgkQHUdvYGzw6vd37wCeMj2a8VaZQUXE536HsvcvZWUp YvYAnjAd2Ff3U13wjZyudxdvCsavN03u =wLuI -----END PGP SIGNATURE----- --=-=-=-- --===============0934939558== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0934939558==--