Mesa (master): i965: GC the last two arguments to brw_cache_data.

Eric Anholt anholt at kemper.freedesktop.org
Fri Jun 11 00:21:47 PDT 2010


Module: Mesa
Branch: master
Commit: 8ad3fdc9678866b40f3d9faaaf7c6333d388907f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8ad3fdc9678866b40f3d9faaaf7c6333d388907f

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jun  9 17:19:40 2010 -0700

i965: GC the last two arguments to brw_cache_data.

Now that the binding table is streamed indirect state, they were
always NULL/0.

---

 src/mesa/drivers/dri/i965/brw_cc.c               |    3 +--
 src/mesa/drivers/dri/i965/brw_sf_state.c         |    3 +--
 src/mesa/drivers/dri/i965/brw_state.h            |    4 +---
 src/mesa/drivers/dri/i965/brw_state_cache.c      |   10 ++++------
 src/mesa/drivers/dri/i965/brw_wm_sampler_state.c |    2 +-
 src/mesa/drivers/dri/i965/gen6_scissor_state.c   |    3 +--
 src/mesa/drivers/dri/i965/gen6_viewport_state.c  |    9 +++------
 7 files changed, 12 insertions(+), 22 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c
index 6d9c039..2b5efdd 100644
--- a/src/mesa/drivers/dri/i965/brw_cc.c
+++ b/src/mesa/drivers/dri/i965/brw_cc.c
@@ -55,8 +55,7 @@ brw_update_cc_vp(struct brw_context *brw)
    }
 
    drm_intel_bo_unreference(brw->cc.vp_bo);
-   brw->cc.vp_bo = brw_cache_data(&brw->cache, BRW_CC_VP, &ccv, sizeof(ccv),
-				  NULL, 0);
+   brw->cc.vp_bo = brw_cache_data(&brw->cache, BRW_CC_VP, &ccv, sizeof(ccv));
 }
 
 struct brw_cc_unit_key {
diff --git a/src/mesa/drivers/dri/i965/brw_sf_state.c b/src/mesa/drivers/dri/i965/brw_sf_state.c
index a95acb4..e290ca9 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_state.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_state.c
@@ -105,8 +105,7 @@ static void upload_sf_vp(struct brw_context *brw)
    }
 
    drm_intel_bo_unreference(brw->sf.vp_bo);
-   brw->sf.vp_bo = brw_cache_data(&brw->cache, BRW_SF_VP, &sfv, sizeof(sfv),
-				  NULL, 0);
+   brw->sf.vp_bo = brw_cache_data(&brw->cache, BRW_SF_VP, &sfv, sizeof(sfv));
 }
 
 const struct brw_tracked_state brw_sf_vp = {
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index 3e2ec3e..3c30d1f 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -139,9 +139,7 @@ void brw_clear_validated_bos(struct brw_context *brw);
 drm_intel_bo *brw_cache_data(struct brw_cache *cache,
 		       enum brw_cache_id cache_id,
 		       const void *data,
-		       GLuint size,
-		       drm_intel_bo **reloc_bufs,
-		       GLuint nr_reloc_bufs);
+		       GLuint size);
 
 drm_intel_bo *brw_upload_cache(struct brw_cache *cache,
 			       enum brw_cache_id cache_id,
diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c
index d8d577d..b31d849 100644
--- a/src/mesa/drivers/dri/i965/brw_state_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_state_cache.c
@@ -310,9 +310,7 @@ drm_intel_bo *
 brw_cache_data(struct brw_cache *cache,
 	       enum brw_cache_id cache_id,
 	       const void *data,
-	       GLuint data_size,
-	       drm_intel_bo **reloc_bufs,
-	       GLuint nr_reloc_bufs)
+	       GLuint data_size)
 {
    drm_intel_bo *bo;
    struct brw_cache_item *item, lookup;
@@ -321,8 +319,8 @@ brw_cache_data(struct brw_cache *cache,
    lookup.cache_id = cache_id;
    lookup.key = data;
    lookup.key_size = data_size;
-   lookup.reloc_bufs = reloc_bufs;
-   lookup.nr_reloc_bufs = nr_reloc_bufs;
+   lookup.reloc_bufs = NULL;
+   lookup.nr_reloc_bufs = 0;
    hash = hash_key(&lookup);
    lookup.hash = hash;
 
@@ -335,7 +333,7 @@ brw_cache_data(struct brw_cache *cache,
 
    bo = brw_upload_cache(cache, cache_id,
 			 data, data_size,
-			 reloc_bufs, nr_reloc_bufs,
+			 NULL, 0,
 			 data, data_size);
 
    return bo;
diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
index 9fbabdc..1fc802c 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -74,7 +74,7 @@ static drm_intel_bo *upload_default_color( struct brw_context *brw,
    COPY_4V(sdc.color, color); 
    
    return brw_cache_data(&brw->cache, BRW_SAMPLER_DEFAULT_COLOR,
-			 &sdc, sizeof(sdc), NULL, 0);
+			 &sdc, sizeof(sdc));
 }
 
 
diff --git a/src/mesa/drivers/dri/i965/gen6_scissor_state.c b/src/mesa/drivers/dri/i965/gen6_scissor_state.c
index 2e21e5f..34a9dc2 100644
--- a/src/mesa/drivers/dri/i965/gen6_scissor_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_scissor_state.c
@@ -63,8 +63,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,
-				     &scissor, sizeof(scissor),
-				     NULL, 0);
+				     &scissor, sizeof(scissor));
 }
 
 const struct brw_tracked_state gen6_scissor_state = {
diff --git a/src/mesa/drivers/dri/i965/gen6_viewport_state.c b/src/mesa/drivers/dri/i965/gen6_viewport_state.c
index 0c2aa42..f8ee26b 100644
--- a/src/mesa/drivers/dri/i965/gen6_viewport_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_viewport_state.c
@@ -51,8 +51,7 @@ prepare_clip_vp(struct brw_context *brw)
 
    drm_intel_bo_unreference(brw->clip.vp_bo);
    brw->clip.vp_bo = brw_cache_data(&brw->cache, BRW_CLIP_VP,
-				    &vp, sizeof(vp),
-				    NULL, 0);
+				    &vp, sizeof(vp));
 }
 
 const struct brw_tracked_state gen6_clip_vp = {
@@ -95,8 +94,7 @@ prepare_sf_vp(struct brw_context *brw)
 
    drm_intel_bo_unreference(brw->sf.vp_bo);
    brw->sf.vp_bo = brw_cache_data(&brw->cache, BRW_SF_VP,
-				  &sfv, sizeof(sfv),
-				  NULL, 0);
+				  &sfv, sizeof(sfv));
 }
 
 const struct brw_tracked_state gen6_sf_vp = {
@@ -125,8 +123,7 @@ prepare_cc_vp(struct brw_context *brw)
    }
 
    drm_intel_bo_unreference(brw->cc.vp_bo);
-   brw->cc.vp_bo = brw_cache_data(&brw->cache, BRW_CC_VP, &ccv, sizeof(ccv),
-				  NULL, 0);
+   brw->cc.vp_bo = brw_cache_data(&brw->cache, BRW_CC_VP, &ccv, sizeof(ccv));
 }
 
 const struct brw_tracked_state gen6_cc_vp = {



More information about the mesa-commit mailing list