Commit Graph

4976 Commits

Author SHA1 Message Date
Maciej
d604f26843 Add test 2023-02-02 16:33:32 -07:00
Maciej
95ad533eb0 Block-decorate Vulkan Structs with RuntimeArrays
Fixes KhronosGroup/glslang#2439

When decorating a struct for Vulkan, add [Buffer]Block decoration if the
struct has a RuntimeArray member, as required by VUID-...-04680.
2023-02-02 16:33:32 -07:00
Hans Wennborg
7341a21b34 GLSL: Fix integer overflow warnings in Constant.cpp
New versions of Clang warn:

```
glslang/MachineIndependent/Constant.cpp(216,114):
error: overflow in expression; result is -9223372036854775808 with type 'long long' [-Werror,-Winteger-overflow]
                else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == (long long)-0x8000000000000000ll)
                                                                                                                 ^
glslang/MachineIndependent/Constant.cpp(217,61):
error: overflow in expression; result is -9223372036854775808 with type 'long long' [-Werror,-Winteger-overflow]
                    newConstArray[i].setI64Const((long long)-0x8000000000000000ll);
                                                            ^
2 errors generated.
```

Using LLONG_MIN instead avoids the problem. I think it's also more
clear, and the code for EOpMod further down already does this.
2023-02-02 11:20:54 -07:00
rdb
5137ce1a95 HLSL: Add missing relaxed-precision float/int matrix expansions 2023-02-02 11:14:33 -07:00
Jeremy Hayes
58d302cfa2 Rename master to main and update news
Update CI and README to reflect rename.
Update News:
    * Notify users of rename.
    * Update minimum required VS compiler to 2019.
    * Remove notice about versioning. This has been completed.
    * Remove notice about SPIRV folder relocation. It has been 2.5 years
    since this occured.
2023-01-30 15:31:05 -07:00
Maciej
4e9cde50bb Move check if useStorageBuffer needs to be set.
From TParseContext used only by GLSL, to TParseContextBase inherited by both GLSL and HLSL paths.
It caused compilations from HLSL to SPIR-V 1.3+ to use BufferBlock decoration which is no longer valid.
2023-01-23 12:49:48 -07:00
Arcady Goldmints-Orlov
0d3211ff7b Reject non-float inputs/outputs with version < 120
GLSL 1.20 and prior stated that "the attribute qualifier can be used
only with float, floating-point vectors, and matrices" and likewise
for varying.

Fixes: #3111
2023-01-20 17:45:18 -07:00
Amir Masoud Abdol
8504d5ae1c Replace the deprecated $<CONFIGURATION> with $<CONFIG> 2023-01-20 10:27:13 -07:00
Jeremy Hayes
51813b65e9 Update readme with upcoming branch rename 2023-01-20 09:34:34 -07:00
Jeremy Hayes
ca8d07d0bc Update CHANGES for release 12.0.0 2023-01-19 09:57:51 -07:00
Jeremy Hayes
615741f278 Update known_good.json 2023-01-18 14:59:26 -07:00
Jeremy Hayes
42e94ee67e Update appveyor environment
SPIRV-Tools now requires 3.17.2 or higher. The version provided by
Visual Studio 2015 is 3.16.2.
2023-01-18 13:57:06 -07:00
Greg Fischer
1fb2f1d789
Merge pull request #3108 from greg-lunarg/i3105
Fix crash on bad structure member reference
2023-01-11 18:39:49 -07:00
Greg Fischer
9b67d41b85 Fix crash on bad structure member reference
Fixes #3105
2023-01-11 16:53:39 -07:00
Juan Ramos
06a7078ce7 build: Remove AMD_EXTENSIONS / NV_EXTENSIONS defines
These defines aren't needed anymore
2023-01-05 09:51:53 -07:00
Greg Fischer
1d978158de
Merge pull request #3100 from daniel-story/fix-dual-src-draw-buffers
Fix issues with MaxDualSourceDrawBuffersEXT
2022-12-29 12:09:46 -07:00
Greg Fischer
d1fc064e79
Merge pull request #3102 from jeremy-lunarg/hayes-fix-debuginfo-disassembly
Fix debuginfo disassembly
2022-12-26 13:30:34 -07:00
Jeremy Hayes
d38d06c03f Fix debuginfo disassembly 2022-12-22 15:43:03 -07:00
Greg Fischer
68935bc2c6
Merge pull request #3099 from jeremy-lunarg/hayes-fix-issue-3095
Fix const parameter debug types
2022-12-22 10:03:12 -07:00
Jeremy Hayes
bec8359bf7 Fix const parameter debug types
Constant qualified parameter types were not being correctly added to
the DebugTypeFunction instruction.

