turnip: use buffer size instead of bo size for VFD_FETCH_SIZE
authorJonathan Marek <jonathan@marek.ca>
Wed, 8 Apr 2020 23:43:24 +0000 (19:43 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 9 Apr 2020 02:05:52 +0000 (02:05 +0000)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4224>

src/freedreno/vulkan/tu_cmd_buffer.c

index e629c941ef23098e4566d23e0313030a556b8d64..1a01e67267b680e495bc8d7bca866af84505c01f 100644 (file)
@@ -3443,7 +3443,7 @@ tu6_bind_draw_states(struct tu_cmd_buffer *cmd,
          const VkDeviceSize offset = buf->bo_offset +
                                      cmd->state.vb.offsets[binding];
          const VkDeviceSize size =
-            offset < buf->bo->size ? buf->bo->size - offset : 0;
+            offset < buf->size ? buf->size - offset : 0;
 
          tu_cs_emit_regs(cs,
                          A6XX_VFD_FETCH_BASE(i, .bo = buf->bo, .bo_offset = offset),