anv: simplify internal address offset
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 25 Oct 2018 17:35:32 +0000 (18:35 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 13 Nov 2018 18:56:10 +0000 (18:56 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_private.h

index c791c5682348425534c4a7156891b362911abdbb..0ce81cf086a2f2af257d1a196d12efdc320daf2b 100644 (file)
@@ -2864,8 +2864,7 @@ anv_image_get_fast_clear_type_addr(const struct anv_device *device,
    const unsigned clear_color_state_size = device->info.gen >= 10 ?
       device->isl_dev.ss.clear_color_state_size :
       device->isl_dev.ss.clear_value_size;
-   addr.offset += clear_color_state_size;
-   return addr;
+   return anv_address_add(addr, clear_color_state_size);
 }
 
 static inline struct anv_address