Fix #3095.
2022-12-21 14:20:44 -07:00
Daniel Story
a88f674124 Fix issues with MaxDualSourceDrawBuffersEXT 2022-12-21 11:53:50 -08:00
Jeremy Hayes
dcae187376 Remove languages from cmake project statement
Fix #3088
2022-12-20 09:33:05 -07:00
Chow
f9b760e6c7
[glslang] Refine implicit array size interfaces. (#3074)
* [glslang] Refine implicit array size interfaces.

Help to check builtin and other variables if across stages.
2022-12-13 11:20:28 -07:00
Greg Fischer
c6b3f279a7
Merge pull request #3087 from dneto0/remove-unused
Remove the name of unused formal paramters
2022-12-12 10:34:33 -07:00
David Neto
4fe00178c8 Remove the name of unused formal paramters
This eliminates a compiler warning in some configurations.
2022-12-09 15:51:35 -05:00
alelenv
6d8b00b1c6
Add support for GL_NV_shader_invocation_reorder. (#3054) 2022-12-09 13:19:51 -07:00
alelenv
4fc43cd3c1
Add support for GL_NV_shader_invocation_reorder. (#3054) 2022-12-09 13:19:08 -07:00
Greg Fischer
19d816c8c9
Merge pull request #3086 from jeremy-lunarg/hayes-fix-3073
Guard AppleClang linker options
2022-12-09 10:39:14 -07:00
Jeremy Hayes
586baa35a4 Guard AppleClang linker options
Fix #3073
2022-12-08 16:57:43 -07:00
Greg Fischer
ed257e2bdf
Merge pull request #3066 from ShchchowAMD/shaochi/bindless
[glslang][extension] Add support for ARB_bindless_texture.
2022-12-07 14:38:31 -07:00
Zhou
16526fd9d2 [glslang][EXT] Support extension ARB_bindless_texture.
Add missing callgraph clean for bindless status flag.

Add test cases. Add support to check special extensions not be available for Vulkan when using GLSL.
2022-12-07 13:32:39 +08:00
Greg Fischer
77551c429f
Merge pull request #3081 from jeremy-lunarg/hayes-update-changes
Update CHANGES for release 11.13.0
2022-12-06 15:34:33 -07:00
Greg Fischer
5f6fa4e792
Merge pull request #3080 from jeremy-lunarg/hayes-update-known-good
Update known_good.json
2022-12-06 15:33:42 -07:00
Jeremy Hayes
683c0f34f0 Update CHANGES for release 11.13.0 2022-12-06 14:50:41 -07:00
Jeremy Hayes
08cf7bd2ff Update known_good.json 2022-12-06 14:01:55 -07:00
Greg Fischer
e3e8baf8c5
Merge pull request #3079 from gby/GL_ARM_shader_core_builtins
GL_ARM_shader_core_builtins support
2022-12-06 13:11:57 -07:00
Gilad Ben-Yossef
0464ff4515 GL_ARM_shader_core_builtins support
Add support for GL_ARM_shader_core_builtins and SPV_ARM_core_builtins,
including initial tests
2022-12-05 14:15:47 +02:00
Johannes Kauffmann
a7603c132d Use nullptr where possible instead of NULL or 0 2022-11-30 09:33:28 -07:00
Johannes Kauffmann
728c689574 Include: PoolAlloc: do not rely on CMake define
On Windows, _DEBUG is defined by CMake if CMAKE_BUILD_TYPE is Debug. But
on other platforms, this is not the case and thus in debug mode, the
guard checks are not enabled.

Instead, rely on the NDEBUG define, which is always defined in release
mode (Release, RelWithDebInfo and MinSizeRel). This works reliably on
all platforms: It is also used to enable or disable assertions.
2022-11-29 14:58:29 -07:00
Greg Fischer
12bb8602dd
Merge pull request #3077 from greg-lunarg/edos3
Add EliminateDeadOutputStores to API.
2022-11-28 16:27:56 -07:00
Greg Fischer
7f047b986b Add EliminateDeadOutputStores to API.
Also eliminates dead output variables and unused output variable
components. Finally calls aggressive dead code elimination.

AnalyzeDeadOutputStores also supplied to be called on the following
shader to provide input for the Eliminate* function.
2022-11-28 15:09:41 -07:00
Greg Fischer
0cd93a0efe
Merge pull request #3076 from greg-lunarg/kg124
Update known goods
2022-11-28 13:27:56 -07:00
Greg Fischer
1ddba01a80 Update known goods 2022-11-28 12:06:59 -07:00
Sven-Hendrik Haase
88fd417b0b Fix locations of cmake files in side compat shims
In https://github.com/KhronosGroup/glslang/pull/3027, the installed cmake files were
stuck into a /cmake subdir but this isn't reflected in these compatibility shims.
2022-11-16 16:54:09 -07:00
Greg Fischer
2b2523fb95
Merge pull request #3061 from ShabbyX/remove-angle-build-flag
Remove GLSLANG_ANGLE
2022-11-08 14:46:48 -07:00
Shahbaz Youssefi
6b2493a4d8 Remove GLSLANG_ANGLE
ANGLE no longer links with glslang.  This change reverts
1ef2e250fc which added a flag to strip
glslang to reduce its binary size.  This flag is no longer needed.
2022-11-08 15:11:36 -05:00
Greg Fischer
f4cba22d08
Merge pull request #3060 from greg-lunarg/limit3
Fix include in resource_limits_c.h
2022-11-08 10:40:25 -07:00
Greg Fischer
cc4c7330a2 Fix include in resource_limits_c.h
Fixes #3059
2022-11-07 12:06:46 -07:00
Greg Fischer
5e08deae05
Merge pull request #3057 from ShabbyX/fix-gn-build
Fix gn build
2022-11-03 14:01:33 -06:00
Shahbaz Youssefi
1813a14af3 Fix gn build 2022-11-03 10:17:33 -04:00