Skip to content

Commit ff26c2e

Browse files
committed
Merge branch 'main' of github.com:KhronosGroup/glslang
2 parents 7bc35fa + 46ef757 commit ff26c2e

File tree

7 files changed

+63
-20
lines changed

7 files changed

+63
-20
lines changed

CHANGES.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,41 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](https://semver.org/).
55

6+
## 15.0.0 2024-09-23
7+
### Breaking changes
8+
* Explicitly export all symbols that are part of the public API and hide other symbols by default
9+
10+
### Other changes
11+
* Allow building glslang without the SPIR-V backend using the new ENABLE_SPIRV build option
12+
* Add setResourceSetBinding method to the API
13+
* Add interface to get the GLSL IO mapper and resolver
14+
* Allow compute derivative modes when the workgroup dimensions are spec constants
15+
* Improve debug location of branch/return instructions
16+
* Silence preprocessor '#' error reporting in inactive #if/#ifdef/#elif/#else blocks
17+
* Apply GLSL memory decorations to top-level OpVariable
18+
* Move definition of GLSLANG_EXPORT to visibility.h
19+
* Merge ancillary libraries into main glslang library and stub originals
20+
* Add public setSourceFile and addSourceText methods to TShader class
21+
* Add type checks for hitObjectNV
22+
* Add optimizerAllowExpandedIDBound to SpvOptions
23+
* Add SpvTools.h back to public headers
24+
* Add cross-stage check for missing outputs
25+
* Fix HLSL offsets for non-buffers
26+
* Add types and functions for IO mapping to API
27+
* Add function to set preprocessed code to API
28+
* Add set/get version functions to API
29+
* Expose setGlobalUniform functions to API
30+
* Don't emit debug instructions before an OpPhi
31+
* Add command-line and API option to enable reporting column location for compiler errors
32+
* Improve location aliasing checks
33+
* Support constant expression calculated by matrixCompMult
34+
* Fix crash caused by atomicCounter() use without arguments
35+
* Fix multi-line function call line numbers
36+
* Add line info to OpDebugDeclare for function parameters
37+
* Fix HLSL OpDebugFunction file name
38+
* Fix duplicate decorations
39+
* Enable compilation of glslang without thread support for WASI
40+
641
## 14.3.0 2024-06-25
742
* Generate vector constructions more efficiently when sizes match
843
* Skip identity conversions for 8-bit and 16-bit types

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
# News
66

7-
1. The `GenericCodeGen`, `MachineIndependent`, `OSDependent`, and `SPIRV` libraries have been integrated into the main `glslang` library. The old separate libraries have replaced with empty stubs for a temporary compatibility period, and they will be removed entirely in the future.
7+
1. Building glslang as a DLL or shared library is now possible and supported.
88

9-
2. A new CMake `ENABLE_SPIRV` option has been added to control whether glslang is built with SPIR-V support. Its default value is `ON`.
9+
2. The `GenericCodeGen`, `MachineIndependent`, `OSDependent`, and `SPIRV` libraries have been integrated into the main `glslang` library. The old separate libraries have replaced with empty stubs for a temporary compatibility period, and they will be removed entirely in the future.
1010

11-
3. `OGLCompiler` and `HLSL` stub libraries have been fully removed from the build.
11+
3. A new CMake `ENABLE_SPIRV` option has been added to control whether glslang is built with SPIR-V support. Its default value is `ON`.
1212

13-
4. `OVERRIDE_MSVCCRT` has been removed in favor of `CMAKE_MSVC_RUNTIME_LIBRARY`
13+
4. `OGLCompiler` and `HLSL` stub libraries have been fully removed from the build.
1414

1515
Users are encouraged to utilize the standard approach via [CMAKE_MSVC_RUNTIME_LIBRARY](https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html).
1616

SPIRV/SpvTools.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLog
8282
return spv_target_env::SPV_ENV_UNIVERSAL_1_0;
8383
}
8484

