platform/upstream/glslang.git
6 years agoMerge pull request #1263 from greg-lunarg/kg12
John Kessenich [Tue, 6 Mar 2018 18:12:04 +0000 (11:12 -0700)]
Merge pull request #1263 from greg-lunarg/kg12

Update spirv-tools known_good

6 years agoMerge pull request #1272 from amdrexu/bugfix
John Kessenich [Tue, 6 Mar 2018 08:02:13 +0000 (01:02 -0700)]
Merge pull request #1272 from amdrexu/bugfix

Add more error checks for interpolateAtVertexAMD()

6 years agoAdd more error checks for interpolateAtVertexAMD()
Rex Xu [Tue, 6 Mar 2018 07:01:40 +0000 (15:01 +0800)]
Add more error checks for interpolateAtVertexAMD()

6 years agoVersioning: Address #1255: Move to semantic versioning.
John Kessenich [Tue, 6 Mar 2018 05:23:17 +0000 (22:23 -0700)]
Versioning: Address #1255: Move to semantic versioning.

Still missing is automation and final decisions on mechanisms in general.

6 years agoMerge branch 'amdrexu-bugfix'
John Kessenich [Sat, 3 Mar 2018 18:53:41 +0000 (11:53 -0700)]
Merge branch 'amdrexu-bugfix'

6 years agoMerge branch 'bugfix' of https://github.com/amdrexu/glslang into amdrexu-bugfix
John Kessenich [Sat, 3 Mar 2018 18:52:58 +0000 (11:52 -0700)]
Merge branch 'bugfix' of https://github.com/amdrexu/glslang into amdrexu-bugfix

6 years agoSPV: Bump up the generator number.
John Kessenich [Sat, 3 Mar 2018 18:47:07 +0000 (11:47 -0700)]
SPV: Bump up the generator number.

6 years agoSPV: The result type of OpArrayLength should be UINT
Rex Xu [Fri, 2 Mar 2018 09:09:23 +0000 (17:09 +0800)]
SPV: The result type of OpArrayLength should be UINT

6 years agoNon-functional: Make the vulkan version number meaning be only 0 or not 0.
John Kessenich [Sat, 3 Mar 2018 01:17:42 +0000 (18:17 -0700)]
Non-functional: Make the vulkan version number meaning be only 0 or not 0.

6 years agoNon-functional: Move to latest headers.
John Kessenich [Fri, 2 Mar 2018 19:36:02 +0000 (12:36 -0700)]
Non-functional: Move to latest headers.

6 years agoMerge pull request #1266 from amdrexu/feature
John Kessenich [Fri, 2 Mar 2018 18:23:15 +0000 (11:23 -0700)]
Merge pull request #1266 from amdrexu/feature

Implement the extension GL_AMD_gpu_shader_half_float_fetch

6 years agoMerge pull request #1268 from amdrexu/bugfix2
John Kessenich [Fri, 2 Mar 2018 16:41:22 +0000 (09:41 -0700)]
Merge pull request #1268 from amdrexu/bugfix2

Fix issues of SPIRV headers

6 years agoFix issues of SPIRV headers
Rex Xu [Fri, 2 Mar 2018 09:42:37 +0000 (17:42 +0800)]
Fix issues of SPIRV headers

6 years agoImplement the extension GL_AMD_gpu_shader_half_float_fetch
Rex Xu [Tue, 29 Nov 2016 09:36:31 +0000 (17:36 +0800)]
Implement the extension GL_AMD_gpu_shader_half_float_fetch

- Support new opaque types: f16sampler*, f16image*, f16subpassInput*.
- Add new built-in GLSL texture/image functions.

6 years agoFix typo.
John Kessenich [Fri, 2 Mar 2018 08:09:28 +0000 (01:09 -0700)]
Fix typo.

6 years agoMerge pull request #1264 from dneto0/typo-client-version
John Kessenich [Wed, 28 Feb 2018 23:12:37 +0000 (16:12 -0700)]
Merge pull request #1264 from dneto0/typo-client-version

Fix typo in help for -V<bad-number>

6 years agoMerge pull request #1265 from davidhubbard/master
John Kessenich [Wed, 28 Feb 2018 23:11:43 +0000 (16:11 -0700)]
Merge pull request #1265 from davidhubbard/master

EShLangFragment falls through to EShLangCompute, only #ifndef AMD_EXTENSIONS.

