From 0d0e36553c375ee8bfca3c6b11e4abdaad7205d5 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Tue, 11 Oct 2016 14:26:49 -0600 Subject: 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. --- layers/descriptor_sets.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'layers/descriptor_sets.cpp') diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index a5f6b0cc..1e22f82c 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -386,12 +386,12 @@ bool cvdescriptorset::DescriptorSet::ValidateDrawState(const std::mapmem); + 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; } -- cgit v1.2.3