Flavio
15017db971
Removed tabs and replaced with spaces. Changed layout for "else if"
2017-02-15 14:29:33 -08:00
Flavio
aea3c890d3
Added --vn option to generate a C header file containing a variable assigned to the hex representation of the shader. This is a standard feature on Microsoft's HLSL compiler and it allows developers to include pre-compiled shaders directly into the code. This option enables "Hex output", so it is NOT required to specify -x as well. The output file name is preserved, so no ".h" extension is added. If you want the output file to have ".h" extension then you have to specify it on the output file name. The generated header file uses the "#pragma once" pragma to avoid multiple inclusions.
2017-02-06 11:46:35 -08:00
John Kessenich
18adbdbbb8
Resolve issue #700 : allow initializers on struct members.
2017-02-02 15:16:20 -07:00
John Kessenich
32fd5d26e3
Memory/constructor/warning clean-up. Addresses issue #705 .
2017-02-02 14:55:02 -07:00
John Kessenich
f1aeac8944
Merge pull request #711 from eoma/fix-friendly-specialization-name
...
SPV: Emit names of specialization constants, fixes #710
2017-02-02 14:26:06 -07:00
Endre Oma
ad58d45437
SPV: Emit names of specialization constants
2017-01-31 21:16:17 +01:00
John Kessenich
7e134cdfbe
Merge pull request #706 from Ralith/install-headers
...
Install headers
2017-01-29 20:44:31 -07:00
Benjamin Saunders
5a074532af
Install headers
...
This enables the vulkan loader to be built against an installed glslang.
2017-01-29 17:46:44 -08:00
John Kessenich
62c3e400cf
Fix bug from PR #678 : NV_EXTENSIONS deleted implicit array sizing.
2017-01-26 22:03:57 -07:00
John Kessenich
82e0e58993
Fix issue #693 . Ternary operator on void type.
2017-01-26 15:50:10 -07:00
John Kessenich
c0904c15c2
Merge pull request #690 from ligfx/proper_dependencies
...
CMake: add target_link_libraries internally
2017-01-26 15:13:27 -07:00
John Kessenich
2918a2ef15
README: point to HLSL status issues
2017-01-26 12:12:36 -07:00
John Kessenich
24ed24dd0a
Merge pull request #702 from resetnow/master
...
SpvBuilder: add const specifier to vector reference arguments
2017-01-26 11:51:31 -07:00
Vlad Ivanov
689490fd4d
SpvBuilder: add const specifier to vector reference arguments
2017-01-26 20:46:42 +03:00
John Kessenich
72754864c1
Merge pull request #694 from mtavenrath/fix_origin_link
...
Use correct OriginUpperLeft when linking more than one shader.
2017-01-26 10:39:54 -07:00
Markus Tavenrath
7b89e75213
Use correct OriginUpperLeft when linking more than one shader.
2017-01-25 12:11:16 -08:00
John Kessenich
047a6a49ef
Merge pull request #696 from amdrexu/bugfix2
...
Semantics: Texture clamp functions are available for fragment shader only
2017-01-24 10:58:21 -07:00
John Kessenich
ab9e5e9f90
Merge pull request #695 from amdrexu/bugfix
...
Fix a CMakeLists issue
2017-01-24 10:57:54 -07:00
Rex Xu
00d54b4440
Semantics: Texture clamp functions are available for fragment shader only.
2017-01-24 14:36:10 +08:00
Rex Xu
c708f98081
Fix a CMakeLists issue
2017-01-24 14:24:21 +08:00
John Kessenich
2043da90df
Merge pull request #692 from hrydgard/no-nvextensions-build-fix
...
Fix build if NV_EXTENSIONS is not set
2017-01-23 12:34:15 -07:00
Henrik Rydgard
bec5fc898a
Fix build if NV_EXTENSIONS is not set
2017-01-23 16:27:08 +01:00
John Kessenich
64b010f390
Merge pull request #678 from chaoc/stereo_view_rendering
...
support SPV_NV_viewport_array2 and SPV_NV_stereo_view_rendering
2017-01-21 12:05:47 -07:00
Michael Maltese
6077a19ba3
CMake: add target_link_libraries internally
...
Makes it easier to include glslang in a larger CMake project---instead
of having to call `target_link_libraries(glslang OSDependent OGLCompiler
HLSL)`, for example, you only need to call
`target_link_libraries(glslang)` and it will pull in the helpers it
needs.
This is also better in terms of cleaning up the "public interface",
of sorts, for building glslang: end-users probably shouldn't need to
know or be explicitly dependent on internal targets.
2017-01-21 10:59:15 -08:00
chaoc
771d89fc36
support SPV_NV_viewport_array2 and SPV_NV_stereo_view_rendering
2017-01-20 16:48:26 -08:00
John Kessenich
52fceb08f4
Merge pull request #689 from mikew-lunarg/master
...
Fix for not-handled-in-switch warnings
2017-01-20 17:10:29 -07:00
Mike Weiblen
4e9e400ec6
Fix for not-handled-in-switch warnings
...
Added default to the switch() for AMD_EXTENSIONS to avoid a spew
of warning messages.
2017-01-20 13:39:30 -07:00
John Kessenich
c37f8d6b7e
Merge pull request #683 from rdb/master
...
Fix compilation with MSVC 2010
2017-01-20 13:21:42 -07:00
rdb
a2f0e0e791
Fix compilation with MSVC 2010
2017-01-20 20:51:25 +01:00
John Kessenich
22f25d80c6
Merge pull request #682 from steve-lunarg/split-copy-fix
...
HLSL: fix dereferencing when copying split structures with arrays
2017-01-19 16:56:06 -07:00
John Kessenich
d3aea5edaf
Merge pull request #679 from ashwinkolhe/akolhe_spv_khr_subgroup_vote
...
Implement SPV_KHR_subgroup_vote
2017-01-19 16:16:49 -07:00
John Kessenich
7dccb1519b
SPV: Merge pull request #675 from amdrexu/feature
...
SPV: Implement new revision of extension GL_AMD_shader_ballot
2017-01-19 16:14:28 -07:00
John Kessenich
e48b8d74e2
Infrastructure: remove potential memory leaks.
2017-01-19 15:30:56 -07:00
steve-lunarg
65cdff9a54
HLSL: fix dereferencing when copying split structures with arrays
...
When copying split types with mixtures of user variables and buitins,
where the builtins are extracted, there is a parallel structures traversal.
The traversal was not obtaining the derefenced types in the array case.
2017-01-19 15:18:00 -07:00
Rex Xu
430ef40ab4
Implement new revision of extension GL_AMD_shader_ballot
...
- Add support for invocation functions with "InclusiveScan" and
"ExclusiveScan" modes.
- Add support for invocation functions taking int64/uint64/doube/float16
as inout data types.
2017-01-19 12:09:51 +08:00
John Kessenich
94dfb7a523
Non-functional: Factor out entry-point logic from handleFunctionDefinition().
2017-01-18 16:50:47 -07:00
Ashwin Kolhe
c720f3e639
Implement SPV_KHR_subgroup_vote
...
doc.cpp: Add capabilities, scope to the opcodes. Add opcode and
capability strings.
GLSL.ext.KHR.h: Add extension
string.
GlslangToSpv.cpp: Fix handling of opcodes to generate
appropriate SPIR-V.
spirv.hpp: Add capability and opcode
enums.
spv.shaderGroupVote.comp.out: Update SPIR-V output for test
shader.
2017-01-18 14:16:49 -08:00
John Kessenich
33dadd1287
Fix build break for non-VS.
2017-01-13 20:22:00 -07:00
John Kessenich
442515393e
Non-functional: Fix round of compiler warnings.
2017-01-13 20:08:54 -07:00
John Kessenich
c142c88967
Front-ends: Non-functional: Rationalize vector and matrix swizzles.
...
This reduces code duplication in a few ways, and better encapsulates
vector swizzle representation.
2017-01-13 19:35:29 -07:00
John Kessenich
0a76a1870c
Merge pull request #656 from TiemoJung/overload_fix
...
HLSL: Improved overload handling
2017-01-13 15:10:20 -07:00
John Kessenich
fdf6347f0a
HLSL: Add EOpMatrixSwizzle, selectively decomposed to other ops, for issue #670 .
...
Since EOpMatrixSwizzle is a new op, existing back-ends only work when the
front end first decomposes it to other operations. So far, this is only
being done for simple assignment into matrix swizzles.
2017-01-13 12:35:01 -07:00
John Kessenich
001dfa1c5c
HLSL: matrix swizzle (_12, _m23) syntax, partial semantics.
...
This partially addressess issue #670 , for when the matrix swizzle
degenerates to a component or column: m[c], m[c][r] (where HLSL
swaps rows and columns for user's view).
An error message is given for the arbitrary cases not covered.
These cases will work for arbitrary use of l-values.
Future work will handle more arbitrary swizzles, which might
not work as arbitrary l-values.
2017-01-12 16:51:18 -07:00
John Kessenich
913e3b686a
PP: Clean up and rationalize floating-point-number scanner.
...
This encapsulates where the string could overflow, removing 40 lines
of fragile code. It also improves handling of numbers that are too long.
There are a couple of open issues that could related to this function
being more rational (locale dependence, 1.#INF).
2017-01-12 12:06:18 -07:00
John Kessenich
e86fc0946f
Merge pull request #664 from steve-lunarg/stage-io-fix
...
add other builtins to interstage IO
2017-01-12 10:18:23 -07:00
John Kessenich
dc1a8196cf
Infrastructure: Support standard build with ENABLE_HLSL set to off.
2017-01-11 14:50:16 -07:00
John Kessenich
65d538c832
Infrastructure: Protect against missing built-in symbol table generators.
2017-01-11 14:24:56 -07:00
John Kessenich
ce80197c22
Merge pull request #663 from KhronosGroup/full-include-semantics
...
Includer interface change to support full include semantics (requires downstream changes)
2017-01-10 18:49:07 -07:00
John Kessenich
eaecfe7157
Merge pull request #668 from slime73/DisableHLSL
...
Add a CMake option to disable compilation of HLSL input support.
2017-01-09 18:52:55 -07:00
Alex Szpakowski
ff21a25bc8
Change disabled-by-default DISABLE_HLSL option to enabled-by-default ENABLE_HLSL.
...
Matches existing options.
2017-01-09 18:10:14 -04:00