6 years agoTBuiltIns::identifyBuiltIns: EShLangFragment fallthrough
davidhubbard [Wed, 28 Feb 2018 17:29:04 +0000 (11:29 -0600)]
TBuiltIns::identifyBuiltIns: EShLangFragment fallthrough

EShLangFragment falls through to EShLangCompute, only #ifndef AMD_EXTENSIONS.
This is probably a bug.

6 years agoFix typo in help for -V<bad-number>
David Neto [Wed, 28 Feb 2018 02:55:23 +0000 (21:55 -0500)]
Fix typo in help for -V<bad-number>

6 years agoIO mapper: Fix #1261: Supply location mapper with size computer.
John Kessenich [Tue, 27 Feb 2018 20:23:08 +0000 (13:23 -0700)]
IO mapper: Fix #1261: Supply location mapper with size computer.

This factored computeTypeLocationSize() out of needing the TIntermediate contents,
and uses it to show how to know how many locations an object needs.
However, it still does not do cross stage, or mixed location/no-location
analysis.

6 years agoUpdate spirv-tools known_good
GregF [Tue, 27 Feb 2018 18:26:21 +0000 (11:26 -0700)]
Update spirv-tools known_good

Contains the following improvements:

Fixes 1341: Atomics (and other instructions with side-effects) removed.
Add folding for redundant add/sub/mul/div/mix operations
Add constant folding rules for floating-point comparison
Add folding of redundant OpSelect insns
Add folding of OpCompositeExtract and OpConstantComposite

6 years agoHLSL: Fix #1257: layout float1, int1, etc., as scalars.
John Kessenich [Tue, 27 Feb 2018 07:48:17 +0000 (00:48 -0700)]
HLSL: Fix #1257: layout float1, int1, etc., as scalars.

6 years agoSPV: Fix #1258: cache constant structs by id, not opcode.
John Kessenich [Tue, 27 Feb 2018 02:20:05 +0000 (19:20 -0700)]
SPV: Fix #1258: cache constant structs by id, not opcode.

Constants were generally cached by type opcode, but all structures share the
same type opcode (OpTypeStruct), so they need to be cached by type id.

6 years agoSPV: Complete OpModuleProcessed implementation, enabled by have 1.2 headers.
John Kessenich [Fri, 23 Feb 2018 02:36:18 +0000 (19:36 -0700)]
SPV: Complete OpModuleProcessed implementation, enabled by have 1.2 headers.

6 years agoMerge pull request #1256 from KhronosGroup/require-binding
John Kessenich [Thu, 22 Feb 2018 19:58:29 +0000 (12:58 -0700)]
Merge pull request #1256 from KhronosGroup/require-binding

GLSL/SPV: Fix #1196: Require resources to have layout(binding=X).

6 years agoGLSL/SPV: Fix #1196: Require resources to have layout(binding=X).
John Kessenich [Thu, 22 Feb 2018 01:19:49 +0000 (18:19 -0700)]
GLSL/SPV: Fix #1196: Require resources to have layout(binding=X).

6 years agoTests: specExamples.vert is used twice, it needs two different output names.
John Kessenich [Thu, 22 Feb 2018 01:42:10 +0000 (18:42 -0700)]
Tests: specExamples.vert is used twice, it needs two different output names.

6 years agoMerge pull request #1253 from KhronosGroup/hlsl-ternary-select
John Kessenich [Wed, 21 Feb 2018 16:09:01 +0000 (09:09 -0700)]
Merge pull request #1253 from KhronosGroup/hlsl-ternary-select

HLSL: Fix #1249: Always execute both sides of ternary "?:".

6 years agoHLSL: Fix #1249: Always execute both sides of ternary "?:".
John Kessenich [Wed, 21 Feb 2018 04:29:05 +0000 (21:29 -0700)]
HLSL: Fix #1249: Always execute both sides of ternary "?:".

This is semantically required by HLSL, and frequently results in using
OpSelect instead of control flow.

6 years agoMerge pull request #1250 from LoopDawg/image-fetch-conversion
John Kessenich [Tue, 20 Feb 2018 01:28:24 +0000 (18:28 -0700)]
Merge pull request #1250 from LoopDawg/image-fetch-conversion

HLSL: Add conversions for image ops during SPV construction

6 years agoHLSL: Add conversions for image ops during SPV construction
LoopDawg [Sun, 18 Feb 2018 18:40:01 +0000 (11:40 -0700)]
HLSL: Add conversions for image ops during SPV construction

