layers:Add BINDABLE superclass for image/buffer state
Support for sparse memory binding is virually non-existant in current
validation layers. This is a first step down a long path to improve
sparse binding support.
The BINDABLE superclass is sub-classed by IMAGE & BUFFER state objs
and contains memory binding info in both the single binding and
sparse binding cases.
Bindings are initially encapsulated in the new MEM_BINDING struct.
For single binding cases, things are almost exactly the same as they
have always been. For sparse binding, the various bindings will be
stored in the sparse_bindings set where we initally don't have complete
information on the sparse binding as we only store the MEM_BINDING info
but this is a start.
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp
index a5f6b0c..1e22f82 100644
--- a/layers/descriptor_sets.cpp
+++ b/layers/descriptor_sets.cpp
@@ -386,12 +386,12 @@
*error = error_str.str();
return false;
} else {
- auto mem_entry = getMemObjInfo(device_data_, buffer_node->mem);
+ auto mem_entry = getMemObjInfo(device_data_, buffer_node->binding.mem);
if (!mem_entry) {
std::stringstream error_str;
error_str << "Descriptor in binding #" << binding << " at global descriptor index " << i
- << " uses buffer " << buffer << " that references invalid memory " << buffer_node->mem
- << ".";
+ << " uses buffer " << buffer << " that references invalid memory "
+ << buffer_node->binding.mem << ".";
*error = error_str.str();
return false;
}