diff --git a/CMakeLists.txt b/CMakeLists.txt index c9c484cf..02af441f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,9 +87,8 @@ set(BUILD_SHARED_LIBS OFF CACHE BOOL "") if (TRUE) set(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/3rdparty/zlib ${CMAKE_BINARY_DIR}/3rdparty/zlib) - message("CMAKE_BINARY_DIR = ${CMAKE_BINARY_DIR}") + message("CMAKE_BINARY_DIR = ${CMAKE_BINARY_DIR}") message("CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}") - endif() @@ -112,21 +111,25 @@ add_compile_definitions(HAVE_LIMITS_H) SET(CMAKE_USE_LIBSSH2 0) SET(CPR_BUILD_TESTS 0) SET(CURL_ZLIB OFF CACHE STRING "" FORCE) # disable this lib to download the zlib as external project -FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git GIT_TAG 2553fc41450301cd09a9271c8d2c3e0cf3546b73) # the commit hash for 1.8.3 - -FetchContent_MakeAvailable(cpr) -#FetchContent_GetProperties(cpr) -#message("cpr_POPULATED = ${cpr_POPULATED}") -#if(NOT cpr_POPULATED) - # Fetch the content using previously declared details - #FetchContent_Populate(cpr) - #message("cpr_BINARY_DIR = ${cpr_BINARY_DIR}") - #message("cpr_SOURCE_DIR = ${cpr_SOURCE_DIR}") - # Bring the populated content into the build - #set(BUILD_SHARED_LIBS ON CACHE BOOL "") - #add_subdirectory(${cpr_SOURCE_DIR} ${cpr_BINARY_DIR} EXCLUDE_FROM_ALL) - #set(BUILD_SHARED_LIBS OFF CACHE BOOL "") -#endif() +FetchContent_Declare(cpr + GIT_REPOSITORY https://github.com/libcpr/cpr.git + GIT_TAG 2553fc41450301cd09a9271c8d2c3e0cf3546b73 # the commit hash for 1.8.3 + EXCLUDE_FROM_ALL +) + +#FetchContent_MakeAvailable(cpr) +FetchContent_GetProperties(cpr) +message("cpr_POPULATED = ${cpr_POPULATED}") +if(NOT cpr_POPULATED) +# Fetch the content using previously declared details + FetchContent_Populate(cpr) + message("cpr_BINARY_DIR = ${cpr_BINARY_DIR}") + message("cpr_SOURCE_DIR = ${cpr_SOURCE_DIR}") +# Bring the populated content into the build + set(BUILD_SHARED_LIBS ON CACHE BOOL "") + add_subdirectory(${cpr_SOURCE_DIR} ${cpr_BINARY_DIR} EXCLUDE_FROM_ALL) + set(BUILD_SHARED_LIBS OFF CACHE BOOL "") +endif() #StormLib #add_subdirectory(3rdparty/stormlib) @@ -144,6 +147,7 @@ if (WIN32) endif() set(CASC_BUILD_STATIC_LIB 1) + set(CASC_BUILD_STATIC_LIB ON CACHE BOOL "Set static lib from main project") set(CASC_BUILD_SHARED_LIB true CACHE BOOL "Turn off shared lib ") add_subdirectory(3rdparty/casclib EXCLUDE_FROM_ALL) @@ -428,7 +432,12 @@ INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION bin COMPONENT Lib if( MINGW ) message( STATUS " Installing system-libraries: MinGW DLLs." ) get_filename_component( Mingw_Path ${CMAKE_CXX_COMPILER} PATH ) - set( CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${Mingw_Path}/libgcc_s_seh-1.dll ${Mingw_Path}/libstdc++-6.dll ${Mingw_Path}/libwinpthread-1.dll) + set( CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} + ${Mingw_Path}/libgcc_s_seh-1.dll + ${Mingw_Path}/libstdc++-6.dll + ${Mingw_Path}/libwinpthread-1.dll + ${Mingw_Path}/zlib1.dll + ) endif( MINGW ) include( InstallRequiredSystemLibraries ) diff --git a/src/main.cpp b/src/main.cpp index e354192d..f652a8c0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -355,12 +355,12 @@ int main(int argc, char *argv[]) { #endif // std::string rendererName = "ogl2"; - std::string rendererName = "ogl3"; -// std::string rendererName = "vulkan"; +// std::string rendererName = "ogl3"; + std::string rendererName = "vulkan"; - if (argc > 1 && std::string(argv[1]) == "-vulkan") { - rendererName = "vulkan"; - } +// if (argc > 1 && std::string(argv[1]) == "-vulkan") { +// rendererName = "vulkan"; +// } //FOR OGL diff --git a/wowViewerLib/CMakeLists.txt b/wowViewerLib/CMakeLists.txt index 872d19a2..b15bb00c 100644 --- a/wowViewerLib/CMakeLists.txt +++ b/wowViewerLib/CMakeLists.txt @@ -134,7 +134,7 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/3rdparty/mathfu EXCLUDE_FROM_ALL) if (LINK_TRACY) option( TRACY_ENABLE "" ON) option( TRACY_ON_DEMAND "" ON) - add_subdirectory (${PROJECT_SOURCE_DIR}/3rdparty/tracy) + add_subdirectory (${PROJECT_SOURCE_DIR}/3rdparty/tracy EXCLUDE_FROM_ALL) add_definitions(-DTRACY_ENABLE) set(TRACY_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/3rdparty/tracy/public/tracy") diff --git a/wowViewerLib/shaders/CMakeLists.txt b/wowViewerLib/shaders/CMakeLists.txt index cf8286c4..cea7f426 100644 --- a/wowViewerLib/shaders/CMakeLists.txt +++ b/wowViewerLib/shaders/CMakeLists.txt @@ -258,11 +258,11 @@ if (NOT EMSCRIPTEN) endif() if(LINK_VULKAN) if(SPIRV_OPT_APP) - install(FILES ${SPIRV_BINARY_FILES_OPT} + install(DIRECTORY ${CMAKE_BINARY_DIR}/spirv/ DESTINATION ${CMAKE_INSTALL_BINDIR}/spirv ) else() - install(FILES ${SPIRV_BINARY_FILES_NON_OPT} + install(DIRECTORY ${CMAKE_BINARY_DIR}/spriv_raw/ DESTINATION ${CMAKE_INSTALL_BINDIR}/spirv ) endif() diff --git a/wowViewerLib/shaders/src/spirv/dumpShaderFields.h b/wowViewerLib/shaders/src/spirv/dumpShaderFields.h index 0586955a..d156ad69 100644 --- a/wowViewerLib/shaders/src/spirv/dumpShaderFields.h +++ b/wowViewerLib/shaders/src/spirv/dumpShaderFields.h @@ -72,8 +72,8 @@ struct bindingAmountData { struct shaderMetaData { ShaderStage stage; - std::vector uboBindings; - std::vector ssboBindingData; + std::vector m_uboBindings; + std::vector m_ssboBindingData; std::array uboBindingAmountsPerSet; std::vector imageBindings; @@ -338,7 +338,7 @@ void dumpShaderUniformOffsets(const std::string &basePath, const std::vector= 0) { metaInfo.uboBindingAmountsPerSet[set].start = @@ -383,7 +383,7 @@ void dumpShaderUniformOffsets(const std::string &basePath, const std::vector= 0) { // metaInfo.uboBindingAmountsPerSet[set].start = @@ -499,7 +499,7 @@ void dumpShaderUniformOffsets(const std::string &basePath, const std::vectorsecond.stage) << "," << std::endl; //Dump UBO Bindings per shader std::cout << " {\n"; - for (auto subIt = it->second.uboBindings.begin(); subIt != it->second.uboBindings.end(); subIt++) { + for (auto subIt = it->second.m_uboBindings.begin(); subIt != it->second.m_uboBindings.end(); subIt++) { std::cout << " {" << subIt->set << "," << subIt->binding << "," << subIt->size << "}," << std::endl; } std::cout << " },\n"; @@ -520,7 +520,7 @@ void dumpShaderUniformOffsets(const std::string &basePath, const std::vectorsecond.ssboBindingData.begin(); subIt != it->second.ssboBindingData.end(); subIt++) { + for (auto subIt = it->second.m_ssboBindingData.begin(); subIt != it->second.m_ssboBindingData.end(); subIt++) { std::cout << " {" << subIt->set << "," << subIt->binding << "," << subIt->size << "}," << std::endl; } std::cout << " },\n"; diff --git a/wowViewerLib/src/engine/objects/adt/adtObject.cpp b/wowViewerLib/src/engine/objects/adt/adtObject.cpp index 9e304a84..72150492 100644 --- a/wowViewerLib/src/engine/objects/adt/adtObject.cpp +++ b/wowViewerLib/src/engine/objects/adt/adtObject.cpp @@ -4,6 +4,7 @@ #include #include +#include #include "adtObject.h" #include #include "../../algorithms/mathHelper.h" @@ -562,7 +563,7 @@ void AdtObject::loadAlphaTextures() { _alpha[0] = _mm_load_si128(alpha[0]++); //a_1 a_2 a_3 a_4 a_5 a_6 a_7 a_8 a_9 a_10 a_11 a_12 a_13 a_14 a_15 a_16 _alpha[1] = _mm_load_si128(alpha[1]++); //b_1 b_2 b_3 b_4 b_5 b_6 b_7 b_8 b_9 b_10 b_11 b_12 b_13 b_14 b_15 b_16 _alpha[2] = _mm_load_si128(alpha[2]++); //c_1 c_2 c_3 c_4 c_5 c_6 c_7 c_8 c_9 c_10 c_11 c_12 c_13 c_14 c_15 c_16 - _alpha[3]= _mm_load_si128(alpha[3]++); //d_1 d_2 d_3 d_4 d_5 d_6 d_7 d_8 d_9 d_10 d_11 d_12 d_13 d_14 d_15 d_16 + _alpha[3] = _mm_load_si128(alpha[3]++); //d_1 d_2 d_3 d_4 d_5 d_6 d_7 d_8 d_9 d_10 d_11 d_12 d_13 d_14 d_15 d_16 if (chunkMcalRuntime.uncompressedIndex) { _alpha[chunkMcalRuntime.uncompressedIndex] = @@ -586,8 +587,6 @@ void AdtObject::loadAlphaTextures() { __m128i a_b_c_d_high_low = _mm_unpacklo_epi16(a_b_high, c_d_high);//a_8 b_8 c_8 d_8 a_9 b_9 c_9 d_9... __m128i a_b_c_d_high_high = _mm_unpackhi_epi16(a_b_high, c_d_high);//a_11 b_11 c_11 d_11 a_12 b_12 c_12 d_12... - - _mm_store_si128(texturePtr++, a_b_c_d_low_low); _mm_store_si128(texturePtr++, a_b_c_d_low_high); _mm_store_si128(texturePtr++, a_b_c_d_high_low); diff --git a/wowViewerLib/src/gapi/vulkan/shaders/GShaderPermutationVLK.cpp b/wowViewerLib/src/gapi/vulkan/shaders/GShaderPermutationVLK.cpp index 1c3bca7d..32e51224 100644 --- a/wowViewerLib/src/gapi/vulkan/shaders/GShaderPermutationVLK.cpp +++ b/wowViewerLib/src/gapi/vulkan/shaders/GShaderPermutationVLK.cpp @@ -117,10 +117,12 @@ void GShaderPermutationVLK::createShaderLayout() { auto it = setLayout.uboSizesPerBinding.find(uboBinding.binding); if (it != std::end(setLayout.uboSizesPerBinding)) { if (it->second != uboBinding.size) { - std::cerr << "UBO sizes mismatch for set = " << uboBinding.set - << " binding = " << uboBinding.binding - << " between " << m_shaderNameVert << " and " << m_shaderNameFrag - << std::endl; + +// std::cerr << "UBO sizes mismatch for set = " << uboBinding.set +// << " binding = " << uboBinding.binding +// << " between " << m_shaderNameVert << " and " << m_shaderNameFrag +// << std::endl; + makeMax(it->second, uboBinding.size); } } else { setLayout.uboSizesPerBinding[uboBinding.binding] = uboBinding.size;