aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 2ce055d2..50030c94 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -7068,6 +7068,12 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers(VkCommandBuffer commandBuffer, u
return ValidateBufferMemoryIsValid(dev_data, buffer_state, "vkCmdBindVertexBuffers()");
};
cb_node->validate_functions.push_back(function);
+ if (pOffsets[i] >= buffer_state->createInfo.size) {
+ skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT,
+ reinterpret_cast<uint64_t &>(buffer_state->buffer), __LINE__, VALIDATION_ERROR_01417, "DS",
+ "vkCmdBindVertexBuffers() offset (0x%" PRIxLEAST64 ") is beyond the end of the buffer. %s",
+ pOffsets[i], validation_error_map[VALIDATION_ERROR_01417]);
+ }
}
UpdateCmdBufferLastCmd(cb_node, CMD_BINDVERTEXBUFFER);
updateResourceTracking(cb_node, firstBinding, bindingCount, pBuffers);