Commit Graph

4025 Commits

Author SHA1 Message Date
lriki
1ee750aed5 Add pack_matrix test 2020-06-25 17:54:16 +09:00
lriki
3cae3c4da8 HLSL: Fix #pragma pack_matrix(row_major) not work on global uniforms 2020-06-25 16:10:00 +09:00
Ben Clayton
40e1ae11f4 Kokoro: Split linux cmake cfgs into static/shared
Allows for testing of generation of both static libraries and shared objects.

The old configs are staying in place until I'm confident everything is working correctly.

Issues: #1421, #1484, #2283
2020-06-24 14:16:17 +01:00
John Kessenich
fbb9dc2cf1
Merge pull request #2285 from proydakov/msvc-rtti-compilation-warning-fix
Fixed msvc 2019 nmake compiler warnings with RTTI.
2020-06-24 02:53:45 -06:00
Evgeny Proydakov
b90adef928 Fixed msvc 2019 nmake compiler warnings with RTTI.
By default cmake generates cxx_flags with `/GR` parameter.
I updated CMAKE_CXX_FLAGS string and replaced `/GR` -> `/GR-`

How to reproduce:

Visual Studio 2019 x64 command port

mkdir build-msvc2019
cd build-msvc2019
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=install ..
nmake

COMPILATION BEFORE:

Scanning dependencies of target OSDependent
[  1%] Building CXX object glslang/OSDependent/Windows/CMakeFiles/OSDependent.dir/ossource.cpp.obj
cl : Command line warning D9025 : overriding '/GR' with '/GR-'
ossource.cpp
[  3%] Linking CXX static library OSDependent.lib
[  3%] Built target OSDependent
Scanning dependencies of target OGLCompiler
[  4%] Building CXX object OGLCompilersDLL/CMakeFiles/OGLCompiler.dir/InitializeDll.cpp.obj
cl : Command line warning D9025 : overriding '/GR' with '/GR-'
InitializeDll.cpp
[  6%] Linking CXX static library OGLCompiler.lib
[  6%] Built target OGLCompiler
Scanning dependencies of target glslang
[  7%] Building CXX object glslang/CMakeFiles/glslang.dir/MachineIndependent/glslang_tab.cpp.obj
cl : Command line warning D9025 : overriding '/GR' with '/GR-'
glslang_tab.cpp
[  9%] Building CXX object glslang/CMakeFiles/glslang.dir/MachineIndependent/attribute.cpp.obj
cl : Command line warning D9025 : overriding '/GR' with '/GR-'

FLAGS BEFORE:

-- CMAKE_C_FLAGS:   /DWIN32 /D_WINDOWS /W3
-- CMAKE_CXX_FLAGS: /DWIN32 /D_WINDOWS /W3 /GR /EHsc
-- CMAKE_CXX_FLAGS_DEBUG:   /MDd /Zi /Ob0 /Od /RTC1
-- CMAKE_CXX_FLAGS_RELEASE: /MD /O2 /Ob2 /DNDEBUG

COMPILATION AFTER:

[  1%] Building CXX object glslang/OSDependent/Windows/CMakeFiles/OSDependent.dir/ossource.cpp.obj
ossource.cpp
[  3%] Linking CXX static library OSDependent.lib
[  3%] Built target OSDependent
[  4%] Building CXX object OGLCompilersDLL/CMakeFiles/OGLCompiler.dir/InitializeDll.cpp.obj
InitializeDll.cpp
[  6%] Linking CXX static library OGLCompiler.lib
[  6%] Built target OGLCompiler
[  7%] Building CXX object glslang/CMakeFiles/glslang.dir/MachineIndependent/glslang_tab.cpp.obj
glslang_tab.cpp
[  9%] Building CXX object glslang/CMakeFiles/glslang.dir/MachineIndependent/attribute.cpp.obj

FLAGS AFTER:

