Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autodesk: Feature hgi vulkan unit test #2851

Merged
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
38 changes: 38 additions & 0 deletions pxr/imaging/hdSt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ set(optionalLibs "")
set(optionalIncludeDirs "")
set(optionalPublicClasses "")
set(optionalPrivateClasses "")
set(optionalPrivatehgiUnitTestClasses "")
if (${PXR_ENABLE_MATERIALX_SUPPORT})
list(APPEND optionalLibs
MaterialXGenShader
Expand All @@ -37,6 +38,9 @@ if (PXR_ENABLE_PTEX_SUPPORT)
list(APPEND optionalIncludeDirs ${PTEX_INCLUDE_DIR})
list(APPEND optionalPublicClasses ptexMipmapTextureLoader)
endif()
if (${PXR_ENABLE_VULKAN_SUPPORT})
list(APPEND optionalPrivatehgiUnitTestClasses hgiUnitTestHelper)
endif()

pxr_library(hdSt
LIBRARIES
Expand Down Expand Up @@ -178,6 +182,7 @@ pxr_library(hdSt
volumeShader
volumeShaderKey
${optionalPrivateClasses}
${optionalPrivatehgiUnitTestClasses}

RESOURCE_FILES
plugInfo.json
Expand Down Expand Up @@ -224,6 +229,39 @@ pxr_build_test(testHdStBasicDrawing
)
endif()

if (${PXR_ENABLE_VULKAN_SUPPORT})
pxr_install_test_dir(
SRC testenv/testHdStCommand
DEST testHdStCommand
)

pxr_build_test(testHdStCommand
LIBRARIES
hdSt
hgi

CPPFILES
testenv/testHdStCommand.cpp
)

pxr_register_test(testHdStCommand
#Valid command line options for this unit test are :
# -write <fileaname> // writes render output to disk
# for image based comparison with baseline
COMMAND "${CMAKE_INSTALL_PREFIX}/tests/testHdStCommand -write testHdStCommand_triangle.png"
IMAGE_DIFF_COMPARE
testHdStCommand_triangle.png
FAIL 1
FAIL_PERCENT 0.001
PERCEPTUAL
EXPECTED_RETURN_CODE 0
ENV
HGI_ENABLE_VULKAN=1
HGIVULKAN_DEBUG=1
HGIVULKAN_DEBUG_VERBOSE=1
)
endif()

if (X11_FOUND)
pxr_build_test(testHdStBarAllocationLimit
LIBRARIES
Expand Down
Loading
Loading