On Windows, _DEBUG is defined by CMake if CMAKE_BUILD_TYPE is Debug. But
on other platforms, this is not the case and thus in debug mode, the
guard checks are not enabled.
Instead, rely on the NDEBUG define, which is always defined in release
mode (Release, RelWithDebInfo and MinSizeRel). This works reliably on
all platforms: It is also used to enable or disable assertions.
Also eliminates dead output variables and unused output variable
components. Finally calls aggressive dead code elimination.
AnalyzeDeadOutputStores also supplied to be called on the following
shader to provide input for the Eliminate* function.
ANGLE no longer links with glslang. This change reverts
1ef2e250fc which added a flag to strip
glslang to reduce its binary size. This flag is no longer needed.
New interface allows users to generate ResourceLimits for interface so
that additions to TBuiltInResource do not break the ABI.
Users should use the glslang-default-resource-limits library and the
Public/ResourceLimits.h header. Similar changes have been made to the
C interface. Use Public/resource_limits_c.h.
Fixes#2822
For SPIR-V 1.6 HelperInvocation accesses need to be volatile to avoid
undefined values when shaders execute 'demote'. Previously this was
always decorated on the gl_HelperInvocation variable, but this is not
valid when the Vulkan memory model is in use.
When the memory model is enabled, stop decorating the variable
declaration and apply the memory semantic to access chain loads instead.
Fixes#3042
When GL_EXT_mesh_shader is enabled, the check of layout qualifiers
'max_vertices' and 'max_primitives' should use
gl_MaxMeshOutputVerticesEXT and gl_MaxMeshOutputPrimitivesEXT.
It can't be safely used unilaterally on other stages, since that will
result in output/input mismatches between stages. They arn't
having their output variables eliminated accordingly.
This bug got introduced as part of EXT_mesh_shader changes 228c672
Also updated barycentric test cases to add coverage for multiple pervertexEXT array inputs
gl_SubGroupARB was being correctly declared as an Input variable in
Vulkan but it was missing the Flat decoration, which made spirv-val emit
the VUID-StandaloneSpirv-Flat-04744 validation error with shaders using
that built-in.
since we are changing the type before the visitBinary now, we need to be
comparing against the new type.
Previous test cases worked since the 'unitType' was a shallow copy and
ended up getting updated in some cases to match the new type, but not all.