1571 Commits

Author SHA1 Message Date
Chao Chen
5b2203db04 Add-support-for-SPV_NV_shading_rate 2018-09-19 13:07:43 -07:00
Chao Chen
b50c02ef53 Add-support-for-SPV_NVX_raytracing 2018-09-19 13:07:43 -07:00
Chao Chen
3c3669904c Add-support-for-SPV_NV_mesh_shader 2018-09-19 13:07:43 -07:00
Chao Chen
3a1379667d 0003-Add-support-for-SPV_NV_shader_image_footprint 2018-09-19 13:07:42 -07:00
Chao Chen
beae2251b7 Add-support-for-SPV_NV_compute_shader_derivatives 2018-09-19 13:07:42 -07:00
Chao Chen
9eada4b971 Add-support-for-SPV_NV_fragment_shader_barycentric 2018-09-19 13:07:42 -07:00
John Kessenich
b4a598ba93 Bump revision. 2018-09-13 17:54:48 -06:00
Norbert Garnys
dad0c1bed0 Add GL_EXT_shader_atomic_int64 2018-09-13 15:34:26 +02:00
John Kessenich
6def4375cc Bump revision. 2018-09-10 18:14:21 -06:00
John Kessenich
546b78854a Printing preprocessed shaders (not a supported path): Fix #1490: strings
Put quote marks around strings, due to a change in how tokenization works.
2018-09-10 11:42:16 -06:00
John Kessenich
1ca0f8e8eb Bump version and revision. 2018-09-07 09:07:03 -06:00
Jeff Bolz
36831c9bad GL_KHR_memory_scope_semantics 2018-09-06 20:36:14 -05:00
John Kessenich
97068d8b30
Merge pull request #1465 from otakuto/remove-execute-permissions
Remove execute permissions
2018-08-31 08:14:47 -07:00
John Kessenich
ac2e1b6328 bump revision 2018-08-30 17:43:22 -06:00
John Kessenich
381dd3c0d2 GLSL: Remove use of __ in the implementation of keywords having __. 2018-08-30 12:22:33 -06:00
John Kessenich
717c80a9de SPV: Isolate SPIRV-tools glue to its own file. 2018-08-23 15:17:10 -06:00
John Kessenich
e7df8e0b76 Non-functional: Rationalize some existing use of SPIRV-Tools. 2018-08-22 17:12:46 -06:00
John Kessenich
72f8c69097 Bump version patch level. 2018-08-13 01:32:56 -06:00
John Kessenich
ec5c11931b Bump revision. 2018-08-09 14:17:52 -06:00
Corentin Wallez
e70614223f Fix -Wignored-qualifier and -Wunused-variable warnings 2018-08-09 14:54:33 +02:00
otakuto
d03da06ac1 Remove execute permissions 2018-08-07 03:16:20 +09:00
Daniel Koch
883607d5fc Fix build warnings/errors:
1) On some old versions of MSVC:

	glslang\MachineIndependent\Constant.cpp(187): warning C4056: overflow in floating-point constant arithmetic

On this platform the definition of INFINITY is as follows:

	#ifndef _HUGE_ENUF
	   #define _HUGE_ENUF  1e+300  // _HUGE_ENUF*_HUGE_ENUF must overflow
	#endif
	#define INFINITY   ((float)(_HUGE_ENUF * _HUGE_ENUF))

Moving the negation outside the cast seems to resolve that issue.

2) Some Linux compilers were unhappy with lines 226/227

	glslang/MachineIndependent/Constant.cpp: In member function 'virtual glslang::TIntermTyped* glslang::TIntermConstantUnion::fold(glslang::TOperator, const glslang::TIntermTyped*) const':
	glslang/MachineIndependent/Constant.cpp:226:99: error: integer overflow in expression [-Werror=overflow]
			 else if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == -(int)0x80000000)
													   ^~~~~~~~~~~~~~~~
	glslang/MachineIndependent/Constant.cpp:227:48: error: integer overflow in expression [-Werror=overflow]
			     newConstArray[i].setIConst(-(int)0x80000000);
	                                                ^~~~~~~~~~~~~~~~

Moving the negation to the right side of the cast made those happy, but then some Windows compilers were unhappy:

	glslang\MachineIndependent\Constant.cpp(226): warning C4146: unary minus operator applied to unsigned type, result still unsigned
	glslang\MachineIndependent\Constant.cpp(227): warning C4146: unary minus operator applied to unsigned type, result still unsigned

which required adding on the "ll" suffix.

3) Android builds where unhappy with line 242:

	glslang/MachineIndependent/Constant.cpp:242:100: error: comparison of integers of different signs: 'long long' and 'unsigned long long' [-Werror,-Wsign-compare]
        	        else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == -0x8000000000000000ll)
                	                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~
	1 error generated.

Adding an explicit (long long) cast resolved this.
And the negation needs to be on the right side of the cast otherwise linux
builds are unhappy as in (2).

4) Android builds are unhappy with out of order initializers:

	glslang/MachineIndependent/reflection.h:60:84: error: field 'type' will be initialized after field 'stages' [-Werror,-Wreorder]
		glDefineType(pGLDefineType), size(pSize), index(pIndex), counterIndex(-1), type(pType.clone()), stages(EShLanguageMask(0)) { }
											   ^
	1 error generated.


