Mesa (master): turnip: Don't bother clamping VB size.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 4 20:04:32 UTC 2020
Module: Mesa
Branch: master
Commit: 5c9728d960714b1c5eb4806a80157ce95992fcfe
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c9728d960714b1c5eb4806a80157ce95992fcfe
Author: Eric Anholt <eric at anholt.net>
Date: Thu Jun 4 10:11:44 2020 -0700
turnip: Don't bother clamping VB size.
>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 | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c
index 7c76a08b4ba..a67a5838264 100644
--- a/src/freedreno/vulkan/tu_cmd_buffer.c
+++ b/src/freedreno/vulkan/tu_cmd_buffer.c
@@ -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));
}
More information about the mesa-commit
mailing list