Commit Graph

913 Commits

Author SHA1 Message Date
Bill Hollings
d461ca03cc Merge branch 'master' of https://github.com/brenwill/SPIRV-Cross 2017-08-11 14:56:28 -04:00
Bill Hollings
77f5812c55 Fix issue #239: compilation of shaders-msl/frag/texture-proj-shadow.frag.
Remove unsupported sampler1DShadow from shaders-msl/frag/texture-proj-shadow.frag.
Improve error message response from unsupported depth texture formats.
Fix several integer cast warnings in unrelated code.
Run ./format_all.sh on unrelated files.
2017-08-11 14:54:58 -04:00
Bill Hollings
62d12b1e4a Fix compilation issue with shaders-msl/frag/texture-proj-shadow.frag.
Remove unsupported Depth1D texture from shaders-msl/frag/texture-proj-shadow.frag.
Improve error message response from unsupported depth texture formats.
Fix several integer cast warnings in unrelated code.
Run ./format_all.sh on unrelated files.
2017-08-11 14:52:14 -04:00
Hans-Kristian Arntzen
6cda7f120b Merge pull request #246 from KhronosGroup/fix-241
Unify vertex clip-coord fixups.
2017-08-11 12:42:10 +02:00
Hans-Kristian Arntzen
dd4c5ce068 Merge pull request #252 from brenwill/master
CompilerMSL enhancements.
2017-08-11 12:41:24 +02:00
Bill Hollings
730257cf67 Merge upstream 2017-08-10 17:27:01 -04:00
Hans-Kristian Arntzen
9dbbe7c3d7 Merge pull request #251 from KhronosGroup/fix-250
Preserve arguments with inout unless complete writes are made.
2017-08-09 17:33:11 +02:00
Hans-Kristian Arntzen
744d0405b0 Preserve arguments with inout unless complete writes are made. 2017-08-09 17:06:41 +02:00
Hans-Kristian Arntzen
14cd000f3d Merge pull request #247 from KhronosGroup/fix-244
Support OpConstantNull.
2017-08-03 14:55:41 +02:00
Hans-Kristian Arntzen
48ccde3779 Support OpConstantNull. 2017-08-03 14:32:29 +02:00
Hans-Kristian Arntzen
bdfa97a1cf Unify vertex clip-coord fixups.
The different options were scattered around in different backends and
didn't really work right with CLI at all.
2017-08-03 13:02:59 +02:00
Hans-Kristian Arntzen
98b0c29f9d Merge pull request #243 from KhronosGroup/fix-242
Declare undefined variables (OpUndef) upfront.
2017-08-02 12:13:05 +02:00
Hans-Kristian Arntzen
a4fafa0607 Fix edge-case where do/while body is a dominator.
Shows up quite a lot in inlined code, should get more test coverage in
this area ...
2017-08-02 11:58:24 +02:00
Hans-Kristian Arntzen
2abdc135c3 Declare undefined values up front.
They might potentially be used as part of OpStore in the SPIRV-Tools
inliner in some cases.

