2422 Commits

Author SHA1 Message Date
John Kessenich
4abd6b58d4
Merge pull request #1145 from antiagainst/travis-auto-deploy
Travis: auto deploy build artifacts to GitHub Releases
2017-11-09 19:19:56 -07:00
Lei Zhang
fba299a25b Travis: auto deploy build artifacts to GitHub Releases
Pushing a commit to the master branch will trigger a build on
Travis. If the build is successful, the artifacts will be
collected and pushed to GitHub Releases, under the "master-tot"
release.
2017-11-09 15:12:09 -05:00
John Kessenich
a0680e6137
Merge pull request #1114 from LoopDawg/validator-script
Add script to crank test shaders through spirv-val
2017-11-09 12:10:24 -07:00
John Kessenich
a50a9de356
Merge pull request #1116 from LoopDawg/reverse-shift-args
Reverse order of setShiftBindingForSet parameters
2017-11-09 12:08:28 -07:00
John Kessenich
7c2f6d8558
Merge pull request #1144 from antiagainst/appveyor-auto-deploy
Appveyor: auto deploy build artifacts to GitHub Releases
2017-11-09 12:07:42 -07:00
LoopDawg
e570955cdc Reverse order of setShiftBindingForSet parameters
Per feedback on PR #1111, this reverses the order of the parameters for the setShiftBinding API.

It is now:

    void TShader::setShiftBindingForSet(TResourceType res, unsigned int base, unsigned int set);
2017-11-09 09:51:15 -07:00
LoopDawg
4ec680e15f Add script to crank test shaders through spirv-val
This script will crank a supplied set of glslang test shaders through the
spirv-val tool, reporting on the results.

There are some important things to note:

* Like 'runtests', this must be invoked from the 'Test' subdirectory.

* This is mostly useful on the hlsl.* tests, although it is not strictly
limited to those.  The reason is that most of the glsl tests either contain
validation error cases, and so fail to compile, or are not using a #version
compatible with producing SPIR-V modules.

* Some tests, such as negative tests, or most of the glsl tests, have
intentional compilation errors.  This script treats that as OK.  Failures
are successfully compiling shaders which proceed to fail spirv-val.

* spirv-val is looked for in either the External directory, or if not
found there, in a sibling directory of glslang, and if not found there
either, in /usr/local/bin.

* There are a bunch of command line options.  ./validate-shaders.sh --help
will describe them.

Some examples to try:

   ./validate-shaders.sh hlsl.*   # exercise all hlsl.* tests.
   ./validate-shaders.sh --terse hlsl.*  # same, but tersely.

   # dump validator results for problems in something.frag:
   ./validate-shaders.sh --quiet --dump-val something.frag
