intel/blorp: Expand blorp_address::offset to be 64 bits.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 21 Apr 2018 07:06:29 +0000 (00:06 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 8 Dec 2018 00:35:51 +0000 (16:35 -0800)
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@jlekstrand.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/intel/blorp/blorp.h
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h

index ee343a4a6bbcf66121b46551afe29f2aa326c5e7..1e22712602d0bfe02f111a085fc994a519a7714d 100644 (file)
@@ -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;
 };
 
index 4daa0e2add1380cae252098d67c8d262af7bbbbd..b067a174056c143a6a3e60cd4fc53dab73bcfa37 100644 (file)
@@ -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;
index 8e50aabb3b442346d6cf52df39532884e141b55b..a679ddf3e48f4364654f20742ab8ed75cbb44132 100644 (file)
@@ -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);
 
index b0333655ad556e933d864b6f9f0ab2f1f48490a8..21beeded92ae5bd7334f2c5fa6b5e9ef089328d9 100644 (file)
@@ -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