HLSL allows image and texture types to be templatized on sub-vec4 types,
or even structures.  This was mostly handled already during creation of
sampling operations.  However, for operator[] which can generate image
loads, this wasn't happening.

It also isn't very easy to do at that point in time, because operator[]
does not know where the results it produces will end up.  They may be
an lvalue or an rvalue, and there's a post-process to convert loads to
stores.  They may end up in atomic ops.

To bypass that difficulty, GlslangToSpv now looks for this case and
adds the appropriate conversion.  LIMITATION: this only works for
cases for which a simple conversion opcode suffices.  That is to say,
it will not work if the type is templatized on a struct.

6 years agoGLSL: Fix #1247. Remove extraneous *= matrix test.
John Kessenich [Thu, 15 Feb 2018 19:22:25 +0000 (12:22 -0700)]
GLSL: Fix #1247. Remove extraneous *= matrix test.

6 years agoMerge pull request #1246 from amdrexu/bugfix
John Kessenich [Thu, 15 Feb 2018 18:18:22 +0000 (11:18 -0700)]
Merge pull request #1246 from amdrexu/bugfix

Fix an issue of interpolateAtVertexAMD().

6 years agoFix an issue of interpolateAtVertexAMD().
Rex Xu [Wed, 14 Feb 2018 03:42:34 +0000 (11:42 +0800)]
Fix an issue of interpolateAtVertexAMD().

An error message should be reported if the interpolant is not an input.

6 years agoWarning for #pragma once. GLSL and HLSL. Addresses #824.
John Kessenich [Mon, 12 Feb 2018 05:04:45 +0000 (22:04 -0700)]
Warning for #pragma once. GLSL and HLSL. Addresses #824.

6 years agoMerge pull request #1244 from dneto0/update-spirv-tools
John Kessenich [Sat, 10 Feb 2018 01:17:49 +0000 (18:17 -0700)]
Merge pull request #1244 from dneto0/update-spirv-tools

Update SPIRV-Tools known-good

6 years agoMerge pull request #1243 from greg-lunarg/kg11
John Kessenich [Sat, 10 Feb 2018 01:17:24 +0000 (18:17 -0700)]
Merge pull request #1243 from greg-lunarg/kg11

Upgrade update_glslang_sources.py to work with other sites

6 years agoUpdate SPIRV-Tools known-good
David Neto [Fri, 9 Feb 2018 18:20:45 +0000 (13:20 -0500)]
Update SPIRV-Tools known-good

One legalization case updated for a renumbered ID

6 years agoUpgrade update_glslang_sources.py to work with gitlab branch
GregF [Thu, 8 Feb 2018 22:56:54 +0000 (15:56 -0700)]
Upgrade update_glslang_sources.py to work with gitlab branch

--site gitlab must be added to command for gitlab capability.
Default is github.

6 years agoNon-functional: GLSL: Fix #1242; don't pass reference to nullptr.
John Kessenich [Thu, 8 Feb 2018 19:13:25 +0000 (12:13 -0700)]
Non-functional: GLSL: Fix #1242; don't pass reference to nullptr.

6 years agoMerge pull request #1241 from greg-lunarg/kg9
John Kessenich [Thu, 8 Feb 2018 15:59:05 +0000 (08:59 -0700)]
Merge pull request #1241 from greg-lunarg/kg9

Add DeadInsertElim to legalization and RedundancyElim to -Os.

6 years agoAdd DeadInsertElim to legalization and RedundancyElim to -Os.
GregF [Wed, 7 Feb 2018 23:04:42 +0000 (16:04 -0700)]
Add DeadInsertElim to legalization and RedundancyElim to -Os.

6 years agoMerge pull request #1239 from KhronosGroup/deeper-access-chains
John Kessenich [Tue, 6 Feb 2018 16:50:13 +0000 (09:50 -0700)]
Merge pull request #1239 from KhronosGroup/deeper-access-chains

SPV: Create more access chains addressing a few swizzling issues.

6 years agoMerge pull request #1238 from zeux/pp-string-buffer
John Kessenich [Tue, 6 Feb 2018 16:47:44 +0000 (09:47 -0700)]
Merge pull request #1238 from zeux/pp-string-buffer

Preprocessor: Use std::string instead of std::stringstream

