John Kessenich [Thu, 24 Oct 2019 04:25:47 +0000 (22:25 -0600)]
Merge pull request #1947 from ehsannas/fix_licenses
Make buildbot licenses consistent with the rest of the code
Ehsan Nasiri [Wed, 23 Oct 2019 19:03:38 +0000 (15:03 -0400)]
Make buildbot licenses consistent with the rest of the code
John Kessenich [Wed, 23 Oct 2019 16:32:16 +0000 (10:32 -0600)]
Merge pull request #1946 from KhronosGroup/extend-web
Web: Extend with compute stage, SSBOs, and atomics on SSBO memory.
David Turner [Wed, 23 Oct 2019 14:07:19 +0000 (16:07 +0200)]
BUILD.gn: Fix fuchsia build (#1944)
The Fuchsia platform build and the Chromium one use a completely
different set of configs to specify default warnings. The previous
version of BUILD.gn worked with Chromium, but failed to build
with Fuchsia.
This CL fixes the issue by identifying said configs and reusing
them consistently.
Change-Id: I7de526a57d2f14eb93c03e06401d2c3059d35e9a
John Kessenich [Mon, 21 Oct 2019 12:55:11 +0000 (06:55 -0600)]
Web: Reclaim more space and make all work w/wo GLSLANG_WEB.
John Kessenich [Fri, 18 Oct 2019 07:03:11 +0000 (01:03 -0600)]
Web: Add basic atomics for SSBOs.
John Kessenich [Thu, 17 Oct 2019 13:08:40 +0000 (07:08 -0600)]
Web: Add SSBOs and a few other missing compute features.
John Kessenich [Thu, 10 Oct 2019 17:40:11 +0000 (11:40 -0600)]
Web: Add compute stage.
John Kessenich [Tue, 8 Oct 2019 07:12:07 +0000 (01:12 -0600)]
Web: Add separate texture/sampler, exclude *CubeArray*.
Looks like will add about 1K compressed size to executable footprint.
Timo Suoranta [Tue, 22 Oct 2019 04:38:04 +0000 (07:38 +0300)]
Enable generation of compile_commands.json (#1938)
David Dubois [Tue, 22 Oct 2019 04:31:44 +0000 (21:31 -0700)]
Fix the exports of glslang-default-resource-limits (#1942)
John Kessenich [Tue, 22 Oct 2019 04:30:13 +0000 (22:30 -0600)]
Merge pull request #1941 from ehsannas/bazel_build
Add Bazel build files and bots for them
Ehsan Nasiri [Fri, 18 Oct 2019 17:49:59 +0000 (13:49 -0400)]
Run tests on Windows too.
Ehsan Nasiri [Fri, 18 Oct 2019 16:25:59 +0000 (12:25 -0400)]
Fix build scripts.
Ehsan Nasiri [Fri, 18 Oct 2019 16:21:11 +0000 (12:21 -0400)]
More cleanups for Windows.
Ehsan Nasiri [Thu, 17 Oct 2019 20:12:43 +0000 (16:12 -0400)]
Add Kokoro bots for building using Bazel.
Ehsan Nasiri [Thu, 17 Oct 2019 19:14:20 +0000 (15:14 -0400)]
Make it work on Windows.
John Kessenich [Thu, 17 Oct 2019 18:12:44 +0000 (12:12 -0600)]
Merge pull request #1937 from jeffbolznv/volatile_atomics
Only apply volatile semantics to atomics when using Vulkan Memory Model
Jeff Bolz [Thu, 17 Oct 2019 16:22:57 +0000 (11:22 -0500)]
Only apply volatile semantics to atomics when using Vulkan Memory Model
Ehsan Nasiri [Wed, 16 Oct 2019 20:55:23 +0000 (16:55 -0400)]
Add Bazel build configuration files.
In order to avoid potential build failures that could arise from
SPIRV-Tools/Headers, and to avoid reading known_good.json, this build
configuration does not build the SPIRV-Tools dependency and hence cannot
perform HLSL compilation to SPIR-V.
John Kessenich [Thu, 17 Oct 2019 02:53:39 +0000 (20:53 -0600)]
Merge pull request #1933 from dj2/runtest
Make runtests configurable.
Dan Sinclair [Wed, 16 Oct 2019 17:08:48 +0000 (13:08 -0400)]
Use commandline options instead of ENV variables
John Kessenich [Wed, 16 Oct 2019 16:39:51 +0000 (10:39 -0600)]
Merge pull request #1932 from zoddicus/anotherSemiColonFix
Fix config issues and revert previous fixes for semi-colon issues
Ryan Harrison [Wed, 16 Oct 2019 15:46:37 +0000 (11:46 -0400)]
Keep code style improvements
John Kessenich [Wed, 16 Oct 2019 15:25:56 +0000 (09:25 -0600)]
Merge pull request #1934 from durswd/master
Added an option to make pch enabled in Cmake
dan sinclair [Wed, 16 Oct 2019 14:45:11 +0000 (10:45 -0400)]
Indenting
dan sinclair [Tue, 15 Oct 2019 23:11:39 +0000 (19:11 -0400)]
Update CMakeLists.txt
Dan Sinclair [Tue, 15 Oct 2019 20:47:28 +0000 (16:47 -0400)]
Move TARGETDIR as well
Dan Sinclair [Tue, 15 Oct 2019 19:21:21 +0000 (15:21 -0400)]
Make runtests configurable.
This CL allows setting the location of glslangValidator and spirv-remap
when calling the runtests script. A test target is added to CMake to
execute runtests and sets the location to the build folder for the two
applications.
Ryan Harrison [Tue, 15 Oct 2019 15:17:53 +0000 (11:17 -0400)]
Fix config issues and revert previous fixes for semi-colon issues
This reverts commit
41261d95a417bb3a121c162154d441433705a237.
This reverts commit
7c9accb6534d4cde050555b8091b434dc7e4d218.
Instead of trying to work around all of the potential semicolon issues
in glslang, making it conform to Chromium's style, mark the code
explicitly as non-chromium in the BUILD.gn, so chromium doesn't
attempt to enforce its style rules on glslang.
Fixes #1931
durswd [Tue, 15 Oct 2019 17:28:40 +0000 (02:28 +0900)]
Added an option to make pch enabled in Cmake
John Kessenich [Tue, 15 Oct 2019 10:25:20 +0000 (04:25 -0600)]
Merge pull request #1866 from rumblehhh/master
Export glslang targets on installation
John Kessenich [Tue, 15 Oct 2019 10:19:06 +0000 (04:19 -0600)]
Merge pull request #1930 from ux3d/fix/CMakeOptionalExternalBuild
find Python and add External subdir only if BUILD_EXTERNAL option was set
Fabian Wahlster [Tue, 15 Oct 2019 09:00:23 +0000 (11:00 +0200)]
find Python and add External subdir only if BUILD_EXTERNAL option was set (on by default) and /External dir exists
John Kessenich [Tue, 15 Oct 2019 05:08:26 +0000 (23:08 -0600)]
GLSL/SPV: Pre SPIR-V 1.5, subgroupQuadBroadcast index must be constant
John Kessenich [Sat, 12 Oct 2019 14:24:11 +0000 (08:24 -0600)]
Merge pull request #1880 from georgeouzou/master
Add support for GL_ARB_explicit_uniform_location
John Kessenich [Sat, 12 Oct 2019 14:22:34 +0000 (08:22 -0600)]
Merge pull request #1928 from Xottab-DUTY/patch-1
Fixed typo in README.md
georgeouzou [Sat, 12 Oct 2019 12:17:29 +0000 (15:17 +0300)]
remove redundant check
Xottab_DUTY [Sat, 12 Oct 2019 11:23:54 +0000 (16:23 +0500)]
Fixed typo in README.md
John Kessenich [Sat, 12 Oct 2019 07:55:15 +0000 (01:55 -0600)]
Merge pull request #1926 from zoddicus/fixChromiumRoll
Remove unnecessary semi-colons and add warning about them
Ryan Harrison [Fri, 11 Oct 2019 17:18:07 +0000 (13:18 -0400)]
Forgot that GCC doesn't recognize this flag
Ryan Harrison [Fri, 11 Oct 2019 15:00:57 +0000 (11:00 -0400)]
Remove unnecessary semi-colons and add warning about them
These are causing integration issues with Chromium down stream since
it is more strict about these.
John Kessenich [Fri, 11 Oct 2019 07:56:05 +0000 (01:56 -0600)]
Merge pull request #1888 from Roy-AMD/Adjusting-code-interface
Adjusting code interface
John Kessenich [Fri, 11 Oct 2019 07:24:26 +0000 (01:24 -0600)]
Merge pull request #1925 from greg-lunarg/kg107
Update spirv-tools known good.
John Kessenich [Fri, 11 Oct 2019 02:54:21 +0000 (20:54 -0600)]
Fix #1924: Promote SPV_EXT_physical_storage_buffer to KHR when required.
If the semantics that require the KHR form over the EXT form are seen
(OpBitcast between a vector and a pointer) promote the requested extension
from the EXT to the KHR.
Greg Fischer [Fri, 11 Oct 2019 01:57:01 +0000 (19:57 -0600)]
Update spirv-tools known good.
John Kessenich [Thu, 10 Oct 2019 18:01:13 +0000 (12:01 -0600)]
Fix #1924: Emit SPV_EXT_physical_storage_buffer, not the KHR form.
The KHR form comes along as part of 1.5, and otherwise should require
another form of request to emit it.
John Kessenich [Mon, 7 Oct 2019 03:58:40 +0000 (21:58 -0600)]
Merge pull request #1919 from dj2/install_spirv
Move install directory for SPIRV/ folder.
dan sinclair [Sun, 6 Oct 2019 14:00:37 +0000 (10:00 -0400)]
single line
dan sinclair [Fri, 4 Oct 2019 00:24:30 +0000 (20:24 -0400)]
Update appveyor and travis files
dan sinclair [Thu, 3 Oct 2019 23:35:44 +0000 (19:35 -0400)]
Move install directory for SPIRV/ folder.
Currently the SPIRV/ folder will get installed into the include
directory. This folder is part of GLSLang, so it makes more sense under
glslang/SPIRV.
Currently, GLSLang will install a SPIRV/ folder while spirv-headers will
install a spirv/ folder. This is confusing and will cause issues on a
case sensitive filesystem if both are installed at the same time.
John Kessenich [Thu, 3 Oct 2019 17:23:16 +0000 (11:23 -0600)]
Merge pull request #1918 from KhronosGroup/format-attributes
HLSL: Add attributes for image formats and nonreadable/nonwritable
John Kessenich [Mon, 30 Sep 2019 00:02:19 +0000 (18:02 -0600)]
HLSL: Fix #1912: add attribute syntax for nonreadable/nonwritable
John Kessenich [Fri, 27 Sep 2019 21:14:18 +0000 (15:14 -0600)]
HLSL: Fix #1912: add attribute syntax for overriding image formats.
John Kessenich [Wed, 25 Sep 2019 14:24:53 +0000 (08:24 -0600)]
Merge pull request #1906 from ShchchowAMD/master
Reflection will crash when the VS input symbol defines the same name with FS output symbol
John Kessenich [Fri, 20 Sep 2019 18:18:13 +0000 (12:18 -0600)]
Merge pull request #1910 from KhronosGroup/fix-1900-const-nonuniform
GLSL/SPV: Fix #1900: Drop const on literal when doing an object copy.
John Kessenich [Fri, 20 Sep 2019 12:01:42 +0000 (06:01 -0600)]
GLSL/SPV: Fix #1900: Drop const on literal when doing an object copy.
John Kessenich [Thu, 19 Sep 2019 15:12:52 +0000 (09:12 -0600)]
Merge pull request #1907 from kainino0x/separate-web-and-emscripten
Separate GLSLANG_WEB (min-size build) and Emscripten options
John Kessenich [Thu, 19 Sep 2019 06:21:38 +0000 (00:21 -0600)]
Merge pull request #1905 from KhronosGroup/GL_EXT_buffer_reference_uvec2
SPV_KHR_physical_storage_buffer/SPV: Add GL_EXT_buffer_reference_uvec2
John Kessenich [Wed, 18 Sep 2019 05:19:38 +0000 (23:19 -0600)]
SPV_KHR_physical_storage_buffer/SPV: Add GL_EXT_buffer_reference_uvec2
Adds uvec2 <-> reference constructor support.
Switches from EXT to KHR for physical_storage_buffer.
John Kessenich [Wed, 18 Sep 2019 08:38:10 +0000 (02:38 -0600)]
Merge pull request #1908 from digit-google/fuchsia-fixes
Fix Fuchsia build.
David 'Digit' Turner [Mon, 16 Sep 2019 17:13:16 +0000 (19:13 +0200)]
Fix Fuchsia build.
The Fuchsia build is very picky about newlines at the end of files
and will complain loudly about them. Removing the -Wnewline-eof
warning solves the issue.
John Kessenich [Wed, 18 Sep 2019 07:55:12 +0000 (01:55 -0600)]
Merge branch 'master' into separate-web-and-emscripten
Kai Ninomiya [Wed, 18 Sep 2019 06:53:30 +0000 (23:53 -0700)]
use custom es6 modularization instead of MODULARIZE=1
Kai Ninomiya [Wed, 18 Sep 2019 06:08:45 +0000 (23:08 -0700)]
Separate GLSLANG_WEB (min-size build) and Emscripten options
Allows building non-min-size builds with Emscripten.
Adds ENABLE_GLSLANG_WEB_DEVEL.
Moves the glslang.js files to OSDependent/Web.
Small cleanups and docs update.
John Kessenich [Wed, 18 Sep 2019 06:17:31 +0000 (00:17 -0600)]
README: Fix WASM typos.
John Kessenich [Wed, 18 Sep 2019 06:03:18 +0000 (00:03 -0600)]
HLSL: Fix #1903 Catch 0-argument case to constructors.
Chow [Wed, 18 Sep 2019 06:04:29 +0000 (14:04 +0800)]
Reflection will crash when the VS input symbol defines the same name with FS output symbol
[PURPOSE]:
The current process design for Uniform / Block / Pipe IO symbols reflection (during program linking) is as following :
1.1 using a global mapper called 'TNameToIndex' to store all the relationship of name (of symbols) to their indexes (in their own MapIndexToReflection vectors).
1.2 TNameToIndex mapper will be used during program linking and helps to check and merge duplicate symbols within each stage ( Uniform, Block and Pipe IO)
1.3 Different types of symbols will have their own index mapping storage. All those symbols will share TNameToIndex as a general searching mapper.
1.4 Only IN in first stage and OUT in last stage will be dealed within traversing functions.
Now, here we meet those problems:
2.1 In and Out variables for pipelines are mapping to different MapIndexToReflection vector (ioItems), but they may still have same names within the general symbol search mapper : TNameToIndex.
2.2 Then, when there are same symbols of IN in VS and OUT in FS, TNameToIndex could not tell the difference because it only stores one local index for one symbol (1:1) as a pair of KeyValue.
[What fixed]:
Seperate I/O from other symbols like Uniform and Block (it is wrong to keep them all in TNameToIndex), and save in new searching mappers called pipeInNameToIndex and pipeOutNameToIndex.
Expose new top-level functions defined as getReflectionPipeIOIndex and getPipeIOIndex for users who need to query Pipe I/O information (As they may reach those things through getUniformIndex and getReflectionIndex now, which is a confused way.)
As there are 2 mappers for above symbols, users needs to input second argument when they wanna reach those pipe I/O parameters, that's also why we need to modify GET functions either.
[Test Case]:
The shader is as following:
######### VS ############
layout(location = 0) in vec4 g_position;
layout(location = 1) in vec4 g_color;
out StageData {
vec4 color;
} g_vs_out;
void main() {
gl_Position = g_position;
g_vs_out.color = g_color;
}
########### FS #############
in StageData {
vec4 color;
} g_fs_in;
layout(location = 0) out vec4 g_color;
void main() {
g_color = g_fs_in.color;
}
John Kessenich [Wed, 18 Sep 2019 05:18:20 +0000 (23:18 -0600)]
Merge pull request #1902 from jeffbolznv/extended_types
Add GL_EXT_shader_subgroup_extended_types support
Jeff Bolz [Sun, 8 Sep 2019 13:49:18 +0000 (08:49 -0500)]
Add GL_EXT_shader_subgroup_extended_types support
John Kessenich [Mon, 16 Sep 2019 15:33:59 +0000 (09:33 -0600)]
Merge pull request #1899 from KhronosGroup/SPIR-V_1.5
Branch to support SPIR-V 1.5 changes
John Kessenich [Wed, 28 Aug 2019 06:01:54 +0000 (00:01 -0600)]
GLSL: Only require constant for subgroupBroadcast when SPV < 1.5.
John Kessenich [Mon, 19 Aug 2019 05:58:08 +0000 (23:58 -0600)]
SPV: Support SPIR-V 1.5; five extensions no longer need OpExtension.
The generalization to addIncorporatedExtension() also fixed a 1.3
corner case with SPV_KHR_16bit_storage.
John Kessenich [Mon, 16 Sep 2019 12:35:12 +0000 (06:35 -0600)]
Merge pull request #1894 from ShchchowAMD/master
Add flags for local size values ( compute shader )
Chow [Mon, 9 Sep 2019 05:24:24 +0000 (13:24 +0800)]
Add flags for local size values ( compute shader )
Purpose :
According to GLSL SPEC 4.6 ( 4.4.1.4 Compute Shader Inputs), for compute shader input qualifiers, we should declare such qualifiers with same values in the same shader (local_size_x, y and z).
"If such a layout qualifier is declared more than once in the same shader, all those declarations must set the same set of local work-group sizes and set them to the same values; otherwise a compile-time error results."
Why this fix:
If we manually set "local_size_x = 1" and directly following a declaration like "local_size_x = 2", this would not be detected. That is because currently we treat all the '1' as default value and could not restrictly detect whether those are default values.
Test case:
......
layout(local_size_x=1) in;
layout(local_size_x=2) in;
......
So I add test cases for this fix:
1. set local_size_y = 1 => success
2. set local_size_y = 2 => error
3. set local_size_y = 1 => success
John Kessenich [Fri, 13 Sep 2019 15:32:00 +0000 (09:32 -0600)]
SPV 1.5: Switch to the 1.5 header, for SPIR-V 1.5.
John Kessenich [Thu, 12 Sep 2019 14:40:57 +0000 (08:40 -0600)]
Merge pull request #1897 from dj2/unused
Comment out unused params; Fix type warning.
John Kessenich [Wed, 11 Sep 2019 18:08:08 +0000 (12:08 -0600)]
Merge pull request #1895 from amdrexu/bugfix
Fix incorrect function prototypes of 64-bit findLSB/findMSB
Dan Sinclair [Wed, 11 Sep 2019 12:58:48 +0000 (08:58 -0400)]
Comment out params instead of removing
Dan Sinclair [Tue, 10 Sep 2019 19:39:22 +0000 (15:39 -0400)]
Remove unused params
Rex Xu [Mon, 9 Sep 2019 14:53:02 +0000 (22:53 +0800)]
Fix incorrect function prototypes of 64-bit findLSB/findMSB
According to the 32-bit counterparts, their forms should be
genI64Type findLSB(genI64Type value)
genI64Type findLSB(genU64Type value)
genI64Type findMSB(genI64Type value)
genI64Type findMSB(genU64Type value)
John Kessenich [Thu, 5 Sep 2019 08:26:39 +0000 (02:26 -0600)]
Fix #1879: Check for valid variable before checking for unsized arrays.
The order of error checking was not quite being correct (maybe there is no correct
ordering, when many checks must be done and they affect each other).
So, check for block-name reuse twice.
John Kessenich [Thu, 5 Sep 2019 02:49:12 +0000 (20:49 -0600)]
Merge pull request #1892 from greg-lunarg/kg106
Update spirv-tools and spriv-headers known good.
Greg Fischer [Wed, 4 Sep 2019 20:15:57 +0000 (14:15 -0600)]
Update spirv-tools and spriv-headers known good.
Roy [Wed, 4 Sep 2019 03:37:56 +0000 (11:37 +0800)]
Fix code style issue and remove setXfbBufferStride new paramte
1. Keep the curly braces style.
2. revert a Improper change
John Kessenich [Tue, 3 Sep 2019 09:02:13 +0000 (03:02 -0600)]
Merge pull request #1889 from Roy-AMD/code-refine
Code refine
Roy [Mon, 2 Sep 2019 09:07:39 +0000 (17:07 +0800)]
code refine
Reduce the number of cycles.
Roy [Mon, 2 Sep 2019 07:01:06 +0000 (15:01 +0800)]
Adjusting code interface
glslang/include/intermediate.h -> Add a new interface to set TIntermBranch's expression.
glslang/include/Types.h -> Add interface to set Type's basicType and add interface to get basicType form a TSampler.
glslang/MachineIndependent/intermediate.cpp -> Part of the code in createConversion been encapsulating as a new function called buildConvertOp
glslang/MachineIndependent/localintermediate.h -> Export createConversion and
buildConvertOp as a public function
glslang/Public/ShaderLang.h -> Add interface to get shader object and shader source.
Roy.li [Mon, 2 Sep 2019 03:58:14 +0000 (11:58 +0800)]
Merge pull request #6 from Roy-AMD/sync
Sync code
Roy.li [Mon, 2 Sep 2019 03:56:45 +0000 (11:56 +0800)]
Merge pull request #5 from KhronosGroup/master
Sync code from KhronosGroup/glslang master
John Kessenich [Fri, 30 Aug 2019 15:53:35 +0000 (09:53 -0600)]
Placeholder fix for part of #1870.
Also fixes, in practice, https://github.com/KhronosGroup/GLSL/issues/83.
When the specification language is correctly created, glslang can be
revisited for correctness. In the meantime, this seems like the best
"bug" to have relative to the specification.
Memory qualifiers are only relevant to parameters when they apply
to what the argument points to, as otherwise the argument is copied.
This leaves the fix from #1870 in place, and then more correctly
ignores memory qualifiers when something will be passed by copy.
John Kessenich [Fri, 30 Aug 2019 15:51:06 +0000 (09:51 -0600)]
Non-functional: Make whitespace/braces consistent for a recent commit.
John Kessenich [Thu, 29 Aug 2019 04:44:15 +0000 (22:44 -0600)]
Merge pull request #1885 from zoddicus/fixUnInitializedVariableWarnings
Initialize variable to avoid uninitialized variable warnings in Clang
Ryan Harrison [Wed, 28 Aug 2019 17:15:15 +0000 (13:15 -0400)]
Change to initializing the variable
Ryan Harrison [Wed, 28 Aug 2019 15:25:12 +0000 (11:25 -0400)]
Return nullptr after assert to avoid uninitialized variables
In the current version of the code on non-debug builds these cases
will fallthrough, since assert is a no-op, and eventually make a call
passing in |op| which hasn't been initialized. clang is currently
throwing a warning about this behaviour when integrating downstream.
This patch changes the behaviour, so that in any branch that has an
assert now has a return nullptr, to indicate failure after it and
avoid the uninitialized variable usage.
John Kessenich [Wed, 28 Aug 2019 10:10:00 +0000 (04:10 -0600)]
Merge pull request #1876 from jeffbolznv/imma
GL_NV_integer_cooperative_matrix support
John Kessenich [Wed, 28 Aug 2019 08:51:38 +0000 (02:51 -0600)]
ESSL/SPV: Fix #1856: Allow ESSL shaders to compile to OpenGL SPIR-V.
John Kessenich [Wed, 28 Aug 2019 08:25:26 +0000 (02:25 -0600)]
Documentation: Provide more detail in setting up the environment.
John Kessenich [Tue, 27 Aug 2019 13:37:09 +0000 (07:37 -0600)]
Merge pull request #1883 from Kangz/fix_gn
BUILD.gn: Add missing HLSL files.
Corentin Wallez [Tue, 27 Aug 2019 13:24:31 +0000 (15:24 +0200)]
BUILD.gn: Add missing HLSL files.