Skip to content

Commit

Permalink
build: Update to header 1.3.273
Browse files Browse the repository at this point in the history
- Update known-good
- Generate source
- Fix up some promoted symbol names from VK_KHR_vertex_attribute_divisor and
  VK_KHR_calibrated_timestamps
- Update VUIDs for promoted extensions
  • Loading branch information
mikes-lunarg committed Dec 8, 2023
1 parent 6f95464 commit 335f5cb
Show file tree
Hide file tree
Showing 36 changed files with 1,056 additions and 700 deletions.
2 changes: 1 addition & 1 deletion layers/VkLayer_khronos_validation.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "VK_LAYER_KHRONOS_validation",
"type": "GLOBAL",
"library_path": "@JSON_LIBRARY_PATH@",
"api_version": "1.3.272",
"api_version": "1.3.273",
"implementation_version": "1",
"description": "Khronos Validation Layer",
"introduction": "The main, comprehensive Khronos validation layer.\n\nVulkan is an Explicit API, enabling direct control over how GPUs actually work. By design, minimal error checking is done inside a Vulkan driver. Applications have full control and responsibility for correct operation. Any errors in how Vulkan is used can result in a crash. \n\nThe Khronos Valiation Layer can be enabled to assist development by enabling developers to verify their applications correctly use the Vulkan API.",
Expand Down
4 changes: 2 additions & 2 deletions layers/core_checks/cc_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,12 +818,12 @@ bool CoreChecks::PreCallValidateGetCalibratedTimestampsEXT(VkDevice device, uint
skip |= LogError("VUID-vkGetCalibratedTimestampsEXT-timeDomain-09246", device,
error_obj.location.dot(Field::pTimestampInfos, i).dot(Field::timeDomain),
"and pTimestampInfos[%" PRIu32 "].timeDomain are both %s.", it->second,
string_VkTimeDomainEXT(time_domain));
string_VkTimeDomainKHR(time_domain));
break; // no reason to check after finding 1 duplicate
} else if (!IsValueIn(time_domain, valid_time_domains)) {
skip |= LogError("VUID-VkCalibratedTimestampInfoEXT-timeDomain-02354", device,
error_obj.location.dot(Field::pTimestampInfos, i).dot(Field::timeDomain), "is %s.",
string_VkTimeDomainEXT(time_domain));
string_VkTimeDomainKHR(time_domain));
}
time_domain_map[time_domain] = i;
}
Expand Down
12 changes: 6 additions & 6 deletions layers/core_checks/cc_pipeline_graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3594,26 +3594,26 @@ bool CoreChecks::ValidatePipelineVertexDivisors(const safe_VkPipelineVertexInput
}
const VkPhysicalDeviceLimits *device_limits = &phys_dev_props.limits;
for (uint32_t j = 0; j < divisor_state_info->vertexBindingDivisorCount; j++) {
const Location divisor_loc = loc.pNext(Struct::VkVertexInputBindingDivisorDescriptionEXT, Field::pVertexBindingDivisors, j);
const Location divisor_loc = loc.pNext(Struct::VkVertexInputBindingDivisorDescriptionKHR, Field::pVertexBindingDivisors, j);
const auto *vibdd = &(divisor_state_info->pVertexBindingDivisors[j]);
if (vibdd->binding >= device_limits->maxVertexInputBindings) {
skip |= LogError("VUID-VkVertexInputBindingDivisorDescriptionEXT-binding-01869", device,
skip |= LogError("VUID-VkVertexInputBindingDivisorDescriptionKHR-binding-01869", device,
divisor_loc.dot(Field::binding), "(%" PRIu32 ") exceeds device maxVertexInputBindings (%" PRIu32 ").",
vibdd->binding, device_limits->maxVertexInputBindings);
}
if (vibdd->divisor > phys_dev_ext_props.vtx_attrib_divisor_props.maxVertexAttribDivisor) {
skip |= LogError("VUID-VkVertexInputBindingDivisorDescriptionEXT-divisor-01870", device,
skip |= LogError("VUID-VkVertexInputBindingDivisorDescriptionKHR-divisor-01870", device,
divisor_loc.dot(Field::divisor), "(%" PRIu32 ") exceeds device maxVertexAttribDivisor (%" PRIu32 ").",
vibdd->divisor, phys_dev_ext_props.vtx_attrib_divisor_props.maxVertexAttribDivisor);
}
if ((0 == vibdd->divisor) && !enabled_features.vertexAttributeInstanceRateZeroDivisor) {
skip |=
LogError("VUID-VkVertexInputBindingDivisorDescriptionEXT-vertexAttributeInstanceRateZeroDivisor-02228", device,
LogError("VUID-VkVertexInputBindingDivisorDescriptionKHR-vertexAttributeInstanceRateZeroDivisor-02228", device,
divisor_loc.dot(Field::divisor),
"is (%" PRIu32 ") but vertexAttributeInstanceRateZeroDivisor feature was not enabled.", vibdd->divisor);
}
if ((1 != vibdd->divisor) && !enabled_features.vertexAttributeInstanceRateDivisor) {
skip |= LogError("VUID-VkVertexInputBindingDivisorDescriptionEXT-vertexAttributeInstanceRateDivisor-02229", device,
skip |= LogError("VUID-VkVertexInputBindingDivisorDescriptionKHR-vertexAttributeInstanceRateDivisor-02229", device,
divisor_loc.dot(Field::divisor),
"is (%" PRIu32 ") but vertexAttributeInstanceRateDivisor feature was not enabled.", vibdd->divisor);
}
Expand All @@ -3629,7 +3629,7 @@ bool CoreChecks::ValidatePipelineVertexDivisors(const safe_VkPipelineVertexInput
}
if (failed_01871) { // Description not found, or has incorrect inputRate value
skip |=
LogError("VUID-VkVertexInputBindingDivisorDescriptionEXT-inputRate-01871", device, divisor_loc.dot(Field::binding),
LogError("VUID-VkVertexInputBindingDivisorDescriptionKHR-inputRate-01871", device, divisor_loc.dot(Field::binding),
"is %" PRIu32 ", but inputRate is not VK_VERTEX_INPUT_RATE_INSTANCE.", vibdd->binding);
}
}
Expand Down
50 changes: 32 additions & 18 deletions layers/vulkan/generated/best_practices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,34 @@ void BestPractices::PostCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesKH
}
}

void BestPractices::PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice,
uint32_t* pTimeDomainCount,
VkTimeDomainKHR* pTimeDomains,
const RecordObject& record_obj) {
ValidationStateTracker::PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount,
pTimeDomains, record_obj);

if (record_obj.result > VK_SUCCESS) {
LogPositiveSuccessCode(record_obj);
return;
}
if (record_obj.result < VK_SUCCESS) {
LogErrorCode(record_obj);
}
}

void BestPractices::PostCallRecordGetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount,
const VkCalibratedTimestampInfoKHR* pTimestampInfos,
uint64_t* pTimestamps, uint64_t* pMaxDeviation,
const RecordObject& record_obj) {
ValidationStateTracker::PostCallRecordGetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps,
pMaxDeviation, record_obj);