6 years agoSPV: Bump up generator number, because previous commit changes code gen slightly.
John Kessenich [Tue, 6 Feb 2018 15:06:36 +0000 (08:06 -0700)]
SPV: Bump up generator number, because previous commit changes code gen slightly.

6 years agoSPV: Create more access chains addressing a few swizzling issues.
John Kessenich [Mon, 5 Feb 2018 21:44:14 +0000 (14:44 -0700)]
SPV: Create more access chains addressing a few swizzling issues.

- Fixes #1233
- Treats local bools like anything else
- more consistently deals with a dynamic component selection

6 years agoPreprocessor: Use std::string instead of std::stringstream
Arseny Kapoulkine [Tue, 6 Feb 2018 00:07:39 +0000 (16:07 -0800)]
Preprocessor: Use std::string instead of std::stringstream

std::stringstream has a measurable overhead for preprocessing - it
appears that operator<< does a tiny bit of extra work for appending
chars/strings and also can't be inlined in most cases on VS2015;
additionally, std::endl triggers a stream flush which also adds up.

Replacing this with std::string buffer gets the preprocessing time down
from 180ms to 135ms in one case, making it 1.33x faster.

Note that integer-to-string conversion is using std::to_string; in
theory this could be slower than sprintf or manual conversion, but I
haven't found these cases to affect preprocessing time in practice
(std::to_string would always use the short string buffer for
line/version numbers, and the number of calls is not too significant).

6 years agoMerge pull request #1234 from dneto0/update-spirv
John Kessenich [Mon, 5 Feb 2018 21:42:45 +0000 (14:42 -0700)]
Merge pull request #1234 from dneto0/update-spirv

Update SPIRV-Tools known-good

6 years agoUpdate SPIRV-Tools known-good
David Neto [Wed, 31 Jan 2018 21:01:55 +0000 (16:01 -0500)]
Update SPIRV-Tools known-good

Update SPIRV-Tools.  Relevant functional changes:
 - Optimizer enhancements:
   - ADCE now removes OpSwitch
   - Block merging occurs in more cases
 - Optimizer fixes:
   - Constant propagation (CCP): support matrix constants
   - #1199: Optimizer: Fix CCP: don't propagate spec constants.
   - #1203: Optimizer: Fix common uniform elim bug introduced by refactoring.
   - #1210: Optimizer: Aggressive dead code elimination: Fix 'break' identification.
   - #1212: Optimizer: Aggressive dead code elimination: Was skipping too many instructions.
   - #1214: Optimizer: Aggressive dead code elimination: Fix infinite loop.
   - #1228: Optimizer: Fix CCP: Handling of varying Phi nodes; was resulting in infinite loop.
   - #1245: Optimizer: Dead branch elimination: Avoid a null pointer dereference.
   - #1250: Optimizer: Dead branch elimination: Avoid spuriously reporting a change.
   - #1262: Support building on VisualStudio 2013 again

Update SPIRV-Headers, with "unified1" directory.

Updated one Glslang legalization test base result due to better block merging.

6 years agoGLSL: Fix #1229: merge array sizes in parameter declarations.
John Kessenich [Fri, 2 Feb 2018 19:39:47 +0000 (12:39 -0700)]
GLSL: Fix #1229: merge array sizes in parameter declarations.

6 years agoMerge pull request #1232 from KhronosGroup/control-flow-attributes
John Kessenich [Fri, 2 Feb 2018 16:03:44 +0000 (09:03 -0700)]
Merge pull request #1232 from KhronosGroup/control-flow-attributes

Control flow attributes

6 years agoError message: Improve error message (will help another party id a bug).
John Kessenich [Thu, 1 Feb 2018 18:09:21 +0000 (11:09 -0700)]
Error message: Improve error message (will help another party id a bug).

6 years agoAST: dump attributes along with control flow.
John Kessenich [Wed, 31 Jan 2018 15:23:01 +0000 (08:23 -0700)]
AST: dump attributes along with control flow.

6 years agoGLSL: Implement GL_EXT_control_flow_attributes.
John Kessenich [Wed, 31 Jan 2018 15:11:18 +0000 (08:11 -0700)]
GLSL: Implement GL_EXT_control_flow_attributes.

See https://github.com/KhronosGroup/GLSL/pull/11.

6 years agoHLSL: Refactor attribute implementation.
John Kessenich [Tue, 30 Jan 2018 18:01:39 +0000 (11:01 -0700)]
HLSL: Refactor attribute implementation.

