This is also being done for gtest for similar reasons.
Currently glslang will build everything from spirv-tools despite
this not being neccessary.
EXCLUDE_FROM_ALL dramatically improves the build performance.
Going from compiling roughly 446 files to 292
Furthermore only the targets we need to install are installed.
Which makes it easier to verify the glslang installation.
This requires a small change to to use strncpy() instead of strcpy(),
as well as change of include paths to not use "..". The other warnings
are just not being hit anymore.
This change primarily fixes some -Wconversion warnings from gcc, but
also silences a warning triggered in glslang_tab.cpp, which is generated
code from bison.
There are still several GCC conversion warnings in Types.h due to the
use of bit fields that will be resolved in a future change.
XCode 15 includes a completely new linker implementation.
Hence some flags are deprecated.
The default is now error so we can simply remove the linker option.
* ci: Test macos-12 and macos-13 instead of macos-11 and macos-12
Developer survey shows little to no users still use MacOS 11 or earlier.
* Remove pointless comment about travis
* Fix minor indent issue
NDK 23.2.8568313 was removed from the latest runner
Hardcoding the NDK versions like before is asking for a CI
breakage.
Use ANDROID_NDK_HOME environment variable which is set by the
runner
glslang representing literal constants with double precision, so 1.0e40 and 1.0e-50 are normal values.
Shader1:
precision highp float;
out vec4 my_FragColor;
void main()
{
// Out-of-range floats should overflow to infinity
// GLSL ES 3.00.6 section 4.1.4 Floats:
// "If the value of the floating point number is too large (small) to be stored as a single precision value, it is converted to positive (negative) infinity"
float correct = isinf(1.0e40) ? 1.0 : 0.0;
my_FragColor = vec4(0.0, correct, 0.0, 1.0);
}
The expected ouput result of this test is vec4(0.0, 1.0, 0.0, 1.0),
but it's vec4(0.0,0.0,0.0,1.0).Because the return value of isInf is
false.
precision highp float;
out vec4 my_FragColor;
void main()
{
// GLSL ES 3.00.6 section 4.1.4 Floats:
// "A value with a magnitude too small to be represented as a mantissa and exponent is converted to zero."
// 1.0e-50 is small enough that it can't even be stored as subnormal.
float correct = (1.0e-50 == 0.0) ? 1.0 : 0.0;
my_FragColor = vec4(0.0, correct, 0.0, 1.0);
}
The expected ouput result of this test is vec4(0.0, 1.0, 0.0, 1.0),
but it's vec4(0.0,0.0,0.0,1.0).
For f32 and f16 type, when the literal constant out of range of the f32
and f16 number, the value should overflow or underflow to inf or zero.
glcts test item
KHR-GLES3.number_parsing.float_out_of_range_as_infinity
Only the headers that are part of glslang's public interface are
installed. Previously, all of its headers were installed, which exposed
a lot of internal implementation details and made it difficult to
maintain backward compatiblity. This reduces the API surface somewhat
and will make it easier to maintain API and ABI compatibility.
The dependency was only because of the SpvOptions struct which is used
in both, but really is part of the glslang public interface and should
be in the public GlslangToSpv.h header.
GlslangToSpv.h only declares functions with opaque references to to
TIntermediate, for which a simple "class TIntermediate;" declaration is
adequate. This means that Include/intermediate.h no longer needs to be
installed as part of glslang's public interface.
The distutils package was removed in Python 3.12, however its only
usage in this script can easily be replaced with functionality available
in the builtin os package in Python 3.2 and later.
Fixes#3393
The debug options passed down from the public ShConstruct* functions to
internal code is unused. This change removes the internal debugOptions
fields and attempts to make it more obvious these fields are not used.
This change does not change the public-facing interface.
This change also adds the -Wshorten-64-to-32 warning to the StandAlone
build in order to avoid unwanted 64-to-32 bit conversions in the future.
Closes#3348.