PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
6.12k stars 1.22k forks source link

Debug build fails with PXR_ENABLE_VULKAN_SUPPORT=TRUE #2640

Closed keithlostracco closed 1 year ago

keithlostracco commented 1 year ago

Description of Issue

Building with Debug flag set to true will fail when PXR_ENABLE_VULKAN_SUPPORT=TRUE. Even after the recent fix here: [https://github.com/PixarAnimationStudios/OpenUSD/issues/2103]

It turns out that it is caused by hgiVulkan loading the Vulkan library file shaderc_combined.lib when it should be loading in shaderc_combinedd.lib.

This edit to Packages.cmake will fix the issue:

            # Find the extra vulkan libraries we need
            # set(EXTRA_VULKAN_LIBS shaderc_combined)
            if(CMAKE_BUILD_TYPE STREQUAL "Debug")
                set(EXTRA_VULKAN_LIBS shaderc_combinedd)
            else()
                set(EXTRA_VULKAN_LIBS shaderc_combined)
            endif()

Steps to Reproduce

  1. Build Debug USD with DPXR_ENABLE_VULKAN_SUPPORT=TRUE

System Information (OS, Hardware)

Windows 11, MSVC 143 -VS 17 2022 x64

Package Versions

OpenUSD-23.08

Build Flags

-DPXR_ENABLE_VULKAN_SUPPORT=TRUE, -debug

jesschimein commented 1 year ago

Filed as internal issue #USD-8644