- make it sharable with GLSL
- correct the case insensitivity
- remove the map; queries are not needed, all entries need processing
- make it easier to build bottom up (will help GLSL parsing)
- support semantic checking and reporting
- allow front-end dependent semantics and attribute name mapping

6 years agoNon-functional: Fix #1231: remove duplicated code.
John Kessenich [Thu, 1 Feb 2018 05:15:45 +0000 (22:15 -0700)]
Non-functional: Fix #1231: remove duplicated code.

6 years agoSPV Version: Emit the requested SPIR-V version, not the header version.
John Kessenich [Thu, 1 Feb 2018 01:35:56 +0000 (18:35 -0700)]
SPV Version: Emit the requested SPIR-V version, not the header version.

Fixes #1236.

6 years agoNon-Functional: Use OpModuleProcessed from the unified header.
John Kessenich [Thu, 1 Feb 2018 01:06:44 +0000 (18:06 -0700)]
Non-Functional: Use OpModuleProcessed from the unified header.

6 years agoEShTargetSpv: Fix #1235, spelling, in a backward compatible way.
John Kessenich [Thu, 1 Feb 2018 00:53:24 +0000 (17:53 -0700)]
EShTargetSpv: Fix #1235, spelling, in a backward compatible way.

6 years agoSPV: Bump SPIR-V header to the unified1 version (version 1.2).
John Kessenich [Mon, 29 Jan 2018 23:16:11 +0000 (16:16 -0700)]
SPV: Bump SPIR-V header to the unified1 version (version 1.2).

6 years agoNon-functional. Fix #1223: expand comments.
John Kessenich [Thu, 18 Jan 2018 04:45:25 +0000 (21:45 -0700)]
Non-functional. Fix #1223: expand comments.

6 years agoMerge pull request #1224 from fjhenigman/unused
John Kessenich [Thu, 18 Jan 2018 03:49:47 +0000 (20:49 -0700)]
Merge pull request #1224 from fjhenigman/unused

Fix unused function warning.

6 years agoMerge pull request #1221 from dneto0/update-spirv
John Kessenich [Wed, 17 Jan 2018 09:02:35 +0000 (02:02 -0700)]
Merge pull request #1221 from dneto0/update-spirv

Update known-good spirv-tools.

6 years agoFix unused function warning.
Frank Henigman [Tue, 16 Jan 2018 05:18:26 +0000 (00:18 -0500)]
Fix unused function warning.

TGlslangToSpvTraverser::getExtBuiltins is only used when AMD_EXTENSIONS
is defined, so only define it in that case to avoid an unused function
warning.

6 years agoUpdate known-good spirv-tools.
David Neto [Fri, 12 Jan 2018 16:24:37 +0000 (11:24 -0500)]
Update known-good spirv-tools.

Optimizations used in HLSL legalization now sweep away unused types.

6 years agoHLSL: Fix #1208: accept both int and uint in asuint() and asint().
John Kessenich [Thu, 11 Jan 2018 20:26:09 +0000 (13:26 -0700)]
HLSL: Fix #1208: accept both int and uint in asuint() and asint().

6 years agoHLSL: Protect against 'continue' outside of loops.
John Kessenich [Wed, 10 Jan 2018 10:50:42 +0000 (03:50 -0700)]
HLSL: Protect against 'continue' outside of loops.

6 years agoHLSL: Fix #1214: check for nesting in loop/switch of break statements.
John Kessenich [Wed, 10 Jan 2018 05:32:42 +0000 (22:32 -0700)]
HLSL: Fix #1214: check for nesting in loop/switch of break statements.

6 years agoHLSL: Fix #1215: propagate error on seeing a type name instead of a variable.
John Kessenich [Wed, 10 Jan 2018 04:35:44 +0000 (21:35 -0700)]
HLSL: Fix #1215: propagate error on seeing a type name instead of a variable.

6 years agoGLSL: XFB: more support for built-in block redeclarations with XFB.
John Kessenich [Wed, 10 Jan 2018 00:25:46 +0000 (17:25 -0700)]
GLSL: XFB: more support for built-in block redeclarations with XFB.

