turnip: Don't bother clamping VB size.
authorEric Anholt <eric@anholt.net>
Thu, 4 Jun 2020 17:11:44 +0000 (10:11 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 4 Jun 2020 19:42:54 +0000 (19:42 +0000)
From the VK spec: "All elements of pOffsets must be less than the size of
the corresponding element in pBuffers"

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5321>

src/freedreno/vulkan/tu_cmd_buffer.c

index 7c76a08b4ba5a92cddb9d004b13cad89477a9c08..a67a5838264d7db877607a0d4b46cef309fc9d77 100644 (file)
@@ -2675,12 +2675,10 @@ tu6_emit_vertex_buffers(struct tu_cmd_buffer *cmd,
       const struct tu_buffer *buf = cmd->state.vb.buffers[binding];
       const VkDeviceSize offset = buf->bo_offset +
          cmd->state.vb.offsets[binding];
-      const VkDeviceSize size =
-         offset < buf->size ? buf->size - offset : 0;
 
       tu_cs_emit_regs(&cs,
                       A6XX_VFD_FETCH_BASE(i, .bo = buf->bo, .bo_offset = offset),
-                      A6XX_VFD_FETCH_SIZE(i, size));
+                      A6XX_VFD_FETCH_SIZE(i, buf->size - offset));
 
    }