This change adds GLSLANG_EXPORT in a couple more places, as well as
adding a new symbol visibility annotation GLSLANG_EXPORT_FOR_TESTS which
is defined the same as GLSLANG_EXPORT but documents the intention that
the symbols marked with it are only meant to be used by glslang's test
suite and do not form part of the public API and are thus not subject to
ABI stability guarantees.
This patch tries to attach debug location of a branch/return instruction to its predecessor or the closing brace. If none could be found, no debug info should be emitted.
The GLSLANG_EXPORT macro is already used (and defined) in two separate
places and will be used in a few more in the near future. To reduce
duplication it is now in its own header.
This option increases the max_id_bound in the optimizer to 0x3FFFFFFF, and then runs a
compact-id pass if the final result has a max_id greater than the standard limit of 0x3FFFFF.
coopmat<> type definition allows type parameters. To make it accept
types defined by spirv_type directive, we add spirvType info to the type
parameters. This change is to support this case. And a test is added to
show the missing usage.
Fix#3538.
Visual Studio 2022 added a new warning to detect when enumerators can
not be represented within the given bit field width. This warning is
disabled by default but can be enabled using the flag /w15249. This PR
increases the width by one to accommodate the signed maximum value of
EvqLast, which is currently 32.
Perhaps a future improvement would be to use scoped enums; however,
that is more work as the typing is more strict and would require more
changes.
Co-authored-by: Neil Hickey <neil.hickey@arm.com>
Co-authored-by: Stuart Brady <stuart.brady@arm.com>
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
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.
Adds the --no-link option which outputs the compiled shader binaries
without linking them. This is a first step towards allowing users to
create SPIR-v binary, non-executable libraries.
When using the --no-link option, all functions are decorated with the
Export linkage attribute.
glslang is using C++ 11, which has first class support for variables of the `thread_local` storage class.
By dropping the use of the `OS_[GS]etTLSValue`, we can simplify the logic, and have it support a thread-local default allocator if none is provided.
Issue: #2346
Previously, spirv_type doesn't accept type specifier as its parameter.
With this change, we can input non-array type specifier. This is because
some SPIR-V type definition intructions often need to reference other
SPIR-V types as its source operands. We add the support to facilitate
such usage.