- correct inheritence (or not) of the right XFB buffer
- compute implicit stride (fixes #1212)
- semantic check block-member redeclarations
- inherit stride from a member

6 years agoScanner: Many int16 and float16 fixes, including performance.
John Kessenich [Mon, 8 Jan 2018 22:59:29 +0000 (15:59 -0700)]
Scanner: Many int16 and float16 fixes, including performance.

- fixes #1209, addresses most of #1187
- only query feature availability on seeing the feature
  (was doing it for every single token)
- correct case-sensitive checks for multi-character suffixes

6 years agoScanner: Many int64 fixes, including performance.
John Kessenich [Mon, 8 Jan 2018 18:48:50 +0000 (11:48 -0700)]
Scanner: Many int64 fixes, including performance.

- partially addresses #1209 and #1187
- only query 64-bit extension on seeing use of a 64-bit literal
  (was doing it for every single token)
- correct HLSL acceptance of 64-bit literal syntax (still an int though)
- error on overflow of 32-bit literal type

6 years agoNon-functional: Fix HLSL error message, and code formatting.
John Kessenich [Mon, 8 Jan 2018 18:41:59 +0000 (11:41 -0700)]
Non-functional: Fix HLSL error message, and code formatting.

6 years agoMerge pull request #1211 from greg-lunarg/kg7
John Kessenich [Fri, 5 Jan 2018 19:01:03 +0000 (12:01 -0700)]
Merge pull request #1211 from greg-lunarg/kg7

Update known good spirv-tools. Fixes issue #1205.

6 years agoUpdate known good spirv-tools. Fixes issue #1205.
GregF [Fri, 5 Jan 2018 18:17:34 +0000 (11:17 -0700)]
Update known good spirv-tools. Fixes issue #1205.

6 years agoBuild: Tickle bots to try again... seems like a process hang; all tests passed.
John Kessenich [Tue, 2 Jan 2018 20:07:14 +0000 (13:07 -0700)]
Build: Tickle bots to try again... seems like a process hang; all tests passed.

6 years agoHLSL: Fix #1203: Declare anonymous members for cbuffer with no ';'
John Kessenich [Tue, 2 Jan 2018 18:27:54 +0000 (11:27 -0700)]
HLSL: Fix #1203: Declare anonymous members for cbuffer with no ';'

The grammar for no semicolon and no object name for cbuffer/tbuffer
was correct, but the production still skipped the anonymous declarations
if an identifier followed.

6 years agoHLSL: Fix 1201: Accept 'layout' as an identifier.
John Kessenich [Sat, 30 Dec 2017 03:59:13 +0000 (20:59 -0700)]
HLSL: Fix 1201: Accept 'layout' as an identifier.

6 years agoHLSL: Attributes: Add [[vk::constant_id()]] and [[vk::push_constant]]
John Kessenich [Sun, 24 Dec 2017 00:29:45 +0000 (17:29 -0700)]
HLSL: Attributes: Add [[vk::constant_id()]] and [[vk::push_constant]]

6 years agoMerge pull request #1190 from jfmarquis/hlsl-store-type-propagation
John Kessenich [Thu, 21 Dec 2017 21:59:34 +0000 (14:59 -0700)]
Merge pull request #1190 from jfmarquis/hlsl-store-type-propagation

HLSL: Fix possibly incorrect type conversion in Store2-3-4

6 years agoMerge branch 'greg-lunarg-flatten1'
John Kessenich [Thu, 21 Dec 2017 19:26:27 +0000 (12:26 -0700)]
Merge branch 'greg-lunarg-flatten1'

6 years agoMerge branch 'flatten1' of https://github.com/greg-lunarg/glslang into greg-lunarg...
John Kessenich [Thu, 21 Dec 2017 19:25:52 +0000 (12:25 -0700)]
Merge branch 'flatten1' of https://github.com/greg-lunarg/glslang into greg-lunarg-flatten1

6 years agoHLSL Tests: Remove optimization from tests that don't need it.
John Kessenich [Thu, 21 Dec 2017 19:17:25 +0000 (12:17 -0700)]
HLSL Tests: Remove optimization from tests that don't need it.

This is to create more stable test results.

6 years agoHLSL Legalization: Add scalar replacement
GregF [Thu, 21 Dec 2017 17:55:57 +0000 (10:55 -0700)]
HLSL Legalization: Add scalar replacement

This allow for propagation through structs with dynamically indexed
arrays. This supports recent removal of non-io struct flattening.

6 years agoHLSL: Fix possibly incorrect type conversion in StoreN and LoadN
Jean-François Marquis [Fri, 15 Dec 2017 17:57:33 +0000 (12:57 -0500)]
HLSL: Fix possibly incorrect type conversion in StoreN and LoadN

Set type to r-value resulting from indexing vector, to prevent
float->uint conversion when source is already uint. Resulting
OpConvertFToU would otherwise fail validation because source is
already uint.
For LoadN, incorrect uint->float->uint can be avoided; fixing
potential truncation of big integer values.

6 years agoMerge pull request #1195 from LoopDawg/gcc-bug-workaround
John Kessenich [Wed, 20 Dec 2017 22:37:22 +0000 (15:37 -0700)]
Merge pull request #1195 from LoopDawg/gcc-bug-workaround

compile error fix for g++ 5.4.0

6 years agog++ 5.4.0 suspected defect workaround
LoopDawg [Wed, 20 Dec 2017 00:53:46 +0000 (17:53 -0700)]
g++ 5.4.0 suspected defect workaround

Fix compilation error under g++ 5.4.0.

6 years agoSPV: Document history of the generator version number.
John Kessenich [Sun, 17 Dec 2017 06:46:37 +0000 (23:46 -0700)]
SPV: Document history of the generator version number.

6 years agoGLSL: Fix #1193: no 'location' on uniform/buffer block.
John Kessenich [Sat, 16 Dec 2017 17:07:22 +0000 (10:07 -0700)]
GLSL: Fix #1193: no 'location' on uniform/buffer block.

6 years agogcc: potentially a compiler-bug work around
John Kessenich [Sat, 16 Dec 2017 09:58:10 +0000 (02:58 -0700)]
gcc: potentially a compiler-bug work around

6 years agoSPV: Memory model: Reduce set of memory-semantic bits requested for "all".
John Kessenich [Fri, 15 Dec 2017 15:51:31 +0000 (08:51 -0700)]
SPV: Memory model: Reduce set of memory-semantic bits requested for "all".

6 years agoSPV: HLSL: Move to correct HLSL barrier semantics, per Khronos recommendation.
John Kessenich [Wed, 13 Dec 2017 05:50:53 +0000 (22:50 -0700)]
SPV: HLSL: Move to correct HLSL barrier semantics, per Khronos recommendation.

6 years agoSPV: Bump the generator number to account for barrier changes.
John Kessenich [Mon, 11 Dec 2017 15:24:06 +0000 (08:24 -0700)]
SPV: Bump the generator number to account for barrier changes.

6 years agoSPV: Change barrier emission to conform to Khronos decisions.
John Kessenich [Mon, 11 Dec 2017 11:02:24 +0000 (04:02 -0700)]
SPV: Change barrier emission to conform to Khronos decisions.

The memory model group agreed to these definitions for how
to map GLSL barrier, memoryBarrier, etc. With HLSL following suit.

6 years agoHLSL: Fix #1192: when bool operands are converted to ints, convert result type.
John Kessenich [Sat, 16 Dec 2017 04:46:09 +0000 (21:46 -0700)]
HLSL: Fix #1192: when bool operands are converted to ints, convert result type.

6 years agoMerge pull request #1191 from greg-lunarg/kg6
John Kessenich [Sat, 16 Dec 2017 02:25:35 +0000 (19:25 -0700)]
Merge pull request #1191 from greg-lunarg/kg6

Update spirv-tools known-good.

6 years agoUpdate spirv-tools known-good.
GregF [Fri, 15 Dec 2017 18:29:43 +0000 (11:29 -0700)]
Update spirv-tools known-good.

6 years agoHLSL: Make attributes for built-in override semantics.
John Kessenich [Fri, 15 Dec 2017 15:15:26 +0000 (08:15 -0700)]
HLSL: Make attributes for built-in override semantics.

Fixes #1188.

6 years agoMerge pull request #1189 from KhronosGroup/spv-xfb
John Kessenich [Fri, 15 Dec 2017 14:19:05 +0000 (07:19 -0700)]
Merge pull request #1189 from KhronosGroup/spv-xfb

SPV: Implement XFB

6 years agoSPV: Plumb through XFB buffer and stride information.
John Kessenich [Fri, 15 Dec 2017 13:21:46 +0000 (06:21 -0700)]
SPV: Plumb through XFB buffer and stride information.

Also, only emit this XFB information where the SPIR-V spec says
it should be emitted: essentially, on objects.

This and the previous commit together fix #1185.