diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..07334249 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "neo/extern/glslang"] + path = neo/extern/glslang + url = https://github.com/KhronosGroup/glslang.git diff --git a/neo/CMakeLists.txt b/neo/CMakeLists.txt index 9450dcc9..14f14ef6 100644 --- a/neo/CMakeLists.txt +++ b/neo/CMakeLists.txt @@ -309,17 +309,21 @@ if(USE_VULKAN) else() # override Glslang build options + + # options required by November 2018 release SET_OPTION(ENABLE_SPVREMAPPER OFF) SET_OPTION(ENABLE_GLSLANG_BINARIES OFF) SET_OPTION(ENABLE_HLSL OFF) SET_OPTION(ENABLE_OPT ON) SET_OPTION(SPIRV_SKIP_EXECUTABLES ON) + + # options required by November 2019 release + #SET_OPTION(ENABLE_PCH OFF) + #SET_OPTION(ENABLE_CTEST OFF) + #SET_OPTION(BUILD_EXTERNAL OFF) + #SET_OPTION(SKIP_GLSLANG_INSTALL ON) - #option(ENABLE_AMD_EXTENSIONS "Enables support of AMD-specific extensions" ON) - #option(ENABLE_NV_EXTENSIONS "Enables support of Nvidia-specific extensions" ON) - #option(ENABLE_OPT "Enables spirv-opt capability if present" ON) - - set(GLSLANG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs/glslang) + set(GLSLANG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/extern/glslang) add_subdirectory(${GLSLANG_DIR}) include_directories(${GLSLANG_DIR}/glslang) diff --git a/neo/astyle-code.bat b/neo/astyle-code.bat index d180dc12..ea40b02a 100644 --- a/neo/astyle-code.bat +++ b/neo/astyle-code.bat @@ -1,5 +1,5 @@ -astyle.exe -v --formatted --options=astyle-options.ini --exclude="libs" --recursive *.h -astyle.exe -v --formatted --options=astyle-options.ini --exclude="libs" --exclude="d3xp/gamesys/SysCvar.cpp" --exclude="d3xp/gamesys/Callbacks.cpp" --exclude="sys/win32/win_cpu.cpp" --exclude="sys/win32/win_main.cpp" --recursive *.cpp +astyle.exe -v --formatted --options=astyle-options.ini --exclude="libs" --exclude="extern" --recursive *.h +astyle.exe -v --formatted --options=astyle-options.ini --exclude="libs" --exclude="extern" --exclude="d3xp/gamesys/SysCvar.cpp" --exclude="d3xp/gamesys/Callbacks.cpp" --exclude="sys/win32/win_cpu.cpp" --exclude="sys/win32/win_main.cpp" --recursive *.cpp astyle.exe -v --formatted --options=astyle-options.ini --recursive libs/imgui/*.h astyle.exe -v --formatted --options=astyle-options.ini --recursive libs/imgui/*.cpp diff --git a/neo/astyle-code.sh b/neo/astyle-code.sh index 0e7ad74d..f01c8654 100755 --- a/neo/astyle-code.sh +++ b/neo/astyle-code.sh @@ -34,6 +34,6 @@ if [ "$ASTYLE_VERSION" != "$OUR_ASTYLE_VERSION" ]; then exit 1 fi -$ASTYLE_BIN -v --formatted --options=astyle-options.ini --exclude="libs" --recursive "*.h" -$ASTYLE_BIN -v --formatted --options=astyle-options.ini --exclude="libs" --exclude="d3xp/gamesys/SysCvar.cpp" --exclude="d3xp/gamesys/Callbacks.cpp" \ +$ASTYLE_BIN -v --formatted --options=astyle-options.ini --exclude="libs" --exclude="extern" --recursive "*.h" +$ASTYLE_BIN -v --formatted --options=astyle-options.ini --exclude="libs" --exclude="extern" --exclude="d3xp/gamesys/SysCvar.cpp" --exclude="d3xp/gamesys/Callbacks.cpp" \ --exclude="sys/win32/win_cpu.cpp" --exclude="sys/win32/win_main.cpp" --recursive "*.cpp" diff --git a/neo/extern/glslang b/neo/extern/glslang new file mode 160000 index 00000000..1bc601c6 --- /dev/null +++ b/neo/extern/glslang @@ -0,0 +1 @@ +Subproject commit 1bc601c674aecc2fee0dee8ff7a118db76b4c439 diff --git a/neo/renderer/Vulkan/RenderBackend_VK.cpp b/neo/renderer/Vulkan/RenderBackend_VK.cpp index ace79bac..4e01e4f0 100644 --- a/neo/renderer/Vulkan/RenderBackend_VK.cpp +++ b/neo/renderer/Vulkan/RenderBackend_VK.cpp @@ -45,7 +45,7 @@ idCVar r_syncEveryFrame( "r_syncEveryFrame", "1", CVAR_BOOL, "Don't let the GPU // NEW VULKAN STUFF -idCVar r_vkEnableValidationLayers( "r_vkEnableValidationLayers", "0", CVAR_BOOL, "" ); +idCVar r_vkEnableValidationLayers( "r_vkEnableValidationLayers", "0", CVAR_BOOL | CVAR_INIT, "" ); vulkanContext_t vkcontext; diff --git a/neo/renderer/Vulkan/RenderProgs_VK.cpp b/neo/renderer/Vulkan/RenderProgs_VK.cpp index 829a10c2..e7af84dd 100644 --- a/neo/renderer/Vulkan/RenderProgs_VK.cpp +++ b/neo/renderer/Vulkan/RenderProgs_VK.cpp @@ -409,6 +409,8 @@ namespace glslang #if 0 extern const TBuiltInResource DefaultTBuiltInResource; #else + +// RB: see RBDOOM-3-BFG\neo\extern\glslang\StandAlone\ResourceLimits.cpp const TBuiltInResource DefaultTBuiltInResource = { /* .MaxLights = */ 32, @@ -494,6 +496,16 @@ const TBuiltInResource DefaultTBuiltInResource = /* .MaxCullDistances = */ 8, /* .MaxCombinedClipAndCullDistances = */ 8, /* .MaxSamples = */ 4, + /* .maxMeshOutputVerticesNV = */ 256, + /* .maxMeshOutputPrimitivesNV = */ 512, + /* .maxMeshWorkGroupSizeX_NV = */ 32, + /* .maxMeshWorkGroupSizeY_NV = */ 1, + /* .maxMeshWorkGroupSizeZ_NV = */ 1, + /* .maxTaskWorkGroupSizeX_NV = */ 32, + /* .maxTaskWorkGroupSizeY_NV = */ 1, + /* .maxTaskWorkGroupSizeZ_NV = */ 1, + /* .maxMeshViewCountNV = */ 4, + /* .limits = */ { /* .nonInductiveForLoops = */ 1, /* .whileLoops = */ 1,