Commit Graph

3456 Commits

Author SHA1 Message Date
John Kessenich
765cee8441 GLSL/SPV: Pre SPIR-V 1.5, subgroupQuadBroadcast index must be constant 2019-10-14 23:08:26 -06:00
John Kessenich
101ca388fb
Merge pull request #1880 from georgeouzou/master
Add support for GL_ARB_explicit_uniform_location
2019-10-12 08:24:11 -06:00
John Kessenich
469d27f2e5
Merge pull request #1928 from Xottab-DUTY/patch-1
Fixed typo in README.md
2019-10-12 08:22:34 -06:00
georgeouzou
01a5047373 remove redundant check 2019-10-12 15:17:29 +03:00
Xottab_DUTY
3c8b4daabd
Fixed typo in README.md 2019-10-12 16:23:54 +05:00
John Kessenich
a100258857
Merge pull request #1926 from zoddicus/fixChromiumRoll
Remove unnecessary semi-colons and add warning about them
2019-10-12 01:55:15 -06:00
Ryan Harrison
41261d95a4 Forgot that GCC doesn't recognize this flag 2019-10-11 13:18:07 -04:00
Ryan Harrison
7c9accb653 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.
2019-10-11 11:25:04 -04:00
John Kessenich
696703800e
Merge pull request #1888 from Roy-AMD/Adjusting-code-interface
Adjusting code interface
2019-10-11 01:56:05 -06:00
John Kessenich
f99beb50a3
Merge pull request #1925 from greg-lunarg/kg107
Update spirv-tools known good.
2019-10-11 01:24:26 -06:00
John Kessenich
ee8e9c1522 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.
2019-10-10 20:54:21 -06:00
Greg Fischer
39ced690d6 Update spirv-tools known good. 2019-10-10 19:57:01 -06:00
John Kessenich
1ff0c181bb 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.
2019-10-10 12:01:13 -06:00
John Kessenich
4b97a11081
Merge pull request #1919 from dj2/install_spirv
Move install directory for SPIRV/ folder.
2019-10-06 21:58:40 -06:00
dan sinclair
78ba2510b8 single line 2019-10-06 10:00:37 -04:00
dan sinclair
c13e0f1e99 Update appveyor and travis files 2019-10-03 20:24:30 -04:00
dan sinclair
7b0e236325 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.
2019-10-03 19:35:44 -04:00
John Kessenich
135e3e35ea
Merge pull request #1918 from KhronosGroup/format-attributes
HLSL: Add attributes for image formats and nonreadable/nonwritable
2019-10-03 11:23:16 -06:00
John Kessenich
8a97d38913 HLSL: Fix #1912: add attribute syntax for nonreadable/nonwritable 2019-09-29 19:16:25 -06:00
John Kessenich
2d9b0a3550 HLSL: Fix #1912: add attribute syntax for overriding image formats. 2019-09-28 11:39:15 -06:00
John Kessenich
7bc047326e
Merge pull request #1906 from ShchchowAMD/master
Reflection will crash when the VS input symbol defines the same name with FS output symbol
2019-09-25 08:24:53 -06:00
John Kessenich
973d0e5382
Merge pull request #1910 from KhronosGroup/fix-1900-const-nonuniform
GLSL/SPV: Fix #1900: Drop const on literal when doing an object copy.
2019-09-20 12:18:13 -06:00
John Kessenich
c2fafea970 GLSL/SPV: Fix #1900: Drop const on literal when doing an object copy. 2019-09-20 06:08:49 -06:00
John Kessenich
f7a48b153f
Merge pull request #1907 from kainino0x/separate-web-and-emscripten
Separate GLSLANG_WEB (min-size build) and Emscripten options
2019-09-19 09:12:52 -06:00
John Kessenich
caca1d1cc4
Merge pull request #1905 from KhronosGroup/GL_EXT_buffer_reference_uvec2
SPV_KHR_physical_storage_buffer/SPV: Add GL_EXT_buffer_reference_uvec2
2019-09-19 00:21:38 -06:00
John Kessenich
90e402f42b 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.
2019-09-18 23:52:36 -06:00
John Kessenich
4b5159ea81
Merge pull request #1908 from digit-google/fuchsia-fixes
Fix Fuchsia build.
2019-09-18 02:38:10 -06:00
David 'Digit' Turner
9d43c7f393 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.
2019-09-18 10:35:11 +02:00
John Kessenich
d0848b72fa
Merge branch 'master' into separate-web-and-emscripten 2019-09-18 01:55:12 -06:00
Kai Ninomiya
230117a02c use custom es6 modularization instead of MODULARIZE=1 2019-09-18 00:04:09 -07:00
Kai Ninomiya
4391924ac5 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.
2019-09-17 23:18:03 -07:00
John Kessenich
e0932f676d README: Fix WASM typos. 2019-09-18 00:17:31 -06:00
John Kessenich
54c72c6d24 HLSL: Fix #1903 Catch 0-argument case to constructors. 2019-09-18 00:04:57 -06:00
Chow
f4b2ba2c27 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;
}
2019-09-18 14:04:29 +08:00
John Kessenich
e4e56bcf86
Merge pull request #1902 from jeffbolznv/extended_types
Add GL_EXT_shader_subgroup_extended_types support
2019-09-17 23:18:20 -06:00
Jeff Bolz
c5b669e04c Add GL_EXT_shader_subgroup_extended_types support 2019-09-17 23:44:27 -05:00
John Kessenich
be467db7bd
Merge pull request #1899 from KhronosGroup/SPIR-V_1.5
Branch to support SPIR-V 1.5 changes
2019-09-16 09:33:59 -06:00
John Kessenich
f766fabaa0 GLSL: Only require constant for subgroupBroadcast when SPV < 1.5. 2019-09-16 07:16:41 -06:00
John Kessenich
8317e6c683 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.
2019-09-16 07:14:10 -06:00
John Kessenich
8b8adf79c1
Merge pull request #1894 from ShchchowAMD/master
Add flags for local size values ( compute shader )
2019-09-16 06:35:12 -06:00
Chow
352e668a6d 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
2019-09-16 16:39:54 +08:00
John Kessenich
aaff6cddd0 SPV 1.5: Switch to the 1.5 header, for SPIR-V 1.5. 2019-09-13 09:32:00 -06:00
John Kessenich
fe0b2bd694
Merge pull request #1897 from dj2/unused
Comment out unused params; Fix type warning.
2019-09-12 08:40:57 -06:00
John Kessenich
fdd13ca10f
Merge pull request #1895 from amdrexu/bugfix
Fix incorrect function prototypes of 64-bit findLSB/findMSB
2019-09-11 12:08:08 -06:00
Dan Sinclair
23e9f5ca74 Comment out params instead of removing 2019-09-11 08:59:47 -04:00
Dan Sinclair
24a5d23d5a Remove unused params 2019-09-10 15:39:22 -04:00
Rex Xu
3b1b9e2957 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)
2019-09-09 22:53:02 +08:00
John Kessenich
664ad418f8 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.
2019-09-05 02:30:27 -06:00
John Kessenich
34953810a6
Merge pull request #1892 from greg-lunarg/kg106
Update spirv-tools and spriv-headers known good.
2019-09-04 20:49:12 -06:00
Greg Fischer
d6df1fb13f Update spirv-tools and spriv-headers known good. 2019-09-04 14:15:57 -06:00