Commit Graph

2000 Commits

Author SHA1 Message Date
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
steve-lunarg
46d5428422 WIP: add other builtins to interstage IO
(Still adding tests: do not commit)

This fixes PR #632 so that:

(a) The 4 PerVertex builtins are added to an interface block for all stages except fragment.

(b) Other builtin qualified variables are added as "loose" linkage members.

(c) Arrayness from the PerVertex builtins is moved to the PerVertex block.

(d) Sometimes, two PerVertex blocks are created, one for in, one for out (e.g, for some GS that
    both reads and writes a Position)
2017-01-09 13:58:05 -07:00
Alex Szpakowski
84eabf7ea7 Add a CMake option to disable compilation of HLSL input support. 2017-01-08 21:20:25 -04:00
John Kessenich
5d89d4d483 Merge pull request #667 from slime73/Compiler-Warnings
Address several compiler warnings
2017-01-08 16:11:24 -07:00
Alex Szpakowski
5f316d9b17 Reorder initializer fields to match variable declaration order (or vice versa) for several class constructors. 2017-01-08 18:21:17 -04:00
Alex Szpakowski
844dd45db6 Add a virtual destructor to a class which has virtual methods. 2017-01-08 17:57:21 -04:00
Alex Szpakowski
7d39ad584f Mark an overriden method in a subclass with ‘override’. 2017-01-08 17:54:48 -04:00
John Kessenich
facde2c804 PP #include: address PR feedback. 2017-01-06 16:48:18 -07:00
John Kessenich
63204c2501 External interface change: PP: Full <> and "" semantics for the Includer.
Any previous use would only be for "", which would probably mean changing

    include(...)  -> includeLocal(...)

See comments about includeLocal() being an additional search over
includeSystem(), not a superset search.

This also removed ForbidIncluder, as
 - the message in ForbidIncluder was redundant: error results were
   already returned to the caller, which then gives the error it
   wants to
 - there is a trivial default implementation that a subclass can
   override any subset of (I still like abstract base classes though)
 - trying to get less implementation out of the interface file anyway
2017-01-06 15:08:54 -07:00