anv/cmd_buffer: Take bo_offset into account in fast clear state addresses
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 11 Nov 2017 19:52:41 +0000 (11:52 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 17 Nov 2017 19:32:21 +0000 (11:32 -0800)
Otherwise, if the image is not bound to the start of the buffer, we're
going to be reading and writing its fast clear state in the wrong spot.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable@lists.freedesktop.org
src/intel/vulkan/genX_cmd_buffer.c

index 53d8d6604355a87c62786d9450f38654e2da8c89..da4691121b795f1eb385c653f55d958a12f99981 100644 (file)
@@ -461,7 +461,7 @@ get_fast_clear_state_address(const struct anv_device *device,
 
    return (struct anv_address) {
       .bo = image->planes[plane].bo,
-      .offset = offset,
+      .offset = image->planes[plane].bo_offset + offset,
    };
 }