Attempted to mess with the shaders test, but it seems too out of date. Disabled.

This commit is contained in:
Dale Glass 2022-06-06 23:17:25 +02:00
parent e23c162d97
commit 0f46e25368
2 changed files with 32 additions and 17 deletions

View file

@ -1,19 +1,32 @@
# This doesn't link properly, and it seems it's built against some older library
# not being in use anymore. At least some of the stuff in the test doesn't seem
# to match anything in the build tree. If built, it fails with:
# [ 91%] Linking CXX executable shaders-ShaderTests
# /usr/bin/ld: CMakeFiles/shaders-ShaderTests.dir/src/ShaderTests.cpp.o: in function `rebuildSource(shader::Dialect, shader::Variant, shader::Source const&)':
# /home/dale/git/vircadia/overte/tests/shaders/src/ShaderTests.cpp:354: undefined reference to `glslang::TShader::TShader(EShLanguage)'
# /usr/bin/ld: /home/dale/git/vircadia/overte/tests/shaders/src/ShaderTests.cpp:358: undefined reference to `glslang::TShader::setStrings(char const* const*, int)'
# /usr/bin/ld: /home/dale/git/vircadia/overte/tests/shaders/src/ShaderTests.cpp:417: undefined reference to `glslang::TShader::~TShader()'
# /usr/bin/ld: /home/dale/git/vircadia/overte/tests/shaders/src/ShaderTests.cpp:417: undefined reference to `glslang::TShader::~TShader()'
# collect2: error: ld returned 1 exit status
#
# So I've disabled the entire thing, but left the code around as a reference in case it can be fixed.
# Declare dependencies # Declare dependencies
macro (setup_testcase_dependencies) #macro (setup_testcase_dependencies)
# link in the shared libraries # # link in the shared libraries
link_hifi_libraries(shared test-utils gpu shaders gl ${PLATFORM_GL_BACKEND}) # link_hifi_libraries(shared test-utils gpu shaders gl ${PLATFORM_GL_BACKEND})
#target_spirv() # #target_spirv()
#
find_package(spirv_cross_core REQUIRED) # find_package(spirv_cross_core REQUIRED)
find_package(spirv_cross_reflect REQUIRED) # find_package(spirv_cross_reflect REQUIRED)
find_package(spirv_cross_glsl REQUIRED) # find_package(spirv_cross_glsl REQUIRED)
target_include_directories(${TARGET_NAME} PRIVATE $<TARGET_PROPERTY:spirv-cross-core,INTERFACE_INCLUDE_DIRECTORIES>) # target_include_directories(${TARGET_NAME} PRIVATE $<TARGET_PROPERTY:spirv-cross-core,INTERFACE_INCLUDE_DIRECTORIES>)
target_include_directories(${TARGET_NAME} PRIVATE $ENV{VULKAN_SDK}/Include) # target_include_directories(${TARGET_NAME} PRIVATE $ENV{VULKAN_SDK}/Include)
#
#
package_libraries_for_deployment() # package_libraries_for_deployment()
endmacro () #endmacro ()
#
setup_hifi_testcase(Gui) #setup_hifi_testcase(Gui)

View file

@ -360,7 +360,9 @@ void rebuildSource(shader::Dialect dialect, shader::Variant variant, const shade
shader.setEnvClient(EShClientVulkan, EShTargetVulkan_1_1); shader.setEnvClient(EShClientVulkan, EShTargetVulkan_1_1);
shader.setEnvTarget(EShTargetSpv, EShTargetSpv_1_3); shader.setEnvTarget(EShTargetSpv, EShTargetSpv_1_3);
bool success = shader.parse(&glslCompilerResources, 450, false, messages); //bool success = shader.parse(&glslCompilerResources, 450, false, messages);
QSKIP("Something wasn't fully implemented here, please fix me!");
bool success = false;
if (!success) { if (!success) {
qWarning() << "Failed to parse shader " << shaderName.c_str(); qWarning() << "Failed to parse shader " << shaderName.c_str();
qWarning() << shader.getInfoLog(); qWarning() << shader.getInfoLog();