Skip to content
Permalink
Browse files

- update glslang to 7.11.3113 (stable release February 8, 2019). This…

… fixes the SPIR-V validation error reported for the shadowmap shader
  • Loading branch information...
dpjudas committed Apr 15, 2019
1 parent b5e0451 commit 06222a1fbf9befa3cb7dc52c52517259d8f289c5
Showing with 11,433 additions and 5,134 deletions.
  1. +14 −0 glslang/glslang/CMakeLists.txt
  2. +81 −0 glslang/glslang/Include/BaseTypes.h
  3. +17 −4 glslang/glslang/Include/Common.h
  4. +9 −0 glslang/glslang/Include/ResourceLimits.h
  5. +252 −40 glslang/glslang/Include/Types.h
  6. +48 −0 glslang/glslang/Include/intermediate.h
  7. +1 −1 glslang/glslang/Include/revision.h
  8. +279 −5 glslang/glslang/MachineIndependent/Constant.cpp
  9. +1,105 −173 glslang/glslang/MachineIndependent/Initialize.cpp
  10. +101 −36 glslang/glslang/MachineIndependent/Intermediate.cpp
  11. +11 −0 glslang/glslang/MachineIndependent/ParseContextBase.cpp
  12. +1,058 −158 glslang/glslang/MachineIndependent/ParseHelper.cpp
  13. +9 −4 glslang/glslang/MachineIndependent/ParseHelper.h
  14. +93 −22 glslang/glslang/MachineIndependent/Scan.cpp
  15. +7 −5 glslang/glslang/MachineIndependent/Scan.h
  16. +2 −1 glslang/glslang/MachineIndependent/ScanContext.h
  17. +84 −4 glslang/glslang/MachineIndependent/ShaderLang.cpp
  18. +24 −13 glslang/glslang/MachineIndependent/SymbolTable.cpp
  19. +75 −29 glslang/glslang/MachineIndependent/SymbolTable.h
  20. +101 −48 glslang/glslang/MachineIndependent/Versions.cpp
  21. +23 −9 glslang/glslang/MachineIndependent/Versions.h
  22. +137 −4 glslang/glslang/MachineIndependent/glslang.y
  23. +3,929 −3,589 glslang/glslang/MachineIndependent/glslang_tab.cpp
  24. +331 −313 glslang/glslang/MachineIndependent/glslang_tab.cpp.h
  25. +41 −3 glslang/glslang/MachineIndependent/intermOut.cpp
  26. +15 −5 glslang/glslang/MachineIndependent/iomapper.cpp
  27. +488 −88 glslang/glslang/MachineIndependent/linkValidate.cpp
  28. +147 −17 glslang/glslang/MachineIndependent/localintermediate.h
  29. +3 −1 glslang/glslang/MachineIndependent/parseVersions.h
  30. +35 −0 glslang/glslang/MachineIndependent/pch.cpp
  31. +49 −0 glslang/glslang/MachineIndependent/pch.h
  32. +20 −10 glslang/glslang/MachineIndependent/preprocessor/Pp.cpp
  33. +1 −0 glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp
  34. +9 −10 glslang/glslang/MachineIndependent/preprocessor/PpContext.h
  35. +26 −8 glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
  36. +2 −0 glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp
  37. +108 −26 glslang/glslang/MachineIndependent/reflection.cpp
  38. +7 −6 glslang/glslang/MachineIndependent/reflection.h
  39. +17 −0 glslang/glslang/OSDependent/Unix/CMakeLists.txt
  40. +4 −1 glslang/glslang/OSDependent/Unix/ossource.cpp
  41. +27 −5 glslang/glslang/Public/ShaderLang.h
  42. +22 −6 glslang/spirv/CMakeLists.txt
  43. +2 −1 glslang/spirv/GLSL.ext.EXT.h
  44. +2 −0 glslang/spirv/GLSL.ext.KHR.h
  45. +20 −2 glslang/spirv/GLSL.ext.NV.h
  46. +1,112 −289 glslang/spirv/GlslangToSpv.cpp
  47. +2 −8 glslang/spirv/GlslangToSpv.h
  48. +304 −81 glslang/spirv/SpvBuilder.cpp
  49. +113 −18 glslang/spirv/SpvBuilder.h
  50. +390 −0 glslang/spirv/SpvPostProcess.cpp
  51. +199 −0 glslang/spirv/SpvTools.cpp
  52. +80 −0 glslang/spirv/SpvTools.h
  53. +1 −1 glslang/spirv/bitutils.h
  54. +49 −30 glslang/spirv/disassemble.cpp
  55. +0 −3 glslang/spirv/disassemble.h
  56. +175 −28 glslang/spirv/doc.cpp
  57. +115 −4 glslang/spirv/spirv.hpp
  58. +39 −7 glslang/spirv/spvIR.h
  59. +18 −18 src/rendering/vulkan/system/vk_builders.cpp