2017-11-09 09:40:29 -07:00
Lei Zhang
a7eab9b308 Appveyor: auto deploy build artifacts to GitHub Releases
Pushing a commit to the master branch will trigger a build on
Appveyor. If the build is successful, the artifacts will be
collected and pushed to GitHub Releases, under the "master-tot"
release.
2017-11-09 09:20:46 -05:00
John Kessenich
2edde6665d SPV: Don't support noise*() when generating SPV. 2017-11-03 03:39:48 -06:00
John Kessenich
af52799c2d Errors: Have a whole set of tool-level error messages report to stderr. 2017-11-02 22:48:15 -06:00
John Kessenich
a372a3ed1e Versioning: Update some version strings. Still need better overall version. 2017-11-02 22:34:43 -06:00
John Kessenich
9f0b6fa4f0
Merge pull request #1139 from greg-lunarg/remap2
Remapper: Fix strip algo when strip ranges overlap
2017-11-02 21:53:25 -06:00
GregF
e86b4c84d6 Remapper: Fix strip algo when strip ranges overlap 2017-11-02 14:01:57 -06:00
John Kessenich
88e22a6090 Fix #1079: don't give error when macro() name used without open (. 2017-11-02 06:48:32 -06:00
John Kessenich
e8d21388ed Fix nondeterminism discussed in 258b700f5957fc13b0512b3734a1b0e81a1c271d 2017-11-02 00:05:53 -06:00
John Kessenich
ac51602455 Fix #1065: don't validate Vulkan binding numbers.
To handle sparse assignments, don't check maxCombinedTextureImageUnits.
2017-11-01 22:37:24 -06:00
John Kessenich
715c353a15 Non-functional: copyright update, to help with non-determinism test. 2017-10-28 14:42:44 -06:00
John Kessenich
5866e67b8d Tests: Non-determinancy: Add back in the IntMin tests. 2017-10-28 13:03:49 -06:00
John Kessenich
a63622286f
Merge pull request #1133 from greg-lunarg/kg2
Add python3 compatibility to update_glslang_sources.py
2017-10-28 02:03:09 -06:00
GregF
3f9c03bd82 Add python3 compatibility to update_glslang_sources.py 2017-10-27 15:39:45 -06:00
John Kessenich
258b700f59 Non-determinant tests: Remove recent tests, to see if things stabelize.
Both debug and release clang builds have segfaulted on recent
changes, non deterministically, while doing the single/multi-thread
test all test files. Removing recent test files, to see if it gives
a clue.
2017-10-27 04:15:57 -06:00
John Kessenich
e9173b19a9 Non-functional: Add {} expected by convention; retrigger failed bot tests. 2017-10-27 03:10:21 -06:00
John Kessenich
0501e7c8f8 Merge pull request #1129 from xorgy/const-fold-int-min-modulo-negative-one
GLSL: Fold constant SHRT_MIN/INT_MIN/LLONG_MIN % -1 to 0.
2017-10-27 01:30:03 -06:00
Aaron Muir Hamilton
f83e2f0690 GLSL: Fold constant SHRT_MIN/INT_MIN/LLONG_MIN % -1 to 0. 2017-10-25 01:32:20 +00:00
John Kessenich
b5b0846244 Merge pull request #1124 from xorgy/check-inner-implicit-atomic-uint
GLSL: Check for implicit inner dimension in array of atomic_uint.
2017-10-24 08:18:09 -06:00
John Kessenich
6020995198 Merge pull request #1127 from xorgy/preprocessor-int-min-mod-negative-one
Preprocessor: Evaluate INT_MIN % -1 to 0.
2017-10-24 08:14:38 -06:00
Aaron Muir Hamilton
9d4a1b24e9 Preprocessor: Evaluate INT_MIN % -1 to 0. 2017-10-24 10:59:01 +00:00
John Kessenich
047b65f953 Merge pull request #1125 from greg-lunarg/kg1
Update spirv-tools known-good
2017-10-23 22:11:42 -06:00
GregF
cc80d80d8d Update spirv-tools known-good 2017-10-23 16:48:42 -06:00
Aaron Muir Hamilton
437911af33 GLSL: Check for implicit inner dimension in array of atomic_uint. 2017-10-23 15:31:10 +00:00
John Kessenich
9cfc15513f Merge pull request #1118 from xorgy/only-swizzle-numbers-and-bools
Only try swizzles on vectors, numbers, and booleans.
2017-10-22 23:28:22 -06:00
John Kessenich
016e47f7a3 Merge branch 'only-parse-inf-constant-in-hlsl' of https://github.com/xorgy/glslang into xorgy-only-parse-inf-constant-in-hlsl 2017-10-22 23:20:42 -06:00
John Kessenich
6e33b787d3 Tests: Add test for GLSL +-#INF. 2017-10-22 23:17:18 -06:00
John Kessenich
79a4074047 Merge pull request #1120 from xorgy/overlong-hex-literal
Check for hexadecimal literals exceeding MaxTokenLength.
2017-10-22 23:09:32 -06:00
Aaron Muir Hamilton
6031266244 GLSL: Only parse [-]1.#INF in HLSL mode. 2017-10-23 02:56:27 +00:00
Aaron Muir Hamilton
9028ed204d Check for hexadecimal literals exceeding MaxTokenLength. 2017-10-22 17:55:14 +00:00
Aaron Muir Hamilton
07c0bcea92 Only try swizzles on vectors, numbers, and booleans. 2017-10-21 19:54:37 +00:00
John Kessenich
b1eaf82cc8 Merge pull request #1115 from LoopDawg/stdarray-binding-set
Nonfunctional: minor: use std::array for per-set shifts, fix warning.
2017-10-20 16:31:26 -06:00
LoopDawg
2915da303f Nonfunctional: minor: use std::array for per-set shifts, fix warning.
Two unrelated, minor tweaks:

(1) Use std::array for shiftBindingForSet.  Now matches shiftBinding.
(2) Add parens in shouldFlatten() to make compiler warning happy.
2017-10-20 12:02:38 -06:00
John Kessenich
573cc9e9aa Merge pull request #1111 from LoopDawg/per-set-binding-offsets
Add per-descriptor-set IO mapping shift values.
2017-10-20 11:35:29 -06:00
John Kessenich
7a9db71f46 SPV: Don't emit StorageImageMultisample capability for subpass images. 2017-10-20 10:56:50 -06:00
John Kessenich
6cfeced8de Non-functional: missing comments from missed git add. 2017-10-20 10:56:20 -06:00
John Kessenich
1b46f137f7 HLSL: Fix #1106. Support shader setting of binding/set for $Global. 2017-10-19 16:54:25 -06:00
LoopDawg
08a14422c1 Add per-descriptor-set IO mapping shift values.
This PR adds the ability to provide per-descriptor-set IO mapping shift
values.  If a particular binding does not land into a per-set value,
then it falls back to the prior behavior (global shifts per resource class).

Because there were already 6 copies of many different methods and internal
variables and functions, and this PR would have added 6 more, a new API is
introduced to cut down on replication and present a cleaner interface.
For the global (non-set-specific) API, the old entry points still exist
for backward compatibility, but are phrased internally in terms of the
following.

    // Resource type for IO resolver
    enum TResourceType {
        EResSampler,
        EResTexture,
        EResImage,
        EResUbo,
        EResSsbo,
        EResUav,
        EResCount
    };

Methods on TShader:

    void setShiftBinding(TResourceType res, unsigned int base);
    void setShiftBindingForSet(TResourceType res, unsigned int set, unsigned int base);

The first method replaces the 6 prior entry points of various spellings, which
exist now in depreciated form.  The second provides per-resource-set functionality.
Both accept an enum from the list above.

From the command line, the existing options can accept either a single shift value as
before, or a series of 1 or more [set offset] pairs.  Both can be provided, as in:

    ... --stb 20 --stb 2 25 3 30 ...

which will use the offset 20 for anything except descriptor set 2 (which uses 25) and
3 (which uses 30).
2017-10-19 11:50:30 -06:00
John Kessenich
fe4e572c53 GLSL->SPIR-V: Put precision decorations on imageLoad(). 2017-10-19 02:07:30 -06:00
John Kessenich
f0e35bf0ef GLSL: Make sampling operations have agnostic precision qualifiers for desktop.
Desktop defaults to highp for samplers, but this should not apply to the built-in
functions, so make it appy only to user declarations.
2017-10-19 00:32:59 -06:00
John Kessenich
3112b5686d Merge pull request #1113 from xorgy/preprocessor-int-min-over-negative-one
Preprocessor: Evaluate INT_MIN / -1 to 0.
2017-10-19 00:24:05 -06:00
John Kessenich
0b55e0f203 Merge pull request #1102 from KhronosGroup/partially-flatten
HLSL: Partially flatten hierarchies, instead of all or nothing.
2017-10-18 14:53:53 -06:00
Aaron Muir Hamilton
dc756a61c8 Preprocessor: Evaluate INT_MIN / -1 to 0.
This division is undefined behaviour which raises SIGFPE on x86.
  Most C++ preprocessors evaluate this silently to 0.
2017-10-18 19:56:19 +00:00
John Kessenich
a50b107e62 Build: Fix build warning. 2017-10-17 12:27:51 -06:00