-- CMAKE_C_FLAGS:   /DWIN32 /D_WINDOWS /W3
-- CMAKE_CXX_FLAGS: /DWIN32 /D_WINDOWS /W3 /GR- /EHsc
-- CMAKE_CXX_FLAGS_DEBUG:   /MDd /Zi /Ob0 /Od /RTC1
-- CMAKE_CXX_FLAGS_RELEASE: /MD /O2 /Ob2 /DNDEBUG
2020-06-23 22:02:34 +03:00
John Kessenich
8397044502
Merge pull request #2260 from gnl21/not-equal
Use OpFUnordNotEqual for floating-point !=
2020-06-22 05:35:20 -06:00
Graeme Leese
182ab460d9 Update test expected files with new magic number
Updating the SPIR-V generator version number changes the output of all
the SPIR-V tests.
2020-06-22 11:49:38 +01:00
Graeme Leese
060882fd37 Update SPIR-V generator version
Change to 10 to reflect the change to generating unordered !=
operations.
2020-06-22 11:03:46 +01:00
Graeme Leese
ff4b156e91 Update test results to expect OpFUnordNotEqual 2020-06-22 10:59:34 +01:00
Graeme Leese
65ce566cbc Use OpFUnordNotEqual for floating-point !=
The normal IEEE not equal operation tests whether operands are unordered
or not equal (so comparison with a NaN returns true). This corresponds
to the SPIR-V OpFUnordNotEqual, so change to using that.
2020-06-22 10:59:33 +01:00
John Kessenich
adacba3ee9
Update README.md 2020-06-22 01:44:53 -06:00
John Kessenich
b97d7669bc
Merge pull request #2278 from ShabbyX/master
Add -g0 command line argument
2020-06-22 01:08:52 -06:00
John Kessenich
e20ac35adb
Merge pull request #2281 from ben-clayton/moar-kokoro
Add more Kokoro configurations
2020-06-19 09:43:49 -06:00
Ben Clayton
b2a4399dcc Add kokoro configs for android-ndk and cmake 2020-06-19 15:34:31 +01:00
Ben Clayton
ca17b723fb Switch ndk_test from gnustl_static to c++_static
gnustl_static is no longer supported.
2020-06-19 12:35:57 +01:00
Shahbaz Youssefi
d52dce5067
Add -g0 command line argument
Analogous to gcc, -g0 would strip all debug info.  This is done
regardless of whether optimizations are enabled.

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
2020-06-18 10:16:40 -04:00
John Kessenich
051c6fed88 Build: use better MSVC subfolder names for the previous build changes. 2020-06-16 07:47:48 -06:00
John Kessenich
b247cfcd59
Merge pull request #2275 from ben-clayton/mv-hlsl
Move hlsl/ source to glslang/HLSL/
2020-06-16 06:26:17 -06:00
John Kessenich
abd91adf9d Bump version numbers. 2020-06-16 06:22:56 -06:00
Ben Clayton
f49820dd6b Move hlsl/ source to glslang/HLSL/
Now that the HLSL source files are part of the `glslang` target (#2271), it makes sense for these to sit in the `glslang` directory.

Changed the case of the directory from `hlsl` to `HLSL` to better match the sibling directories.
2020-06-16 11:55:28 +01:00
John Kessenich
4928d556e6
Merge pull request #2271 from ben-clayton/fold-hlsl
Untangle build target cyclic dependencies (approach #2)
2020-06-16 04:20:32 -06:00
John Kessenich
bd392c639e Bump version. 2020-06-16 04:18:48 -06:00
Ben Clayton
dcad9ad056 CMake: Fold HLSL source into glslang
... and stub the HLSL target.

Fixes the building of shared libraries.

This breaks the cyclic dependency between the `glslang` and `hlsl` targets (by essentially removing the `hlsl` target).

The `BUILD.gn` and `BUILD.bazel` build rules already pull the `HLSL` source into the `glslang` target.

`Android.mk` is the only remaining build config that has a dedicated `HLSL` target, but this is explicity static and does not suffer the same link-time issues with the cyclic dependency (we may wish to stub this target too).

Related issue: #1484, #2147
Related PR: #2267
2020-06-16 10:46:06 +01:00
dan sinclair
00965b9fa9
Remove unused variable. (#2273)
The `isMat` variable is no longer used in the HLSL parser. Removed.
2020-06-15 12:10:44 -06:00
Ryan Harrison
8496b782fb
Remove unused function, BaseTypeName (#2272) 2020-06-15 10:58:02 -06:00
John Kessenich
a58978ac9a HLSL: Remove support for having GLSL versions of HLSL intrinsics.
Related to PR #2265.
2020-06-15 10:28:09 -06:00
rdb
ebf55a0711
HLSL: Fix incorrect case in name of DX9-style cube sampler type (#2265) 2020-06-15 06:39:43 -06:00
Ben Clayton
1a6c8ecb20 C Interface: Split SPIR-V C interface to own file
This breaks a cyclic dependency between the SPIRV and glslang build targets.
2020-06-15 13:22:19 +01:00
Ben Clayton
b919bc889e
Fix signed / unsigned mismatch warning (#2266) 2020-06-10 21:41:47 -06:00
John Kessenich
3641ff7378 Bump code gen version, due to removal of OpEntryPoint operands. 2020-06-10 07:40:56 -06:00
John Kessenich
c30d335377 Fix #2264: OpEntryPoint incorrectly including function parameters. 2020-06-10 07:17:11 -06:00
Ryan Harrison
68b2e15ee0
Use correct type for var storing returned value (#2263) 2020-06-09 10:01:43 -06:00
Roy.li
08328fea5a
Fix xfb stride limit issue (#2088)
* Fix xfb_stride limit issue

Unsized array can't apply to transform trace. layout qualifier "offset" require GL_ARB_enhanced_layouts enable or glsl core version > 440.

* Add negative test for xfb limit

* update case result

* Fix compile information issue

Fix compile information issue and test comment issue.

* remove es profile condition, use profileRequires to limit.

* Fix xfb_stride limit issue

Unsized array can't apply to transform trace. layout qualifier "offset" require GL_ARB_enhanced_layouts enable or glsl core version > 440.
Add negative test for xfb limit

* Move es profile check out of version number check

* Adjust error information and related cases

remove the new version check, refine original version check.

* Revert condition for vulkan, and remove redundant test code.
2020-06-09 02:30:14 -06:00
Chow
8111268575
Add Shared/Std140 SSBO process & top-level array elements related (#2231)
* Add Shared/Std140 SSBO process & top-level array elements related
process

1.Add process options for shared/std140 ssbo, following ubo process
2.Add IO Variables reflection option, would keep all input/output
variables in reflection
3.Add Top-level related process, fix top-level array size issues,
following spec
4.Split ssbo/ubo reflection options, merge blowup expanding all into
function blowupActiveAggregate to allow other functions keep same entry
format.

Add options in StandAlone and test symbols.

1. Add options in StandAlone for std140/shared ubo/ssbo and all io variables reflection.
2. Add test for ssbo. When EShReflectionSharedStd140SSBO turns on, generated symbol and output would be different, to remind the difference. Defaultly disabled and nothing would change, nor blocking normal test.

* Add options in runtest script, refresh test results.

Add options in StandAlone:
--reflect-all-io-variables --reflect-shared-std140-ubo --reflect-shared-std140-ssbo

refresh test results.
Now the index, size of unsized array are expected.
2020-06-04 01:47:18 -06:00
Alejandro Piñeiro
ff6dcca575
spirv: Support initializers on uniforms (#1588)
If a uniform has an initializer it will now be given as the optional
initializer operand to the OpVariable instruction.

Fixes: https://github.com/KhronosGroup/glslang/issues/1259

Signed-off-by: Neil Roberts <nroberts@igalia.com> (the code)
Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com> (the tests)
Signed-off-by: Arcady Goldmints-Orlov <agoldmints@igalia.com>

Co-authored-by: Neil Roberts <nroberts@igalia.com>
2020-06-04 01:39:31 -06:00
Ricardo Garcia
232ba0d848
Add SPIR-V capabilities needed for spec constants (#2199)
Fixes #2198.
2020-06-03 07:52:55 -06:00
rdb
78a3c915a1
HLSL: Add better diagnostic when using in/out qualifiers in global scope (#2258) 2020-06-02 00:32:35 -06:00
rdb
b56e0e441b
HLSL: Recognize POSITION semantic et al in DX9 compatibility mode (#2255) 2020-06-02 00:30:50 -06:00
rdb
d8edfd8e66
HLSL: fix handling of uniform qualifier in entry point parameters (#2254)
* HLSL: Fix handling of uniforms in entry point parameters

* HLSL: fix handling of "uniform in"

* Tests: Update baseResults of hlsl.function.frag.out for #2254

* HLSL: fix uniforms in function parameters for opaque types
2020-06-02 00:30:07 -06:00
alelenv
999d4fdcdd
Add default descriptorset decoration for acceleration structure (#2257)
variables.
2020-06-02 00:24:41 -06:00
John Kessenich
0cc27fb68c Update news for header location change and recommendation. 2020-06-01 23:24:37 -06:00
dan sinclair
f15982ebeb
Remove install to the SPIRV/ folder. (#2256)
This CL updates the build scripts to only install to glslang/SPIRV
instead of also installing to the SPIRV/ folder. The deprecation notice
is also removed.

Note, this may cause downstream build issues if include directories have
not been updated

Fixes #1964 #2216
2020-06-01 23:21:03 -06:00
alelenv
d39b8afc47
EXT_ray_tracing requires spv1.4 (#2237)
* EXT_ray_tracing requires spv1.4

* Fix typo.

* Add extension data table.

* Updated feedback #2.
2020-05-28 09:18:07 -06:00
nihui
d0c9129d2f
fix warning unused parameter in release build (#2251) 2020-05-28 06:12:01 -06:00
greg-lunarg
e00d27c6d6
Fix missing patch decoration for TessFactor PCF arg (#2249)
Fixes #1553
2020-05-27 22:12:42 -06:00
greg-lunarg
41f62a81ab
Update SPIRV-Tools to stable. Also SPIRV-Headers to TOT. (#2250) 2020-05-27 22:10:36 -06:00
alan-baker
2b0eafb1de
Update spirv tools (#2246)
* Update known good SPIRV-Tools

* Update test expectations
2020-05-25 10:18:42 -06:00
David Neto
2cf9621d6d
Reorder member init to match decl order (#2241)
Fixes field reorder warning.
2020-05-21 09:17:30 -06:00
alelenv
59216d5cd8
Add support for primitive culling layout qualifier. (#2220)
* Add support for primitive culling layout qualifier.

* Add error checks for primitive flags and negative test.
2020-05-21 05:38:41 -06:00
Ryan Harrison
eba1389a01
Replace incorrect uint32_t with correct int vars (#2235) 2020-05-21 05:37:13 -06:00