if (record_obj.result < VK_SUCCESS) {
LogErrorCode(record_obj);
}
}

void BestPractices::PostCallRecordCreateDebugReportCallbackEXT(VkInstance instance,
const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
Expand Down Expand Up @@ -2058,30 +2086,16 @@ void BestPractices::PostCallRecordGetMemoryHostPointerPropertiesEXT(VkDevice dev

void BestPractices::PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice,
uint32_t* pTimeDomainCount,
VkTimeDomainEXT* pTimeDomains,
VkTimeDomainKHR* pTimeDomains,
const RecordObject& record_obj) {
ValidationStateTracker::PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsEXT(physicalDevice, pTimeDomainCount,
pTimeDomains, record_obj);

if (record_obj.result > VK_SUCCESS) {
LogPositiveSuccessCode(record_obj);
return;
}
if (record_obj.result < VK_SUCCESS) {
LogErrorCode(record_obj);
}
PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, pTimeDomains, record_obj);
}

void BestPractices::PostCallRecordGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount,
const VkCalibratedTimestampInfoEXT* pTimestampInfos,
const VkCalibratedTimestampInfoKHR* pTimestampInfos,
uint64_t* pTimestamps, uint64_t* pMaxDeviation,
const RecordObject& record_obj) {
ValidationStateTracker::PostCallRecordGetCalibratedTimestampsEXT(device, timestampCount, pTimestampInfos, pTimestamps,
pMaxDeviation, record_obj);

if (record_obj.result < VK_SUCCESS) {
LogErrorCode(record_obj);
}
PostCallRecordGetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation, record_obj);
}

void BestPractices::PostCallRecordInitializePerformanceApiINTEL(VkDevice device,
Expand Down
14 changes: 12 additions & 2 deletions layers/vulkan/generated/best_practices.h
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,14 @@ void PostCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDev
VkCooperativeMatrixPropertiesKHR* pProperties,
const RecordObject& record_obj) override;

void PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount,
VkTimeDomainKHR* pTimeDomains,
const RecordObject& record_obj) override;

void PostCallRecordGetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount,
const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps,
uint64_t* pMaxDeviation, const RecordObject& record_obj) override;

void PostCallRecordCreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback,
const RecordObject& record_obj) override;
Expand Down Expand Up @@ -715,11 +723,11 @@ void PostCallRecordGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternal
const RecordObject& record_obj) override;

void PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount,
VkTimeDomainEXT* pTimeDomains,
VkTimeDomainKHR* pTimeDomains,
const RecordObject& record_obj) override;

void PostCallRecordGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount,
const VkCalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps,
const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps,
uint64_t* pMaxDeviation, const RecordObject& record_obj) override;