@@ -106,6 +106,20 @@ set(HEADERS
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
# set(BISON_GLSLParser_OUTPUT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp)

# Precompiled header macro. Parameters are source file list and filename for pch cpp file.
macro(glslang_pch SRCS PCHCPP)
if(MSVC AND CMAKE_GENERATOR MATCHES "^Visual Studio")
set(PCH_NAME "$(IntDir)\\pch.pch")
# make source files use/depend on PCH_NAME
set_source_files_properties(${${SRCS}} PROPERTIES COMPILE_FLAGS "/Yupch.h /FIpch.h /Fp${PCH_NAME} /Zm300" OBJECT_DEPENDS "${PCH_NAME}")
# make PCHCPP file compile and generate PCH_NAME
set_source_files_properties(${PCHCPP} PROPERTIES COMPILE_FLAGS "/Ycpch.h /Fp${PCH_NAME} /Zm300" OBJECT_OUTPUTS "${PCH_NAME}")
list(APPEND ${SRCS} "${PCHCPP}")
endif()
endmacro(glslang_pch)

glslang_pch(SOURCES MachineIndependent/pch.cpp)

add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})
set_property(TARGET glslang PROPERTY FOLDER glslang)
set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON)
@@ -62,6 +62,12 @@ enum TBasicType {
EbtStruct,
EbtBlock,

#ifdef NV_EXTENSIONS
EbtAccStructNV,
#endif

EbtReference,

// HLSL types that live only temporarily.
EbtString,

@@ -88,6 +94,14 @@ enum TStorageQualifier {
EvqBuffer, // read/write, shared with app
EvqShared, // compute shader's read/write 'shared' qualifier

#ifdef NV_EXTENSIONS
EvqPayloadNV,
EvqPayloadInNV,
EvqHitAttrNV,
EvqCallableDataNV,
EvqCallableDataInNV,
#endif

// parameters
EvqIn, // also, for 'in' in the grammar before we know if it's a pipeline input or an 'in' parameter
EvqOut, // also, for 'out' in the grammar before we know if it's a pipeline output or an 'out' parameter
@@ -220,13 +234,43 @@ enum TBuiltInVariable {
EbvViewIndex,
EbvDeviceIndex,

EbvFragSizeEXT,
EbvFragInvocationCountEXT,

#ifdef NV_EXTENSIONS
EbvViewportMaskNV,
EbvSecondaryPositionNV,
EbvSecondaryViewportMaskNV,
EbvPositionPerViewNV,
EbvViewportMaskPerViewNV,
EbvFragFullyCoveredNV,
EbvFragmentSizeNV,
EbvInvocationsPerPixelNV,
// raytracing
EbvLaunchIdNV,
EbvLaunchSizeNV,
EbvInstanceCustomIndexNV,
EbvWorldRayOriginNV,
EbvWorldRayDirectionNV,
EbvObjectRayOriginNV,
EbvObjectRayDirectionNV,
EbvRayTminNV,
EbvRayTmaxNV,
EbvHitTNV,
EbvHitKindNV,
EbvObjectToWorldNV,
EbvWorldToObjectNV,
EbvIncomingRayFlagsNV,
EbvBaryCoordNV,
EbvBaryCoordNoPerspNV,
EbvTaskCountNV,
EbvPrimitiveCountNV,
EbvPrimitiveIndicesNV,
EbvClipDistancePerViewNV,
EbvCullDistancePerViewNV,
EbvLayerPerViewNV,
EbvMeshViewCountNV,
EbvMeshViewIndicesNV,
#endif

// HLSL built-ins that live only temporarily, until they get remapped
@@ -273,6 +317,13 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q)
case EvqPointCoord: return "gl_PointCoord"; break;
case EvqFragColor: return "fragColor"; break;
case EvqFragDepth: return "gl_FragDepth"; break;
#ifdef NV_EXTENSIONS
case EvqPayloadNV: return "rayPayloadNV"; break;
case EvqPayloadInNV: return "rayPayloadInNV"; break;
case EvqHitAttrNV: return "hitAttributeNV"; break;
case EvqCallableDataNV: return "callableDataNV"; break;
case EvqCallableDataInNV: return "callableDataInNV"; break;
#endif
default: return "unknown qualifier";
}
}
@@ -358,13 +409,43 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
case EbvViewIndex: return "ViewIndex";
case EbvDeviceIndex: return "DeviceIndex";

