All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: yuanhan.liu@intel.com
Subject: [PATCH 3/3] i965: new state cache for SF scissor on gen6
Date: Wed, 16 Feb 2011 14:07:41 +0800	[thread overview]
Message-ID: <1297836461-31543-5-git-send-email-zhenyuw@linux.intel.com> (raw)
In-Reply-To: <1297836461-31543-1-git-send-email-zhenyuw@linux.intel.com>

So aub file could include SF scissor state with specific
trace block type.
---
 src/mesa/drivers/dri/i965/brw_context.h        |    4 +++-
 src/mesa/drivers/dri/i965/brw_state_cache.c    |    2 ++
 src/mesa/drivers/dri/i965/gen6_scissor_state.c |    2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index ea74530..33d72d2 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -313,7 +313,8 @@ enum brw_cache_id {
    BRW_WM_UNIT,
    BRW_SF_PROG,
    BRW_SF_VP,
-   BRW_SF_UNIT, /* scissor state on gen6 */
+   BRW_SF_UNIT,
+   BRW_SF_SCISSOR_UNIT,
    BRW_VS_UNIT,
    BRW_VS_PROG,
    BRW_GS_UNIT,
@@ -387,6 +388,7 @@ struct brw_tracked_state {
 #define CACHE_NEW_SF_PROG                (1<<BRW_SF_PROG)
 #define CACHE_NEW_SF_VP                  (1<<BRW_SF_VP)
 #define CACHE_NEW_SF_UNIT                (1<<BRW_SF_UNIT)
+#define CACHE_NEW_SF_SCISSOR_UNIT        (1<<BRW_SF_SCISSOR_UNIT)
 #define CACHE_NEW_VS_UNIT                (1<<BRW_VS_UNIT)
 #define CACHE_NEW_VS_PROG                (1<<BRW_VS_PROG)
 #define CACHE_NEW_GS_UNIT                (1<<BRW_GS_UNIT)
diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c
index 01eeb19..585b4c7 100644
--- a/src/mesa/drivers/dri/i965/brw_state_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_state_cache.c
@@ -375,6 +375,8 @@ brw_init_non_surface_cache(struct brw_context *brw)
 
    brw_init_cache_id(cache, "SF_UNIT", BRW_SF_UNIT);
 
+   brw_init_cache_id(cache, "SF_SCISSOR_UNIT", BRW_SF_SCISSOR_UNIT);
+
    brw_init_cache_id(cache, "VS_UNIT", BRW_VS_UNIT);
 
    brw_init_cache_id(cache, "VS_PROG", BRW_VS_PROG);
diff --git a/src/mesa/drivers/dri/i965/gen6_scissor_state.c b/src/mesa/drivers/dri/i965/gen6_scissor_state.c
index 12b6582..baee3ea 100644
--- a/src/mesa/drivers/dri/i965/gen6_scissor_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_scissor_state.c
@@ -74,7 +74,7 @@ prepare_scissor_state(struct brw_context *brw)
    }
 
    drm_intel_bo_unreference(brw->sf.state_bo);
-   brw->sf.state_bo = brw_cache_data(&brw->cache, BRW_SF_UNIT,
+   brw->sf.state_bo = brw_cache_data(&brw->cache, BRW_SF_SCISSOR_UNIT,
 				     &scissor, sizeof(scissor));
 }
 
-- 
1.7.2.3

      parent reply	other threads:[~2011-02-16  6:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-16  6:07 AUB file dump support patches Zhenyu Wang
2011-02-16  6:07 ` [PATCH] intel: Add AUB file dump support Zhenyu Wang
2011-02-22  5:20   ` Xiang, Haihao
2011-02-22  5:51     ` Zhenyu Wang
2011-02-22  6:09       ` Xiang, Haihao
2011-02-22  6:22         ` Zhenyu Wang
2011-02-22  6:51           ` Xiang, Haihao
2011-02-22  6:55             ` Zhenyu Wang
2011-02-22 17:33               ` Eric Anholt
2011-02-23  1:49                 ` Zhenyu Wang
2011-02-23  2:18                   ` Kenneth Graunke
2011-02-16  6:07 ` [PATCH 1/3] intel: new debug option for aub file dump Zhenyu Wang
2011-02-16  6:07 ` [PATCH 2/3] i965: aub dump for render buffer Zhenyu Wang
2011-02-16  6:07 ` Zhenyu Wang [this message]

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=1297836461-31543-5-git-send-email-zhenyuw@linux.intel.com \
    --to=zhenyuw@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=yuanhan.liu@intel.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.