Skip to content
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a5de082
CFG: build per-function CFGs for all library exports
castano May 6, 2026
759ac29
HLSL: emit library exports as free functions
castano May 6, 2026
a9386f9
Add test to validate support for multiple exports.
castano May 6, 2026
dd20078
Add test to ensure arrays survive into the HLSL output.
castano May 6, 2026
d04e6db
GLSL: support SPIR-V library modules
castano May 6, 2026
06b7cc5
clang-format
castano May 6, 2026
7bc4bab
Temporary fix for Compiler::is_hidden_variable in library mode.
castano May 7, 2026
30a3fdf
Merge branch 'main' into cfg-library-mode
castano May 7, 2026
37fc587
Use follow_function_call helper.
castano May 7, 2026
e2f68dd
Merge branch '1-cfg-library-mode' into 2-hlsl-library-mode
castano May 7, 2026
ecdd522
HLSL: regression test for re-entrant emit on library exports
castano May 7, 2026
8f80660
GLSL: wrap library mode preamble in `#ifdef SPIRV_CROSS_LIBRARY_HEADER`
castano May 7, 2026
60c552d
Merge branch '2-hlsl-library-mode' into 3-hlsl-library-tests
castano May 7, 2026
2f0ae6f
Merge branch '3-hlsl-library-tests' into 4-hlsl-library-globals-test
castano May 7, 2026
186a64c
Merge branch '4-hlsl-library-globals-test' into 4.1-hlsl-library-reen…
castano May 7, 2026
5834720
Merge branch '4.1-hlsl-library-reentry-test' into 5-glsl-library-mode
castano May 7, 2026
915e085
Merge branch '5-glsl-library-mode' into 6-library-mode
castano May 7, 2026
69e7e5f
Merge branch 'main' into 6-library-mode
castano May 8, 2026
199513c
Library modules export all global variables regardless of SPIR-V vers…
castano May 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions spirv_cross.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,9 @@ bool Compiler::is_hidden_variable(const SPIRVariable &var, bool include_builtins
}

// In SPIR-V 1.4 and up we must also use the active variable interface to disable global variables
// which are not part of the entry point.
if (ir.get_spirv_version() >= 0x10400 && var.storage != StorageClassGeneric &&
// which are not part of the entry point. Library modules have no real entry point so the filter
// would hide every global so skip it in that case.
if (ir.get_spirv_version() >= 0x10400 && !ir.is_library_module && var.storage != StorageClassGeneric &&
var.storage != StorageClassFunction && !interface_variable_exists_in_entry_point(var.self))
{
return true;
Expand Down
Loading