Skip to content

Commit

Permalink
layer: Fix KHR GPDP2 dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
aqnuep authored and christophe-lunarg committed Aug 16, 2023
1 parent 8ec34d9 commit 6c77831
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions scripts/gen_profiles_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,11 @@ class JsonLoader {
void LoadQueueFamilyProperties(VkInstance instance, VkPhysicalDevice pd, PhysicalDeviceData *pdd) {
const auto dt = instance_dispatch_table(instance);
uint32_t count = 0;
dt->GetPhysicalDeviceQueueFamilyProperties2KHR(pd, &count, nullptr);
if (pdd->GetEffectiveVersion() >= VK_API_VERSION_1_1) {
dt->GetPhysicalDeviceQueueFamilyProperties2(pd, &count, nullptr);
} else {
dt->GetPhysicalDeviceQueueFamilyProperties2KHR(pd, &count, nullptr);
}
if (count > 0) {
pdd->device_queue_family_properties_.resize(count);
std::vector<void *> pNext(count);
Expand Down Expand Up @@ -2363,7 +2367,11 @@ class JsonLoader {
pdd->device_queue_family_properties_[i].properties_2.pNext = pNext[i];
props[i] = pdd->device_queue_family_properties_[i].properties_2;
}
dt->GetPhysicalDeviceQueueFamilyProperties2KHR(pd, &count, props.data());
if (pdd->GetEffectiveVersion() >= VK_API_VERSION_1_1) {
dt->GetPhysicalDeviceQueueFamilyProperties2(pd, &count, props.data());
} else {
dt->GetPhysicalDeviceQueueFamilyProperties2KHR(pd, &count, props.data());
}
for (uint32_t i = 0; i < count; ++i) {
pdd->device_queue_family_properties_[i].properties_2 = props[i];
}
Expand Down Expand Up @@ -2548,7 +2556,7 @@ class JsonLoader {
'''

ENUMERATE_PHYSICAL_DEVICES_MIDDLE = '''
if (VK_API_VERSION_MINOR(pdd.GetEffectiveVersion())) {
if (pdd.GetEffectiveVersion() >= VK_API_VERSION_1_1) {
dt->GetPhysicalDeviceProperties2(physical_device, &property_chain);
if (layer_settings->simulate.default_feature_values == DEFAULT_FEATURE_VALUES_DEVICE) {
dt->GetPhysicalDeviceFeatures2(physical_device, &feature_chain);
Expand Down

0 comments on commit 6c77831

Please sign in to comment.