KhronosGroup / glslang

Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Other
2.9k stars 816 forks source link

Increase TStorageQualifier bitfield width #3540

Closed jeremy-lunarg closed 4 months ago

jeremy-lunarg commented 4 months ago

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.