void PostCallRecordInitializePerformanceApiINTEL(VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo,
Expand Down Expand Up @@ -1090,6 +1098,8 @@ const vvl::unordered_map<std::string, DeprecationData> deprecated_extensions = {
{"VK_EXT_descriptor_indexing", {kExtPromoted, "VK_VERSION_1_2"}},
{"VK_EXT_shader_viewport_index_layer", {kExtPromoted, "VK_VERSION_1_2"}},
{"VK_EXT_global_priority", {kExtPromoted, "VK_KHR_global_priority"}},
{"VK_EXT_calibrated_timestamps", {kExtPromoted, "VK_KHR_calibrated_timestamps"}},
{"VK_EXT_vertex_attribute_divisor", {kExtPromoted, "VK_KHR_vertex_attribute_divisor"}},
{"VK_EXT_pipeline_creation_feedback", {kExtPromoted, "VK_VERSION_1_3"}},
{"VK_NV_fragment_shader_barycentric", {kExtPromoted, "VK_KHR_fragment_shader_barycentric"}},
{"VK_EXT_scalar_block_layout", {kExtPromoted, "VK_VERSION_1_2"}},
Expand Down
63 changes: 61 additions & 2 deletions layers/vulkan/generated/chassis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9366,6 +9366,63 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixPropertiesKHR(V
return result;
}

VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice,
uint32_t* pTimeDomainCount,
VkTimeDomainKHR* pTimeDomains) {
auto layer_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map);
bool skip = false;
ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceCalibrateableTimeDomainsKHR,
VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice));
for (const ValidationObject* intercept : layer_data->object_dispatch) {
auto lock = intercept->ReadLock();
skip |= intercept->PreCallValidateGetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount,
pTimeDomains, error_obj);
if (skip) return VK_ERROR_VALIDATION_FAILED_EXT;
}
RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceCalibrateableTimeDomainsKHR);
for (ValidationObject* intercept : layer_data->object_dispatch) {
auto lock = intercept->WriteLock();
intercept->PreCallRecordGetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, pTimeDomains,
record_obj);
}
VkResult result = DispatchGetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, pTimeDomains);
record_obj.result = result;
for (ValidationObject* intercept : layer_data->object_dispatch) {
auto lock = intercept->WriteLock();
intercept->PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, pTimeDomains,
record_obj);
}
return result;
}

VKAPI_ATTR VkResult VKAPI_CALL GetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount,
const VkCalibratedTimestampInfoKHR* pTimestampInfos,
uint64_t* pTimestamps, uint64_t* pMaxDeviation) {
auto layer_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map);
bool skip = false;
ErrorObject error_obj(vvl::Func::vkGetCalibratedTimestampsKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice));
for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetCalibratedTimestampsKHR]) {
auto lock = intercept->ReadLock();
skip |= intercept->PreCallValidateGetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps,
pMaxDeviation, error_obj);
if (skip) return VK_ERROR_VALIDATION_FAILED_EXT;
}
RecordObject record_obj(vvl::Func::vkGetCalibratedTimestampsKHR);
for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetCalibratedTimestampsKHR]) {
auto lock = intercept->WriteLock();
intercept->PreCallRecordGetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation,
record_obj);
}
VkResult result = DispatchGetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation);
record_obj.result = result;
for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetCalibratedTimestampsKHR]) {
auto lock = intercept->WriteLock();
intercept->PostCallRecordGetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation,
record_obj);
}
return result;
}

VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance,
const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
Expand Down Expand Up @@ -11565,7 +11622,7 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer

VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice,
uint32_t* pTimeDomainCount,
VkTimeDomainEXT* pTimeDomains) {
VkTimeDomainKHR* pTimeDomains) {
auto layer_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map);
bool skip = false;
ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceCalibrateableTimeDomainsEXT,
Expand Down Expand Up @@ -11593,7 +11650,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPh
}

VKAPI_ATTR VkResult VKAPI_CALL GetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount,
const VkCalibratedTimestampInfoEXT* pTimestampInfos,
const VkCalibratedTimestampInfoKHR* pTimestampInfos,
uint64_t* pTimestamps, uint64_t* pMaxDeviation) {
auto layer_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map);
bool skip = false;
Expand Down Expand Up @@ -17186,6 +17243,8 @@ const vvl::unordered_map<std::string, function_data> name_to_funcptr_map = {
{"vkGetDeviceImageSubresourceLayoutKHR", {kFuncTypeDev, (void*)GetDeviceImageSubresourceLayoutKHR}},
{"vkGetImageSubresourceLayout2KHR", {kFuncTypeDev, (void*)GetImageSubresourceLayout2KHR}},
{"vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceCooperativeMatrixPropertiesKHR}},
{"vkGetPhysicalDeviceCalibrateableTimeDomainsKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceCalibrateableTimeDomainsKHR}},
{"vkGetCalibratedTimestampsKHR", {kFuncTypeDev, (void*)GetCalibratedTimestampsKHR}},
{"vkCreateDebugReportCallbackEXT", {kFuncTypeInst, (void*)CreateDebugReportCallbackEXT}},
{"vkDestroyDebugReportCallbackEXT", {kFuncTypeInst, (void*)DestroyDebugReportCallbackEXT}},
{"vkDebugReportMessageEXT", {kFuncTypeInst, (void*)DebugReportMessageEXT}},
Expand Down
Loading

0 comments on commit 335f5cb

Please sign in to comment.