aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-07-01 16:43:59 +1200
committerTobin Ehlis <tobine@google.com>2016-07-01 13:12:02 -0600
commit162ba9770a967eeda30d62410c703907f7ceeab8 (patch)
tree3336d4c8209416ac527e53f2fbf352eef7aab1e7 /layers/core_validation.cpp
parent5ad757707035767fec703345916762e2c97a7bac (diff)
downloadusermoji-162ba9770a967eeda30d62410c703907f7ceeab8.tar.xz
layers: Use backing memory size rather than buffer size in barrier
Fixes #648. Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 636b7007..c205e84d 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -7874,8 +7874,7 @@ static bool ValidateBarriers(const char *funcName, VkCommandBuffer cmdBuffer, ui
auto buffer_node = getBufferNode(dev_data, mem_barrier->buffer);
if (buffer_node) {
- VkDeviceSize buffer_size =
- (buffer_node->createInfo.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO) ? buffer_node->createInfo.size : 0;
+ auto buffer_size = buffer_node->memSize;
if (mem_barrier->offset >= buffer_size) {
skip_call |= log_msg(
dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__,