Intel-GFX Archive on lore.kernel.org
 help / color / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: intel-gfx@lists.freedesktop.org
Cc: mesa-dev@lists.freedesktop.org, Ben Widawsky <ben@bwidawsk.net>
Subject: [PATCH 04/10] i965: setup system routine
Date: Sun, 17 Jul 2011 16:25:42 -0700
Message-ID: <1310945148-6777-5-git-send-email-ben@bwidawsk.net> (raw)
In-Reply-To: <1310945148-6777-1-git-send-email-ben@bwidawsk.net>

Upload the system routine as part of the invariant state if debugging.

Remove SIP setting if not debugging to make it more friendly for others
that may be debugging shaders or media kernels.

v2: removed comment per Chris

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 src/mesa/drivers/dri/i965/brw_misc_state.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index bc8ef78..5563ade 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -652,10 +652,14 @@ static void upload_invarient_state( struct brw_context *brw )
       }
    }
 
-   BEGIN_BATCH(2);
-   OUT_BATCH(CMD_STATE_SIP << 16 | (2 - 2));
-   OUT_BATCH(0);
-   ADVANCE_BATCH();
+   /* The system routine must be set after a change to Instruction base */
+   if (brw->wm.debugging)  {
+      assert(brw->wm.sip_offset != 0);
+      BEGIN_BATCH(2);
+      OUT_BATCH(CMD_STATE_SIP << 16 | (2 - 2));
+      OUT_BATCH(brw->wm.sip_offset);
+      ADVANCE_BATCH();
+   }
 
    BEGIN_BATCH(1);
    OUT_BATCH(brw->CMD_VF_STATISTICS << 16 |
-- 
1.7.6

  parent reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-17 23:25 [PATCH 00/10] fs debugging: incorporated Chris' feedback Ben Widawsky
2011-07-17 23:25 ` [PATCH 01/10] intel: shared header for shader debugging Ben Widawsky
2011-07-17 23:25 ` [PATCH 02/10] i965: copy in system routine, reserve extra scratch Ben Widawsky
2011-07-17 23:25 ` [PATCH 03/10] i965: Reserve scratch space for debugger communication Ben Widawsky
2011-07-17 23:25 ` Ben Widawsky [this message]
2011-07-18 18:19   ` [Intel-gfx] [PATCH 04/10] i965: setup system routine Eric Anholt
2011-07-19  4:48     ` Ben Widawsky
2011-07-17 23:25 ` [PATCH 05/10] i965: emit breakpoints Ben Widawsky
2011-07-17 23:25 ` [PATCH 06/10] i965: attach to a listening debugger Ben Widawsky
2011-07-17 23:25 ` [PATCH 07/10] intel-gpu-tools: register range handling for forcewake hooks Ben Widawsky
2011-07-17 23:25 ` [PATCH 08/10] intel-gpu-tools/forcewaked: sample forcewake app Ben Widawsky
2011-07-17 23:25 ` [PATCH 09/10] debugging: add important debug regs Ben Widawsky
2011-07-17 23:25 ` [PATCH 10/10] debugging: shader debugging Ben Widawsky
  -- strict thread matches above, loose matches on Subject: below --
2011-07-13 20:51 [PATCH 0/10] fs " Ben Widawsky
2011-07-13 20:51 ` [PATCH 04/10] i965: setup system routine Ben Widawsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1310945148-6777-5-git-send-email-ben@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mesa-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Intel-GFX Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/intel-gfx/0 intel-gfx/git/0.git
	git clone --mirror https://lore.kernel.org/intel-gfx/1 intel-gfx/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 intel-gfx intel-gfx/ https://lore.kernel.org/intel-gfx \
		intel-gfx@lists.freedesktop.org
	public-inbox-index intel-gfx

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.freedesktop.lists.intel-gfx


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git