turnip: fix hw binning + render_area offset interaction
authorJonathan Marek <jonathan@marek.ca>
Tue, 25 Feb 2020 14:28:34 +0000 (09:28 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 28 Feb 2020 14:04:20 +0000 (14:04 +0000)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3979>

src/freedreno/vulkan/tu_cmd_buffer.c

index 08d6e943a1f28da721a21d421dcd9555d4079570..5de52bb472187b976239d1bc3f67bb209254dcac 100644 (file)
@@ -180,10 +180,12 @@ tu_tiling_config_update_tile_layout(struct tu_tiling_config *tiling,
    const uint32_t tile_align_h = dev->physical_device->tile_align_h;
    const uint32_t max_tile_width = 1024; /* A6xx */
 
-   tiling->tile0.offset = (VkOffset2D) {
-      .x = tiling->render_area.offset.x & ~(tile_align_w - 1),
-      .y = tiling->render_area.offset.y & ~(tile_align_h - 1),
-   };
+   /* note: don't offset the tiling config by render_area.offset,
+    * because binning pass can't deal with it
+    * this means we might end up with more tiles than necessary,
+    * but load/store/etc are still scissored to the render_area
+    */
+   tiling->tile0.offset = (VkOffset2D) {};
 
    const uint32_t ra_width =
       tiling->render_area.extent.width +