85+
spv_target_env MapToSpirvToolsEnv(const glslang::TIntermediate& intermediate, spv::SpvBuildLogger* logger)
86+
{
87+
return MapToSpirvToolsEnv(intermediate.getSpv(), logger);
88+
}
89+
8590
// Callback passed to spvtools::Optimizer::SetMessageConsumer
8691
void OptimizerMesssageConsumer(spv_message_level_t level, const char *source,
8792
const spv_position_t &position, const char *message)

SPIRV/SpvTools.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class TIntermediate;
6161

6262
// Translate glslang's view of target versioning to what SPIRV-Tools uses.
6363
GLSLANG_EXPORT spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLogger* logger);
64+
GLSLANG_EXPORT spv_target_env MapToSpirvToolsEnv(const glslang::TIntermediate& intermediate, spv::SpvBuildLogger* logger);
6465

6566
// Use the SPIRV-Tools disassembler to print SPIR-V using a SPV_ENV_UNIVERSAL_1_3 environment.
6667
GLSLANG_EXPORT void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv);

glslang/Include/Types.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -307,21 +307,6 @@ typedef TVector<TTypeLoc> TTypeList;
307307

308308
typedef TVector<TString*> TIdentifierList;
309309

310-
//
311-
// Following are a series of helper enums for managing layouts and qualifiers,
312-
// used for TPublicType, TType, others.
313-
//
314-
315-
enum TLayoutPacking {
316-
ElpNone,
317-
ElpShared, // default, but different than saying nothing
318-
ElpStd140,
319-
ElpStd430,
320-
ElpPacked,
321-
ElpScalar,
322-
ElpCount // If expanding, see bitfield width below
323-
};
324-
325310
enum TLayoutMatrix {
326311
ElmNone,
327312
ElmRowMajor,

glslang/MachineIndependent/iomapper.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,11 @@ class TGlslIoMapper : public TIoMapper {
196196
virtual ~TGlslIoMapper();
197197
// If set, the uniform block with the given name will be changed to be backed by
198198
// push_constant if it's size is <= maxSize
199-
void setAutoPushConstantBlock(const char* name, unsigned int maxSize, TLayoutPacking packing) {
199+
bool setAutoPushConstantBlock(const char* name, unsigned int maxSize, TLayoutPacking packing) override {
200200
autoPushConstantBlockName = name;
201201
autoPushConstantMaxSize = maxSize;
202202
autoPushConstantBlockPacking = packing;
203+
return true;
203204
}
204205
// grow the reflection stage by stage
205206
bool addStage(EShLanguage, TIntermediate&, TInfoSink&, TIoMapResolver*) override;

glslang/Public/ShaderLang.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,21 @@ typedef enum {
173173
LAST_ELEMENT_MARKER(EShTargetLanguageVersionCount = 7),
174174
} EShTargetLanguageVersion;
175175

176+
//
177+
// Following are a series of helper enums for managing layouts and qualifiers,
178+
// used for TPublicType, TType, others.
179+
//
180+
181+
enum TLayoutPacking {
182+
ElpNone,
183+
ElpShared, // default, but different than saying nothing
184+
ElpStd140,
185+
ElpStd430,
186+
ElpPacked,
187+
ElpScalar,
188+
ElpCount // If expanding, see bitfield width below
189+
};
190+
176191
struct TInputLanguage {
177192
EShSource languageFamily; // redundant information with other input, this one overrides when not EShSourceNone
178193
EShLanguage stage; // redundant information with other input, this one overrides when not EShSourceNone
@@ -847,6 +862,7 @@ class TIoMapper {
847862
// grow the reflection stage by stage
848863
bool virtual addStage(EShLanguage, TIntermediate&, TInfoSink&, TIoMapResolver*);
849864
bool virtual doMap(TIoMapResolver*, TInfoSink&) { return true; }
865+
bool virtual setAutoPushConstantBlock(const char*, unsigned int, TLayoutPacking) { return false; }
850866
};
851867

852868
// Get the default GLSL IO mapper

0 commit comments

Comments
 (0)