Skip to content

Commit

Permalink
fix issues according to review
Browse files Browse the repository at this point in the history
  • Loading branch information
crescentyue74 committed Jan 9, 2024
1 parent c562276 commit c11eda4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pxr/imaging/hgiVulkan/instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ HgiVulkanInstance::HgiVulkanInstance()
TF_VERIFY(result == VK_SUCCESS);

for (size_t i = 0u; i < numExtensions; ++i) {
std::string extensionName = availableExtensions[i].extensionName;
if (extensionName == VK_EXT_DEBUG_UTILS_EXTENSION_NAME) {
if (strcmp(availableExtensions[i].extensionName, VK_EXT_DEBUG_UTILS_EXTENSION_NAME) == 0) {
extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
}
}
Expand All @@ -100,13 +99,14 @@ HgiVulkanInstance::HgiVulkanInstance()
TF_VERIFY(result == VK_SUCCESS);

for (size_t i = 0u; i < numInstanceLayers; ++i) {
std::string layerName = instanceLayerProps[i].layerName;
std::string layerDesc = instanceLayerProps[i].description;
if (layerName == "VK_LAYER_KHRONOS_validation") {
if (strcmp(instanceLayerProps[i].layerName, "VK_LAYER_KHRONOS_validation") == 0) {
instanceLayerList.push_back("VK_LAYER_KHRONOS_validation");
}
}

free(availableExtensions);
free(instanceLayerProps);

createInfo.ppEnabledLayerNames = instanceLayerList.data();
createInfo.enabledLayerCount = (uint32_t)instanceLayerList.size();
}
Expand Down

0 comments on commit c11eda4

Please sign in to comment.