Externals: Fix build failures with the newer glslang.
v2: Don't include glslang project wide.
This commit is contained in:
parent
690dee3533
commit
ba2d04b793
|
@ -35,7 +35,9 @@ set(SRCS
|
|||
SPIRV/InReadableOrder.cpp
|
||||
SPIRV/Logger.cpp
|
||||
SPIRV/SpvBuilder.cpp
|
||||
SPIRV/SpvPostProcess.cpp
|
||||
SPIRV/SPVRemapper.cpp
|
||||
StandAlone/ResourceLimits.cpp
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
|
@ -62,3 +64,8 @@ endif()
|
|||
endif()
|
||||
|
||||
add_library(glslang STATIC ${SRCS})
|
||||
|
||||
target_include_directories(glslang
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/Externals/glslang
|
||||
)
|
||||
|
|
|
@ -81,7 +81,9 @@
|
|||
<ClCompile Include="SPIRV\InReadableOrder.cpp" />
|
||||
<ClCompile Include="SPIRV\Logger.cpp" />
|
||||
<ClCompile Include="SPIRV\SpvBuilder.cpp" />
|
||||
<ClCompile Include="SPIRV\SpvPostProcess.cpp" />
|
||||
<ClCompile Include="SPIRV\SPVRemapper.cpp" />
|
||||
<ClCompile Include="StandAlone\ResourceLimits.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="glslang\Include\arrays.h" />
|
||||
|
@ -92,7 +94,6 @@
|
|||
<ClInclude Include="glslang\Include\InitializeGlobals.h" />
|
||||
<ClInclude Include="glslang\Include\intermediate.h" />
|
||||
<ClInclude Include="glslang\Include\PoolAlloc.h" />
|
||||
<ClInclude Include="glslang\Include\ResourceLimits.h" />
|
||||
<ClInclude Include="glslang\Include\revision.h" />
|
||||
<ClInclude Include="glslang\Include\ShHandle.h" />
|
||||
<ClInclude Include="glslang\Include\Types.h" />
|
||||
|
@ -126,6 +127,7 @@
|
|||
<ClInclude Include="SPIRV\SpvBuilder.h" />
|
||||
<ClInclude Include="SPIRV\spvIR.h" />
|
||||
<ClInclude Include="SPIRV\SPVRemapper.h" />
|
||||
<ClInclude Include="StandAlone\ResourceLimits.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="glslang\MachineIndependent\glslang.y" />
|
||||
|
@ -133,4 +135,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -103,9 +103,15 @@
|
|||
<ClCompile Include="SPIRV\SpvBuilder.cpp">
|
||||
<Filter>SPIRV</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SPIRV\SpvPostProcess.cpp">
|
||||
<Filter>SPIRV</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SPIRV\SPVRemapper.cpp">
|
||||
<Filter>SPIRV</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="StandAlone\ResourceLimits.cpp">
|
||||
<Filter>StandAlone</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OGLCompilersDLL\InitializeDll.cpp">
|
||||
<Filter>OGLCompilersDLL</Filter>
|
||||
</ClCompile>
|
||||
|
@ -117,8 +123,8 @@
|
|||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="glslang\Include\ResourceLimits.h">
|
||||
<Filter>glslang\Include</Filter>
|
||||
<ClInclude Include="StandAlone\ResourceLimits.h">
|
||||
<Filter>StandAlone</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="glslang\Include\revision.h">
|
||||
<Filter>glslang\Include</Filter>
|
||||
|
@ -281,4 +287,4 @@
|
|||
<Filter>glslang\MachineIndependant</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -57,6 +57,8 @@ PRIVATE
|
|||
# Silence warnings on glslang by flagging it as a system include
|
||||
target_include_directories(videovulkan
|
||||
SYSTEM PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/Externals/glslang/StandAlone
|
||||
${CMAKE_SOURCE_DIR}/Externals/glslang/glslang/Public
|
||||
${CMAKE_SOURCE_DIR}/Externals/glslang/SPIRV
|
||||
${CMAKE_SOURCE_DIR}/Externals/glslang
|
||||
)
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
// glslang includes
|
||||
#include "GlslangToSpv.h"
|
||||
#include "ResourceLimits.h"
|
||||
#include "ShaderLang.h"
|
||||
#include "disassemble.h"
|
||||
|
||||
|
@ -261,103 +262,7 @@ bool InitializeGlslang()
|
|||
|
||||
const TBuiltInResource* GetCompilerResourceLimits()
|
||||
{
|
||||
static const TBuiltInResource limits = {/* .MaxLights = */ 32,
|
||||
/* .MaxClipPlanes = */ 6,
|
||||
/* .MaxTextureUnits = */ 32,
|
||||
/* .MaxTextureCoords = */ 32,
|
||||
/* .MaxVertexAttribs = */ 64,
|
||||
/* .MaxVertexUniformComponents = */ 4096,
|
||||
/* .MaxVaryingFloats = */ 64,
|
||||
/* .MaxVertexTextureImageUnits = */ 32,
|
||||
/* .MaxCombinedTextureImageUnits = */ 80,
|
||||
/* .MaxTextureImageUnits = */ 32,
|
||||
/* .MaxFragmentUniformComponents = */ 4096,
|
||||
/* .MaxDrawBuffers = */ 32,
|
||||
/* .MaxVertexUniformVectors = */ 128,
|
||||
/* .MaxVaryingVectors = */ 8,
|
||||
/* .MaxFragmentUniformVectors = */ 16,
|
||||
/* .MaxVertexOutputVectors = */ 16,
|
||||
/* .MaxFragmentInputVectors = */ 15,
|
||||
/* .MinProgramTexelOffset = */ -8,
|
||||
/* .MaxProgramTexelOffset = */ 7,
|
||||
/* .MaxClipDistances = */ 8,
|
||||
/* .MaxComputeWorkGroupCountX = */ 65535,
|
||||
/* .MaxComputeWorkGroupCountY = */ 65535,
|
||||
/* .MaxComputeWorkGroupCountZ = */ 65535,
|
||||
/* .MaxComputeWorkGroupSizeX = */ 1024,
|
||||
/* .MaxComputeWorkGroupSizeY = */ 1024,
|
||||
/* .MaxComputeWorkGroupSizeZ = */ 64,
|
||||
/* .MaxComputeUniformComponents = */ 1024,
|
||||
/* .MaxComputeTextureImageUnits = */ 16,
|
||||
/* .MaxComputeImageUniforms = */ 8,
|
||||
/* .MaxComputeAtomicCounters = */ 8,
|
||||
/* .MaxComputeAtomicCounterBuffers = */ 1,
|
||||
/* .MaxVaryingComponents = */ 60,
|
||||
/* .MaxVertexOutputComponents = */ 64,
|
||||
/* .MaxGeometryInputComponents = */ 64,
|
||||
/* .MaxGeometryOutputComponents = */ 128,
|
||||
/* .MaxFragmentInputComponents = */ 128,
|
||||
/* .MaxImageUnits = */ 8,
|
||||
/* .MaxCombinedImageUnitsAndFragmentOutputs = */ 8,
|
||||
/* .MaxCombinedShaderOutputResources = */ 8,
|
||||
/* .MaxImageSamples = */ 0,
|
||||
/* .MaxVertexImageUniforms = */ 0,
|
||||
/* .MaxTessControlImageUniforms = */ 0,
|
||||
/* .MaxTessEvaluationImageUniforms = */ 0,
|
||||
/* .MaxGeometryImageUniforms = */ 0,
|
||||
/* .MaxFragmentImageUniforms = */ 8,
|
||||
/* .MaxCombinedImageUniforms = */ 8,
|
||||
/* .MaxGeometryTextureImageUnits = */ 16,
|
||||
/* .MaxGeometryOutputVertices = */ 256,
|
||||
/* .MaxGeometryTotalOutputComponents = */ 1024,
|
||||
/* .MaxGeometryUniformComponents = */ 1024,
|
||||
/* .MaxGeometryVaryingComponents = */ 64,
|
||||
/* .MaxTessControlInputComponents = */ 128,
|
||||
/* .MaxTessControlOutputComponents = */ 128,
|
||||
/* .MaxTessControlTextureImageUnits = */ 16,
|
||||
/* .MaxTessControlUniformComponents = */ 1024,
|
||||
/* .MaxTessControlTotalOutputComponents = */ 4096,
|
||||
/* .MaxTessEvaluationInputComponents = */ 128,
|
||||
/* .MaxTessEvaluationOutputComponents = */ 128,
|
||||
/* .MaxTessEvaluationTextureImageUnits = */ 16,
|
||||
/* .MaxTessEvaluationUniformComponents = */ 1024,
|
||||
/* .MaxTessPatchComponents = */ 120,
|
||||
/* .MaxPatchVertices = */ 32,
|
||||
/* .MaxTessGenLevel = */ 64,
|
||||
/* .MaxViewports = */ 16,
|
||||
/* .MaxVertexAtomicCounters = */ 0,
|
||||
/* .MaxTessControlAtomicCounters = */ 0,
|
||||
/* .MaxTessEvaluationAtomicCounters = */ 0,
|
||||
/* .MaxGeometryAtomicCounters = */ 0,
|
||||
/* .MaxFragmentAtomicCounters = */ 8,
|
||||
/* .MaxCombinedAtomicCounters = */ 8,
|
||||
/* .MaxAtomicCounterBindings = */ 1,
|
||||
/* .MaxVertexAtomicCounterBuffers = */ 0,
|
||||
/* .MaxTessControlAtomicCounterBuffers = */ 0,
|
||||
/* .MaxTessEvaluationAtomicCounterBuffers = */ 0,
|
||||
/* .MaxGeometryAtomicCounterBuffers = */ 0,
|
||||
/* .MaxFragmentAtomicCounterBuffers = */ 1,
|
||||
/* .MaxCombinedAtomicCounterBuffers = */ 1,
|
||||
/* .MaxAtomicCounterBufferSize = */ 16384,
|
||||
/* .MaxTransformFeedbackBuffers = */ 4,
|
||||
/* .MaxTransformFeedbackInterleavedComponents = */ 64,
|
||||
/* .MaxCullDistances = */ 8,
|
||||
/* .MaxCombinedClipAndCullDistances = */ 8,
|
||||
/* .MaxSamples = */ 4,
|
||||
/* .limits = */
|
||||
{
|
||||
/* .nonInductiveForLoops = */ 1,
|
||||
/* .whileLoops = */ 1,
|
||||
/* .doWhileLoops = */ 1,
|
||||
/* .generalUniformIndexing = */ 1,
|
||||
/* .generalAttributeMatrixVectorIndexing = */ 1,
|
||||
/* .generalVaryingIndexing = */ 1,
|
||||
/* .generalSamplerIndexing = */ 1,
|
||||
/* .generalVariableIndexing = */ 1,
|
||||
/* .generalConstantMatrixVectorIndexing = */ 1,
|
||||
}};
|
||||
|
||||
return &limits;
|
||||
return &glslang::DefaultTBuiltInResource;
|
||||
}
|
||||
|
||||
std::optional<SPIRVCodeVector> CompileVertexShader(std::string_view source_code)
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<AdditionalIncludeDirectories>$(ExternalsDir)ffmpeg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ExternalsDir)fmt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ExternalsDir)GL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ExternalsDir)glslang\glslang\Public;$(ExternalsDir)glslang\SPIRV;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ExternalsDir)glslang;$(ExternalsDir)glslang\StandAlone;$(ExternalsDir)glslang\glslang\Public;$(ExternalsDir)glslang\SPIRV;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ExternalsDir)imgui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ExternalsDir)liblzma\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ExternalsDir)libpng;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
|
|
Loading…
Reference in New Issue