Implement these as declared variables but without any initializer.
2017-08-02 10:33:03 +02:00
Hans-Kristian Arntzen
8f4bbdeb0c Merge pull request #237 from KhronosGroup/fix-236
Fix spurious struct type aliasing in stripped binaries.
2017-07-31 12:00:29 +02:00
Hans-Kristian Arntzen
f7b300d31e Merge pull request #240 from KhronosGroup/fix-222
Do not emit layout(location) qualifiers for older GLSL targets.
2017-07-31 11:31:46 +02:00
Hans-Kristian Arntzen
56e71c1dad Do not emit layout(location) qualifiers for older GLSL targets.
ESSL 300 and GLSL <410 do not support this along with legacy targets.
2017-07-31 11:17:02 +02:00
Hans-Kristian Arntzen
dea2ee7f29 Merge pull request #238 from KhronosGroup/fix-221
Fix textureProj with shadow on GLSL.
2017-07-31 10:23:19 +02:00
Hans-Kristian Arntzen
f337e50844 Remove MSL textureProj test shader. Need to sort it out later. 2017-07-31 10:16:07 +02:00
Hans-Kristian Arntzen
cbcaca5a39 Fix textureProj with shadow on GLSL. 2017-07-31 10:05:32 +02:00
Hans-Kristian Arntzen
818c1bea21 Fix spurious struct type aliasing in stripped binaries.
Should not consider aliasing when names are stripped.
2017-07-31 09:31:20 +02:00
Hans-Kristian Arntzen
24c35e3fb3 Merge pull request #235 from KhronosGroup/hlsl-spec-constant
Declare specialization constants in HLSL.
2017-07-30 06:32:20 +02:00
Hans-Kristian Arntzen
0817869797 Merge pull request #234 from KhronosGroup/member-name-fix
Fix default member name implementation.
2017-07-30 06:32:12 +02:00
Hans-Kristian Arntzen
98c76eed69 Declare specialization constants in HLSL. 2017-07-29 22:13:27 +02:00
Hans-Kristian Arntzen
dbaaf1b69e Add test for default member names. 2017-07-29 21:58:37 +02:00
Hans-Kristian Arntzen
955319aa66 Update test files. 2017-07-29 21:47:28 +02:00
Hans-Kristian Arntzen
1c6df1b7b4 Use _m* for member names without OpMemberName.
Member names could conflict with type names in stripped modules with
very large structs.
2017-07-29 21:44:20 +02:00
Hans-Kristian Arntzen
7fd7dc9266 Merge pull request #229 from KhronosGroup/cfg-walk-optimize
Optimize CFG walking
2017-07-25 21:13:59 +02:00
Hans-Kristian Arntzen
0d14448b4d Minor optimization of enclose_expression. 2017-07-25 18:25:03 +02:00
Hans-Kristian Arntzen
f0c50a618d Fix parsing time explosion for huge shaders.
Need to prune already walked blocks.
2017-07-25 18:22:15 +02:00
Hans-Kristian Arntzen
2e4422d362 Merge pull request #228 from KhronosGroup/various-fixes
Various bug fixes
2017-07-24 10:29:09 +02:00
Hans-Kristian Arntzen
6ff9007311 Fix unary enclosures. 2017-07-24 10:17:19 +02:00
Hans-Kristian Arntzen
c8d60914c4 Add support for SampleId/SampleMask/SamplePosition builtins. 2017-07-24 10:07:31 +02:00
Hans-Kristian Arntzen
d89d0e01fc Run format_all.sh. 2017-07-24 09:29:20 +02:00
Hans-Kristian Arntzen
df6aa0e609 Support SampleCmpLevelZero on cubes as well. 2017-07-24 09:28:24 +02:00
Bill Hollings
5f42746389 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2017-06-30 19:11:46 -04:00
Bill Hollings
f591bc0d4a CompilerMSL enhancements.
Support BuiltInFragDepth.
Emit interface block for StorageClassUniformConstant.
Throw exception when output or fragment input structs contain matrix or array.
Dynamically created interface structs sorted by location number instead of alphabetically.
Add Compiler::is_array() function.
2017-06-30 19:10:46 -04:00
Hans-Kristian Arntzen
2cbeaac76f Merge pull request #218 from KhronosGroup/constant-buffer-sm51
Add support for SM5.1 ConstantBuffer<T>.
2017-06-30 22:56:13 +02:00
Hans-Kristian Arntzen
cf09eb3773 Consider different binding space for push constants. 2017-06-30 22:16:24 +02:00
Hans-Kristian Arntzen
ecf56cff2b Add support for SM5.1 ConstantBuffer<T>. 2017-06-30 10:34:21 +02:00
Hans-Kristian Arntzen
98a17431c2 Merge pull request #214 from dsrbecky/texture-keyword
Add "texture" to the keyword list.
2017-06-27 18:35:00 +02:00
Hans-Kristian Arntzen
e095ccae82 Merge pull request #213 from dsrbecky/OpString
Ignore debug instruction OpString
2017-06-27 18:34:29 +02:00
David Srbecky
edec5ea137 Add "texture" to the keyword list.
I have encountered several shaders where people use "texture" as
local variable (old shaders from times when it was not build-in).
2017-06-27 15:35:47 +01:00
David Srbecky
a08b26926c Ignore debug instruction OpString
It may be used with OpLine or OpSource to specify filename.
2017-06-27 15:34:45 +01:00
Hans-Kristian Arntzen
ecf830846f Merge pull request #212 from KhronosGroup/composite-insert-cleanup
Remove remnants of old OpCompositeInsert hack.
2017-06-27 08:06:19 +02:00
Hans-Kristian Arntzen
0aac31bda1 Remove remnants of old OpCompositeInsert hack. 2017-06-26 22:58:41 +02:00
Hans-Kristian Arntzen
b0540c28ca Merge pull request #211 from dsrbecky/OpCompositeInsert
Always make a copy when handling OpCompositeInsert
2017-06-26 22:53:46 +02:00
David Srbecky
77b5b4446b Always make a copy when handling OpCompositeInsert
The modified object might not be mutable (e.g. shader input).

Added a test for the case when this happens.
2017-06-26 18:32:53 +01:00
Hans-Kristian Arntzen
e70ba405c2 Merge pull request #210 from Jasonchan35/master
added --rename-interface-variable <in|out> <location> <new_variable_name>
2017-06-26 12:47:56 +02:00
Jason Chan
3281e8278f move the spirv_glsl.cpp specific logic to main.cpp 2017-06-25 15:16:09 +02:00