Change-Id: Ic9a05fa7912498284885113d8b051f93f822f62b
2018-07-27 17:20:49 -04:00
John Kessenich
7cdc24c06c PP: Address #1456: Strip float suffixes before using platform library. 2018-07-27 13:08:05 -06:00
John Kessenich
561a43d272 PP: floating-point parsing: more stable handling of istringstream::fail
Possibly addresses #1456
2018-07-26 14:29:29 -06:00
John Kessenich
13803b185d Bump revision. 2018-07-25 15:34:01 -06:00
John Kessenich
6e382f63b4
Merge pull request #1455 from TiemoJung/nullpointer_crash_fix
Fixes a crash when in/out varying variable had no semantic name and a…
2018-07-25 11:13:05 -07:00
John Kessenich
e161cc11f7 GLSL: No more restrictions on (non)shadow sampler construction.
Match https://github.com/KhronosGroup/GLSL/pull/22
2018-07-25 12:11:04 -06:00
t.jung
9f8cb850e4 Fixes a crash when in/out varying variable had no semantic name and an error was reported in ioremapper phase when the variable was rejected 2018-07-25 13:43:14 +02:00
John Kessenich
7d4c9a07b5 GLSL: Construct shadow texture from non-shadow sampler.
Tracks https://github.com/KhronosGroup/GLSL/pull/22.
2018-07-23 15:59:09 -06:00
John Kessenich
0339af3c1f GLSL/SPV: If a texture is used with a shadow sampler, force 'shadow'.
Fixes #854. But, only good if we are not trying to use the same
texture for both shadow and non-shadow constructors.

Force the type of the texture to have 'shadow' set when it is
constructed with a samplerShadow.
2018-07-23 15:58:32 -06:00
John Kessenich
b617e14acb Link: Merge all the settings in TIntermediate.
Fixes #1309.
2018-07-20 12:34:59 -06:00
John Kessenich
41436ad204 Link/SPV: Correct symbol IDs on merging ASTs to a single coherent space
This is one step in providing full linker functionality for creating
correct SPIR-V from multiple compilation units for the same stage.
(This was the only remaining "hard" part. The rest should be simple.)
2018-07-18 18:07:41 -06:00
John Kessenich
e7f9caeac4 Errors and Build: Fix build warnings, which also improved error messages. 2018-07-12 15:11:07 -06:00
John Kessenich
8dafeab47e
Merge pull request #1438 from Think-Silicon/getUniformStages
Reflection exposes the Shader Stages where a Uniform is present
2018-07-11 08:19:21 -07:00
John Kessenich
cf6bd066b9 HLSL: Fix #1432: Globally initialize local static variables. 2018-07-11 01:09:14 -06:00
dmpakas
f556e5da26 Reflection exposes the Shader Stages where a Uniform is present 2018-07-10 18:25:48 +03:00
John Kessenich
312dcfb070 Implement GL_EXT_shader_16bit_storage and GL_EXT_shader_8bit_storage extensions.
These introduce limited support for 8/16-bit types such that they can only be accessed in buffer memory and converted to/from 32-bit types.

Contributed from Khronos-internal work.
2018-07-03 13:51:31 -06:00
John Kessenich
eefab240f7 Bump revision. 2018-07-03 09:34:43 -06:00
John Kessenich
ab8960fd12
Merge pull request #1416 from aejsmith/samplerless-texture-functions
Add support for GL_EXT_samplerless_texture_functions
2018-07-02 18:35:41 -06:00
John Kessenich
513cc4cf87 Merge branch 'HaydnTrigg-patch-1' 2018-07-02 16:13:29 -06:00
John Kessenich
c88edb1319 Merge branch 'patch-1' of https://github.com/HaydnTrigg/glslang into HaydnTrigg-patch-1 2018-07-02 16:04:08 -06:00
John Kessenich
6d61684f4b Bump revision. 2018-07-02 13:49:16 -06:00
John Kessenich
802c62bca4 PP: Rationalize return values of MacroExpand.
This results in better error recovery, including fewer
crashes on badly formed PP input.
2018-07-02 13:47:31 -06:00
John Kessenich
9cc81de096 PP/HLSL: Fix #1424: support comma in nested curly braces for macro arg 2018-07-02 10:40:32 -06:00
Alex Smith
e47bfaedf6 Add support for GL_EXT_samplerless_texture_functions 2018-07-01 10:58:53 +01:00
Haydn Trigg
e826286f99
Constant.cpp Floating point divide by zero
Constant.cpp will throw a floating point divide by zero if floating point exceptions are enabled in Win32 causing the program to crash. This fix manually checks the right-hand argument of the division and sets appropriate Infinity, Negative Infinity, or NAN as if the floating point exceptions were disabled.
2018-06-29 13:55:06 -04:00
John Kessenich
866f67140e Build: Make literal casting have fewer warnings and be more consistent. 2018-06-20 18:10:55 -06:00
John Kessenich
c99304c5dc Bump revision. 2018-06-19 09:47:23 -06:00
John Kessenich
2a805d9cea Revert "GLSL: Fix #1279: refract does not have a double-type eta."
This reverts commit ebec909487b8c44a8c28b40c9899857593cc9bb5.

Khronos decided glslang was originally correct, and the specifications
are incorrect.
2018-06-19 09:43:09 -06:00
Neil Roberts
1d024b5346 Take into account arrays of opaque types when reserving bindings
TDefaultIoResolverBase::reserveSlot and getFreeSlot now have a size
parameter to reserve a range of bindings. This is used by
TDefaultIoResolver::resolveBinding to reserve a continuous range when
the type is an array and the target API is GL.
2018-06-14 14:54:33 +02:00