case EbvFragSizeEXT: return "FragSizeEXT";
case EbvFragInvocationCountEXT: return "FragInvocationCountEXT";

#ifdef NV_EXTENSIONS
case EbvViewportMaskNV: return "ViewportMaskNV";
case EbvSecondaryPositionNV: return "SecondaryPositionNV";
case EbvSecondaryViewportMaskNV: return "SecondaryViewportMaskNV";
case EbvPositionPerViewNV: return "PositionPerViewNV";
case EbvViewportMaskPerViewNV: return "ViewportMaskPerViewNV";
case EbvFragFullyCoveredNV: return "FragFullyCoveredNV";
case EbvFragmentSizeNV: return "FragmentSizeNV";
case EbvInvocationsPerPixelNV: return "InvocationsPerPixelNV";
case EbvLaunchIdNV: return "LaunchIdNV";
case EbvLaunchSizeNV: return "LaunchSizeNV";
case EbvInstanceCustomIndexNV: return "InstanceCustomIndexNV";
case EbvWorldRayOriginNV: return "WorldRayOriginNV";
case EbvWorldRayDirectionNV: return "WorldRayDirectionNV";
case EbvObjectRayOriginNV: return "ObjectRayOriginNV";
case EbvObjectRayDirectionNV: return "ObjectRayDirectionNV";
case EbvRayTminNV: return "ObjectRayTminNV";
case EbvRayTmaxNV: return "ObjectRayTmaxNV";
case EbvHitTNV: return "HitTNV";
case EbvHitKindNV: return "HitKindNV";
case EbvIncomingRayFlagsNV: return "IncomingRayFlagsNV";
case EbvObjectToWorldNV: return "ObjectToWorldNV";
case EbvWorldToObjectNV: return "WorldToObjectNV";

case EbvBaryCoordNV: return "BaryCoordNV";
case EbvBaryCoordNoPerspNV: return "BaryCoordNoPerspNV";
case EbvTaskCountNV: return "TaskCountNV";
case EbvPrimitiveCountNV: return "PrimitiveCountNV";
case EbvPrimitiveIndicesNV: return "PrimitiveIndicesNV";
case EbvClipDistancePerViewNV: return "ClipDistancePerViewNV";
case EbvCullDistancePerViewNV: return "CullDistancePerViewNV";
case EbvLayerPerViewNV: return "LayerPerViewNV";
case EbvMeshViewCountNV: return "MeshViewCountNV";
case EbvMeshViewIndicesNV: return "MeshViewIndicesNV";
#endif
default: return "unknown built-in variable";
}
@@ -229,16 +229,29 @@ inline const TString String(const int i, const int /*base*/ = 10)
#endif

struct TSourceLoc {
void init() { name = nullptr; string = 0; line = 0; column = 0; }
void init()
{
name = nullptr; string = 0; line = 0; column = 0;
}
void init(int stringNum) { init(); string = stringNum; }
// Returns the name if it exists. Otherwise, returns the string number.
std::string getStringNameOrNum(bool quoteStringName = true) const
{
if (name != nullptr)
return quoteStringName ? ("\"" + std::string(name) + "\"") : name;
if (name != nullptr) {
TString qstr = quoteStringName ? ("\"" + *name + "\"") : *name;
std::string ret_str(qstr.c_str());
return ret_str;
}
return std::to_string((long long)string);
}
const char* name; // descriptive name for this string
const char* getFilename() const
{
if (name == nullptr)
return nullptr;
return name->c_str();
}
const char* getFilenameStr() const { return name == nullptr ? "" : name->c_str(); }
TString* name; // descriptive name for this string, when a textual name is available, otherwise nullptr
int string;
int line;
int column;
@@ -133,6 +133,15 @@ struct TBuiltInResource {
int maxCullDistances;
int maxCombinedClipAndCullDistances;
int maxSamples;
int maxMeshOutputVerticesNV;
int maxMeshOutputPrimitivesNV;
int maxMeshWorkGroupSizeX_NV;
int maxMeshWorkGroupSizeY_NV;
int maxMeshWorkGroupSizeZ_NV;
int maxTaskWorkGroupSizeX_NV;
int maxTaskWorkGroupSizeY_NV;
int maxTaskWorkGroupSizeZ_NV;
int maxMeshViewCountNV;

TLimits limits;
};
Oops, something went wrong.

0 comments on commit 06222a1

Please sign in to comment.
You can’t perform that action at this time.