Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions layers/core_checks/cc_external_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,19 @@ bool CoreChecks::PreCallValidateImportSemaphoreFdKHR(VkDevice device, const VkIm
}
}

if (pImportSemaphoreFdInfo->handleType == VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT) {
if (!enabled_features.externalSemaphoreDrmSyncobj) {
skip |= LogError("VUID-VkImportSemaphoreFdInfoKHR-handleType-XXXXX", device,
info_loc.dot(Field::handleType),
"is VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT, but externalSemaphoreDrmSyncobj feature was not enabled.");
}
if (sem_state->type != VK_SEMAPHORE_TYPE_TIMELINE) {
skip |= LogError("VUID-VkImportSemaphoreFdInfoKHR-handleType-XXXXX", device,
info_loc.dot(Field::handleType),
"semaphoreType is %s.", string_VkSemaphoreType(sem_state->type));
}
}

return skip;
}

Expand Down
15 changes: 15 additions & 0 deletions layers/core_checks/cc_synchronization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,11 @@ bool CoreChecks::PreCallValidateCreateSemaphore(VkDevice device, const VkSemapho
bool skip = false;
auto sem_type_create_info = vku::FindStructInPNextChain<VkSemaphoreTypeCreateInfo>(pCreateInfo->pNext);
const Location create_info_loc = error_obj.location.dot(Field::pCreateInfo);
auto semaphoreType = VK_SEMAPHORE_TYPE_BINARY;

if (sem_type_create_info) {
semaphoreType = sem_type_create_info->semaphoreType;

if (sem_type_create_info->semaphoreType == VK_SEMAPHORE_TYPE_TIMELINE && !enabled_features.timelineSemaphore) {
skip |= LogError("VUID-VkSemaphoreTypeCreateInfo-timelineSemaphore-03252", device,
create_info_loc.dot(Field::semaphoreType),
Expand Down Expand Up @@ -714,6 +717,18 @@ bool CoreChecks::PreCallValidateCreateSemaphore(VkDevice device, const VkSemapho
string_VkExternalSemaphoreHandleTypeFlags(sem_export_info->handleTypes).c_str(),
string_VkExternalSemaphoreHandleTypeFlags(external_properties.compatibleHandleTypes).c_str());
}
if ((sem_export_info->handleTypes & VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT) != 0) {
if (!enabled_features.externalSemaphoreDrmSyncobj) {
skip |= LogError("VUID-VkExportSemaphoreCreateInfo-handleTypes-XXXXX", device,
create_info_loc.pNext(Struct::VkExportSemaphoreCreateInfo, Field::handleTypes),
"contains VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_DRM_SYNCOBJ_BIT_EXT, but externalSemaphoreDrmSyncobj feature was not enabled.");
}
if (semaphoreType != VK_SEMAPHORE_TYPE_TIMELINE) {
skip |= LogError("VUID-VkExportSemaphoreCreateInfo-handleTypes-XXXXX", device,
create_info_loc.pNext(Struct::VkExportSemaphoreCreateInfo, Field::handleTypes),
"semaphoreType is %s.", string_VkSemaphoreType(semaphoreType));
}
}
}

return skip;
Expand Down
4 changes: 2 additions & 2 deletions layers/vulkan/generated/command_validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "command_validation.h"
#include "containers/custom_containers.h"

extern const char *kVUIDUndefined;
extern const char* kVUIDUndefined;

using Func = vvl::Func;
// clang-format off
Expand Down Expand Up @@ -2609,7 +2609,7 @@ return kCommandValidationTable;
}
// clang-format on

const CommandValidationInfo &GetCommandValidationInfo(vvl::Func command) {
const CommandValidationInfo& GetCommandValidationInfo(vvl::Func command) {
auto info_it = GetCommandValidationTable().find(command);
assert(info_it != GetCommandValidationTable().end());
return info_it->second;
Expand Down
1,012 changes: 509 additions & 503 deletions layers/vulkan/generated/device_features.cpp

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion layers/vulkan/generated/device_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,8 @@ struct DeviceFeatures {
bool externalMemoryRDMA;
// VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX
bool screenBufferImport;
// VkPhysicalDeviceExternalSemaphoreDrmSyncobjFeaturesEXT
bool externalSemaphoreDrmSyncobj;
// VkPhysicalDeviceFaultFeaturesEXT
bool deviceFault;
// VkPhysicalDeviceFaultFeaturesEXT
Expand Down Expand Up @@ -1092,6 +1094,6 @@ struct DeviceFeatures {
bool zeroInitializeDeviceMemory;
};

void GetEnabledDeviceFeatures(const VkDeviceCreateInfo *pCreateInfo, DeviceFeatures *features, const APIVersion &api_version);
void GetEnabledDeviceFeatures(const VkDeviceCreateInfo* pCreateInfo, DeviceFeatures* features, const APIVersion& api_version);

// NOLINTEND
Loading
Loading