Mesa (master): intel/blorp: Expand blorp_address::offset to be 64 bits.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Dec 8 00:36:21 UTC 2018


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sat Apr 21 00:06:29 2018 -0700

intel/blorp: Expand blorp_address::offset to be 64 bits.

In the softpin world, surface state base address may be a fixed 64-bit
address (with no associated BO).  It makes sense to store this in the
offset field.  But it needs to be the full size.

We also update the clear color address to be consistently uint64_t
everywhere so we can continue passing intel_miptree_get_clear_color
a pointer to the blorp_address's offset field without type mismatches.

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

---

 src/intel/blorp/blorp.h                          | 2 +-
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 2 +-
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c    | 2 +-
 src/mesa/drivers/dri/i965/intel_mipmap_tree.h    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/intel/blorp/blorp.h b/src/intel/blorp/blorp.h
index ee343a4a6b..1e22712602 100644
--- a/src/intel/blorp/blorp.h
+++ b/src/intel/blorp/blorp.h
@@ -91,8 +91,8 @@ void blorp_batch_finish(struct blorp_batch *batch);
 
 struct blorp_address {
    void *buffer;
+   uint64_t offset;
    unsigned reloc_flags;
-   uint32_t offset;
    uint32_t mocs;
 };
 
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 4daa0e2add..b067a17405 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -156,7 +156,7 @@ brw_emit_surface_state(struct brw_context *brw,
    struct isl_surf *aux_surf = NULL;
    uint64_t aux_offset = 0;
    struct brw_bo *clear_bo = NULL;
-   uint32_t clear_offset = 0;
+   uint64_t clear_offset = 0;
 
    if (aux_usage != ISL_AUX_USAGE_NONE) {
       aux_surf = &mt->aux_buf->surf;
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 8e50aabb3b..a679ddf3e4 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -3865,7 +3865,7 @@ intel_miptree_get_clear_color(const struct gen_device_info *devinfo,
                               const struct intel_mipmap_tree *mt,
                               enum isl_format view_format, bool sampling,
                               struct brw_bo **clear_color_bo,
-                              uint32_t *clear_color_offset)
+                              uint64_t *clear_color_offset)
 {
    assert(mt->aux_buf);
 
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index b0333655ad..21beeded92 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -714,7 +714,7 @@ intel_miptree_get_clear_color(const struct gen_device_info *devinfo,
                               const struct intel_mipmap_tree *mt,
                               enum isl_format view_format, bool sampling,
                               struct brw_bo **clear_color_bo,
-                              uint32_t *clear_color_offset);
+                              uint64_t *clear_color_offset);
 
 
 static inline int




More information about the mesa-commit mailing list