summaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-09-28 07:12:28 -0600
committerTobin Ehlis <tobine@google.com>2016-09-28 17:41:14 -0600
commit77b6217754b9c167b08cb151e70b41a948e36277 (patch)
treeaaa72aef23f941c78643a4e4f1a130ea5a0e4407 /layers/core_validation.cpp
parent38e26abbaa884eb48bfec4ddb4e0ae2c90634e06 (diff)
layers: Add binding between cmd buffer and bufferView
For a texel descriptor update, add binding between bufferView and the command buffer as well as between underlying buffer and command buffer.
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index bf6d957e..1cc6887f 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -621,6 +621,19 @@ void AddCommandBufferBindingBuffer(const layer_data *dev_data, GLOBAL_CB_NODE *c
buff_node->cb_bindings.insert(cb_node);
}
+// Create binding link between given buffer view node and its buffer with command buffer node
+void AddCommandBufferBindingBufferView(const layer_data *dev_data, GLOBAL_CB_NODE *cb_node, BUFFER_VIEW_STATE *view_state) {
+ // First add bindings for bufferView
+ view_state->cb_bindings.insert(cb_node);
+ cb_node->object_bindings.insert(
+ {reinterpret_cast<uint64_t &>(view_state->buffer_view), VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT});
+ auto buffer_node = getBufferNode(dev_data, view_state->create_info.buffer);
+ // Add bindings for buffer within bufferView
+ if (buffer_node) {
+ AddCommandBufferBindingBuffer(dev_data, cb_node, buffer_node);
+ }
+}
+
// For every mem obj bound to particular CB, free bindings related to that CB
static void clear_cmd_buf_and_mem_references(layer_data *dev_data, GLOBAL_CB_NODE *pCBNode) {
if (pCBNode) {