platform/upstream/glslang.git
5 years agoMerge pull request #1752 from dgkoch/dkoch_build_fix18
John Kessenich [Mon, 8 Apr 2019 14:28:26 +0000 (21:28 +0700)]
Merge pull request #1752 from dgkoch/dkoch_build_fix18

Add cstdlib include

5 years agoAdd cstdlib include
Daniel Koch [Sat, 6 Apr 2019 11:43:17 +0000 (07:43 -0400)]
Add cstdlib include

On some platforms some of the includers of this header don't have
'atoi' defined after the change in #1749

5 years agoMerge pull request #1750 from greg-lunarg/kg103
John Kessenich [Fri, 5 Apr 2019 03:42:03 +0000 (10:42 +0700)]
Merge pull request #1750 from greg-lunarg/kg103

Update spirv-tools known-good

5 years agoUpdate spirv-tools known-good
Greg Fischer [Thu, 4 Apr 2019 16:19:55 +0000 (10:19 -0600)]
Update spirv-tools known-good

5 years agoUpdate to latest SPIR-V header and bump revision.
John Kessenich [Thu, 4 Apr 2019 15:38:26 +0000 (09:38 -0600)]
Update to latest SPIR-V header and bump revision.

5 years agoMerge pull request #1749 from dgkoch/dgkoch_common_mscver
John Kessenich [Thu, 4 Apr 2019 07:29:31 +0000 (14:29 +0700)]
Merge pull request #1749 from dgkoch/dgkoch_common_mscver

Check if _MSC_VER is defined before using.

5 years agoCheck if _MSC_VER is defined before using.
Daniel Koch [Wed, 3 Apr 2019 21:21:06 +0000 (17:21 -0400)]
Check if _MSC_VER is defined before using.

Fixes compilation errors on some platforms.

5 years agoMerge pull request #1746 from karl-lunarg/gtest-install
John Kessenich [Wed, 3 Apr 2019 09:08:17 +0000 (16:08 +0700)]
Merge pull request #1746 from karl-lunarg/gtest-install

build: Don't ship GTEST headers in install target

5 years agobuild: Don't ship GTEST headers in install target
Karl Schultz [Tue, 2 Apr 2019 20:58:25 +0000 (14:58 -0600)]
build: Don't ship GTEST headers in install target

A project that uses googletest(GTEST) shouldn't include googletest
headers with its artifacts in its install target.  These headers
simply are not needed by the consumers of the install target and
can cause conflicts with other projects that use googletest
themselves and this project's install target.  And they are just not
part of the expected glslang build artifacts.

It is likely that the addition of the googletest headers to the install
target was a simple oversight that happens as a result of adding
googletest as a CMake subdirectory.

For more information on how this causes conflicts with other projects,
please see: https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/821.

5 years agoMerge pull request #1742 from greg-lunarg/kg102
John Kessenich [Thu, 28 Mar 2019 02:28:43 +0000 (09:28 +0700)]
Merge pull request #1742 from greg-lunarg/kg102

Update spirv-tools known-good

5 years agoUpdate spirv-tools known-good
Greg Fischer [Wed, 27 Mar 2019 17:43:03 +0000 (11:43 -0600)]
Update spirv-tools known-good

5 years agoMerge pull request #1740 from ewerness-nv/callableincoming
John Kessenich [Wed, 27 Mar 2019 09:19:05 +0000 (16:19 +0700)]
Merge pull request #1740 from ewerness-nv/callableincoming

Callables shouldn't have incoming ray flags

5 years agoMerge pull request #1741 from dgkoch/shader_subgroup
John Kessenich [Wed, 27 Mar 2019 06:41:47 +0000 (13:41 +0700)]
Merge pull request #1741 from dgkoch/shader_subgroup

Enable GL_KHR_shader_subgroup properly

5 years agoEnable GL_KHR_shader_subgroup properly
Daniel Koch [Tue, 26 Mar 2019 17:45:33 +0000 (13:45 -0400)]
Enable GL_KHR_shader_subgroup properly

(and GL_NV_shader_subgroup_partitioned) based on GL/ES version
instead of predicating it on vulkan SPV generation

Also add AST testing.
The glsl.450.subgroup* files are largely the same as the spv.subgroup*
The glsl.es320.subgroup* files are the same as the 450 versions, but modified to be ES compatible.

5 years agoCallables shouldn't have incoming ray flags
Eric Werness [Mon, 25 Mar 2019 16:53:52 +0000 (09:53 -0700)]
Callables shouldn't have incoming ray flags

5 years agoMerge pull request #1711 from demett-brcm/avoid-undefined-behaviour
John Kessenich [Tue, 19 Mar 2019 07:40:21 +0000 (14:40 +0700)]
Merge pull request #1711 from demett-brcm/avoid-undefined-behaviour

Avoid undefined behaviour

5 years agoGLSL: Fix tessellation control shader bounding box support. (#1730)
Laurie [Tue, 19 Mar 2019 01:49:27 +0000 (01:49 +0000)]
GLSL: Fix tessellation control shader bounding box support. (#1730)

Prior to this change, OES_primitive_bounding_box and EXT_primitive_bounding_box were both recognised as extensions, but only the name gl_BoundingBoxOES could be used. However the EXT version uses the name gl_BoundingBoxEXT instead. In addition, since GLES 3.2, the extension has been included in the core standard and the name gl_BoundingBox may be used instead. This change aims to make both extensions and the 3.2 core version all work.

5 years agoMerge pull request #1733 from null77/fix-msvc-warn
John Kessenich [Mon, 18 Mar 2019 16:41:27 +0000 (23:41 +0700)]
Merge pull request #1733 from null77/fix-msvc-warn

Suppress MSVC warning about unused variable.

5 years agoMerge pull request #1731 from godlikepanos/master
John Kessenich [Mon, 18 Mar 2019 16:38:27 +0000 (23:38 +0700)]
Merge pull request #1731 from godlikepanos/master

Avoid running the validator as part of the optimization pass.

5 years agoSuppress MSVC warning about unused variable.
Jamie Madill [Mon, 18 Mar 2019 15:38:53 +0000 (11:38 -0400)]
Suppress MSVC warning about unused variable.

One variable was only used in an 'assert' call. MSVC flagged this
as unused in Release. Suppress the warning and also add a static
cast to void so the variable becomes referenced.

5 years agoAvoid running the validator as part of the optimization pass.
Panagiotis Christopoulos Charitos [Mon, 18 Mar 2019 10:34:17 +0000 (11:34 +0100)]
Avoid running the validator as part of the optimization pass.

The spvtools::Optimizer::Run method glslang is using constructs a default set
of spvtools::OptimizerOptions. This default set of options instructs the
validator to run. That is not quite correct since glslang will invoke the
validator _explicitly_ after the optimization pass.

Change-Id: I30f458304c6e7f81e89fc4ebd25eabbbd8348063

5 years agoBuild: Update to the most recent SPIR-V headers, for Rev. 7 of SPV 1.3
John Kessenich [Mon, 18 Mar 2019 04:29:25 +0000 (22:29 -0600)]
Build: Update to the most recent SPIR-V headers, for Rev. 7 of SPV 1.3

5 years agoMerge pull request #1728 from alelenv/shaderrecord_fix
John Kessenich [Sun, 17 Mar 2019 06:00:27 +0000 (13:00 +0700)]
Merge pull request #1728 from alelenv/shaderrecord_fix

Error out writes to shaderRecordNV buffer blocks.

5 years agoMerge pull request #1724 from zoddicus/roll_spirv
John Kessenich [Tue, 12 Mar 2019 17:16:57 +0000 (00:16 +0700)]
Merge pull request #1724 from zoddicus/roll_spirv

Update SPIRV-Tools and Headers

5 years agoUpdate SPIRV-Tools and Headers
Ryan Harrison [Tue, 12 Mar 2019 15:25:00 +0000 (11:25 -0400)]
Update SPIRV-Tools and Headers

Also mark spv.subgroupPartitioned as passing validation.

5 years agoMerge pull request #1723 from null77/gn-val-executable
John Kessenich [Tue, 12 Mar 2019 04:33:26 +0000 (11:33 +0700)]
Merge pull request #1723 from null77/gn-val-executable

GN: Make glslang_validator an executable.

5 years agoGN: Make glslang_validator an executable.
Jamie Madill [Mon, 11 Mar 2019 19:45:31 +0000 (15:45 -0400)]
GN: Make glslang_validator an executable.

The target was accidentally listed as a source_set.

5 years agoMerge pull request #1717 from jeffbolznv/getBufferReferenceAlignment
John Kessenich [Thu, 7 Mar 2019 04:05:08 +0000 (11:05 +0700)]
Merge pull request #1717 from jeffbolznv/getBufferReferenceAlignment

Move getBufferReferenceAlignment to be a method of TType

5 years agoMerge pull request #1716 from jeffbolznv/buffer_reference_fold2
John Kessenich [Thu, 7 Mar 2019 04:04:26 +0000 (11:04 +0700)]
Merge pull request #1716 from jeffbolznv/buffer_reference_fold2

Improved fix for buffer reference constants

5 years agoMove getBufferReferenceAlignment to be a method of TType
Jeff Bolz [Wed, 6 Mar 2019 19:34:10 +0000 (13:34 -0600)]
Move getBufferReferenceAlignment to be a method of TType

This is a better place for it logically, since it is not specific to
glsl->spirv translation. And in a future change I want to use it outside
of glslangtospv.

5 years agoImproved fix for buffer reference constants
Jeff Bolz [Wed, 6 Mar 2019 05:27:09 +0000 (23:27 -0600)]
Improved fix for buffer reference constants

This is an alternate fix for the issue described in commit be63facd, whose
solution didn't work if there were non-trivial operations involved in computing
a constant initializer which caused the 'constant unfolding' code to kick in
(addConstantReferenceConversion). Instead, this change does the 'unfolding'
later in createSpvConstantFromConstUnionArray. If a reference-type constant has
survived that long, then folding is already done, this must be a 'real' (inside
a function) use of the constant, and it should be safe to unfold and apply the
bitcast.

5 years agoMerge pull request #1714 from jeffbolznv/volatil
John Kessenich [Wed, 6 Mar 2019 13:43:07 +0000 (20:43 +0700)]
Merge pull request #1714 from jeffbolznv/volatil

Fix interactions between 'volatile' and the Vulkan memory model

5 years agoBuild: Update to latest SPIR-V header.
John Kessenich [Wed, 6 Mar 2019 04:21:38 +0000 (11:21 +0700)]
Build: Update to latest SPIR-V header.

5 years agoFix interactions between 'volatile' and the Vulkan memory model
Jeff Bolz [Tue, 5 Mar 2019 20:40:07 +0000 (14:40 -0600)]
Fix interactions between 'volatile' and the Vulkan memory model

Last year we changed 'volatile' to also act as 'coherent', but when I
resolved the memory model changes against that change I missed handling
volatile in a couple places that we check for coherent. There was also
a place in post-processing that acted as if the volatile memory access
flag has a literal number associated with it, when it doesn't.

5 years agoMerge pull request #1699 from jeffbolznv/buffer_reference_fold
John Kessenich [Mon, 4 Mar 2019 20:41:27 +0000 (13:41 -0700)]
Merge pull request #1699 from jeffbolznv/buffer_reference_fold

Handle buffer references vs 'const'

5 years agoError out writes to shaderRecordNV buffer blocks.
Ashwin Lele [Mon, 4 Mar 2019 19:05:55 +0000 (11:05 -0800)]
Error out writes to shaderRecordNV buffer blocks.

5 years agoHandle buffer references vs 'const'
Jeff Bolz [Mon, 18 Feb 2019 06:11:05 +0000 (00:11 -0600)]
Handle buffer references vs 'const'

Allow constructors to and from references to be constant folded. Section 4.3.3
says constructors whose arguments are all constant expressions must fold.

Disallow 'const' on buffer reference types. It is not a 'non-void transparent
basic data type' (it is not considered 'basic').

Handle buffer reference constants (which can be assigned to a non-const reference,
or can be further folded to another type of constant) by converting to
'constructor(uint64_t constant)' in addConversion.

Disallow == and != operators on reference types.

5 years agoMerge pull request #1713 from jeffbolznv/fix_nv_extension_disabled
John Kessenich [Thu, 28 Feb 2019 19:47:04 +0000 (14:47 -0500)]
Merge pull request #1713 from jeffbolznv/fix_nv_extension_disabled

Fix NV_EXTENSIONS-disabled build

5 years agoFix NV_EXTENSIONS-disabled build
Jeff Bolz [Thu, 28 Feb 2019 17:59:35 +0000 (11:59 -0600)]
Fix NV_EXTENSIONS-disabled build

5 years agoMerge pull request #1701 from jeffbolznv/cooperative_matrix
John Kessenich [Tue, 26 Feb 2019 14:27:09 +0000 (21:27 +0700)]
Merge pull request #1701 from jeffbolznv/cooperative_matrix

Implement GL_NV_cooperative_matrix

5 years agoImplement GL_NV_cooperative_matrix
Jeff Bolz [Tue, 19 Feb 2019 19:10:32 +0000 (13:10 -0600)]
Implement GL_NV_cooperative_matrix

5 years agoAvoid undefined behaviour
David Emett [Mon, 25 Feb 2019 19:13:05 +0000 (19:13 +0000)]
Avoid undefined behaviour

5 years agoMerge pull request #1709 from KhronosGroup/fix-pp
John Kessenich [Fri, 22 Feb 2019 18:09:17 +0000 (01:09 +0700)]
Merge pull request #1709 from KhronosGroup/fix-pp

PP: Fix #1605: Paste tokens for ## through number->letter transitions.

5 years agoPP: Fix #1605: Paste tokens for ## through number->letter transitions.
John Kessenich [Wed, 20 Feb 2019 10:03:40 +0000 (03:03 -0700)]
PP: Fix #1605: Paste tokens for ## through number->letter transitions.

5 years agoMerge pull request #1706 from nico/master
John Kessenich [Thu, 21 Feb 2019 16:46:27 +0000 (23:46 +0700)]
Merge pull request #1706 from nico/master

Fix -Wextra-semi warnings in headers used in Chromium

5 years agoMerge pull request #1705 from baldurk/fix-indexindirect-reflection
John Kessenich [Thu, 21 Feb 2019 16:43:59 +0000 (23:43 +0700)]
Merge pull request #1705 from baldurk/fix-indexindirect-reflection

Fix type recursion with EOpIndexIndirect dereferences

5 years agoFix -Wextra-semi warnings in headers used in Chromium
Nico Weber [Thu, 21 Feb 2019 16:05:21 +0000 (11:05 -0500)]
Fix -Wextra-semi warnings in headers used in Chromium

5 years agoFix type recursion with EOpIndexIndirect dereferences
baldurk [Mon, 18 Feb 2019 09:36:29 +0000 (09:36 +0000)]
Fix type recursion with EOpIndexIndirect dereferences

* This primarily affects arrays-of-arrays but it can also affect arrays-of-
  structs if there are no further dereferences.

5 years agoMerge pull request #1702 from greg-lunarg/kg101
John Kessenich [Thu, 21 Feb 2019 06:36:31 +0000 (13:36 +0700)]
Merge pull request #1702 from greg-lunarg/kg101

Update SPIRV-Tools known good

5 years agoMerge pull request #1703 from dj2/mem_leak
John Kessenich [Thu, 21 Feb 2019 06:10:18 +0000 (13:10 +0700)]
Merge pull request #1703 from dj2/mem_leak

Allocate empty function name in the string pool.

5 years agoMerge pull request #1704 from dj2/leak
John Kessenich [Thu, 21 Feb 2019 06:09:30 +0000 (13:09 +0700)]
Merge pull request #1704 from dj2/leak

Fixup leak of TString

5 years agoFixup leak of TString
Dan Sinclair [Wed, 20 Feb 2019 21:40:13 +0000 (16:40 -0500)]
Fixup leak of TString

In decomposeIntrinsic a new TString was being allocated and passed into
a TVariable. That string was leaking. This CL converts the new TString
to call NewPoolTString to allocate from the TString pool.

5 years agoAllocate empty function name in the string pool.
Dan Sinclair [Wed, 20 Feb 2019 21:30:35 +0000 (16:30 -0500)]
Allocate empty function name in the string pool.

Inside the grammar for function_identifier if the .function is null an
empty function name is allocated. This is allocated on the stack and
passed into TFunction as a pointer. TFunction just stores that pointer.

Later, when we access the name we will receive an invalid usage of a
stack allocated variable. This CL switches to using NewPoolTStringn for
the empty function name.

5 years agoUpdate SPIRV-Tools known good
Greg Fischer [Wed, 20 Feb 2019 20:17:09 +0000 (13:17 -0700)]
Update SPIRV-Tools known good

5 years agoMerge pull request #1700 from KhronosGroup/fix-pp
John Kessenich [Tue, 19 Feb 2019 16:57:06 +0000 (23:57 +0700)]
Merge pull request #1700 from KhronosGroup/fix-pp

PP: Remove sub-tokens in macro recording and record spaces correctly.

5 years agoPP: Faithfully track white-space through macro record/use, fixing bugs:
John Kessenich [Tue, 19 Feb 2019 10:12:02 +0000 (03:12 -0700)]
PP: Faithfully track white-space through macro record/use, fixing bugs:

This fixes the comparison in macro body redefinitions, where initial
white-space differences do not matter, but internal white-space differences
do matter.

5 years agoPP: Non-functional: Remove the sub-tokenization of macro stream record.
John Kessenich [Tue, 19 Feb 2019 09:31:01 +0000 (02:31 -0700)]
PP: Non-functional: Remove the sub-tokenization of macro stream record.

This has been a continually fragile area. Switching to a vector of real
objects, instead of a linearized stream of characters, removes a bunch of
code and generally makes this area more robust.

5 years agoBuild: Fix #1640: Change strcpy to snprintf.
John Kessenich [Tue, 19 Feb 2019 05:25:58 +0000 (22:25 -0700)]
Build: Fix #1640: Change strcpy to snprintf.

5 years agoMerge pull request #1696 from baldurk/fix-nonblock-array-size
John Kessenich [Sun, 17 Feb 2019 06:15:11 +0000 (13:15 +0700)]
Merge pull request #1696 from baldurk/fix-nonblock-array-size

Fix treatment of array input/output variables in reflection

5 years agoPP: Fix #1694: Rationalize errors on partially expanded macro argument.
John Kessenich [Sat, 16 Feb 2019 14:35:13 +0000 (07:35 -0700)]
PP: Fix #1694: Rationalize errors on partially expanded macro argument.

5 years agoMerge pull request #1697 from sparmarNV/fix-NV_mesh_shader
John Kessenich [Thu, 14 Feb 2019 10:49:29 +0000 (17:49 +0700)]
Merge pull request #1697 from sparmarNV/fix-NV_mesh_shader

Fix resizing of gl_PrimitiveIndicesNV[] to max_primitives*geomSize

5 years agoHandle resizing/error checks for mesh shader out arrays
Sahil Parmar [Thu, 14 Feb 2019 01:40:27 +0000 (17:40 -0800)]
Handle resizing/error checks for mesh shader out arrays

5 years agoUpdate gtest to explicitly size gl_PrimitiveIndicesNV[]
Sahil Parmar [Tue, 12 Feb 2019 20:27:21 +0000 (12:27 -0800)]
Update gtest to explicitly size gl_PrimitiveIndicesNV[]

5 years agoFix resizing of gl_PrimitiveIndicesNV[] to max_primitives*geomSize
Sahil Parmar [Mon, 11 Feb 2019 23:12:13 +0000 (15:12 -0800)]
Fix resizing of gl_PrimitiveIndicesNV[] to max_primitives*geomSize

- This change also allows redeclaration of gl_PrimitiveIndicesNV and
  adds error checks against incorrect explicit array size.
- Also modifies gtests to check array bound limits and redeclare gl_PrimitiveIndicesNV[].

5 years agoFix treatment of array input/output variables in reflection
baldurk [Mon, 11 Feb 2019 16:39:12 +0000 (16:39 +0000)]
Fix treatment of array input/output variables in reflection

* Non-block arrays should not be ignored when exploding types.
* When not exploding, set the array size correctly on each item.

5 years agoMerge pull request #1695 from baldurk/explode-reflected-io-blocks
John Kessenich [Mon, 11 Feb 2019 15:08:10 +0000 (22:08 +0700)]
Merge pull request #1695 from baldurk/explode-reflected-io-blocks

Add option to unwrap I/O block aggregates in reflection

5 years agoAdd option to unwrap I/O block aggregates in reflection
baldurk [Mon, 11 Feb 2019 11:50:24 +0000 (11:50 +0000)]
Add option to unwrap I/O block aggregates in reflection

* We follow similar rules to uniform block exploding.

5 years agoWhitespace: Fix some tabs->spaces, mostly to retriggered failed bots.
John Kessenich [Mon, 11 Feb 2019 10:43:12 +0000 (03:43 -0700)]
Whitespace: Fix some tabs->spaces, mostly to retriggered failed bots.

5 years agoPP: Fix #1694: Handle badly formed argument substitution.
John Kessenich [Mon, 11 Feb 2019 10:05:00 +0000 (03:05 -0700)]
PP: Fix #1694: Handle badly formed argument substitution.

Also added a warning for no space after a macro name.

5 years agoMerge pull request #1684 from baldurk/reflection-interface-improve
John Kessenich [Sat, 9 Feb 2019 05:59:30 +0000 (12:59 +0700)]
Merge pull request #1684 from baldurk/reflection-interface-improve

Opt-in improvements to reflection interface

5 years agoReflow for better readability
baldurk [Fri, 8 Feb 2019 10:48:48 +0000 (10:48 +0000)]
Reflow for better readability

5 years agoBump version.
John Kessenich [Fri, 8 Feb 2019 06:56:53 +0000 (23:56 -0700)]
Bump version.

5 years agoBuild: Fix #1665: remove __fastcall
John Kessenich [Fri, 8 Feb 2019 06:28:37 +0000 (23:28 -0700)]
Build: Fix #1665: remove __fastcall

5 years agoMerge pull request #1693 from sparmarNV/fix-NV_mesh_shader
John Kessenich [Fri, 8 Feb 2019 04:34:47 +0000 (11:34 +0700)]
Merge pull request #1693 from sparmarNV/fix-NV_mesh_shader

Add missing support for gl_MeshViewCountNV/gl_MeshViewIndicesNV in task shaders

5 years agoAdd missing support for gl_MeshViewCountNV/gl_MeshViewIndicesNV in task shaders
Sahil Parmar [Thu, 7 Feb 2019 22:28:12 +0000 (14:28 -0800)]
Add missing support for gl_MeshViewCountNV/gl_MeshViewIndicesNV in task shaders

5 years agoMerge pull request #1692 from alan-baker/update-spvtools
John Kessenich [Thu, 7 Feb 2019 03:27:58 +0000 (10:27 +0700)]
Merge pull request #1692 from alan-baker/update-spvtools

Update SPIRV-Tools and tests expectations

5 years agoUpdate expected test results
Alan Baker [Wed, 6 Feb 2019 19:18:19 +0000 (14:18 -0500)]
Update expected test results

5 years agoUpdate SPIRV-Tools version
Alan Baker [Wed, 6 Feb 2019 19:17:51 +0000 (14:17 -0500)]
Update SPIRV-Tools version

5 years agoAdd option to reflect all block members, inactive or active.
baldurk [Wed, 30 Jan 2019 15:34:02 +0000 (15:34 +0000)]
Add option to reflect all block members, inactive or active.

* The stages mask is more fine-grained, and each variable or block's mask
  indicates which stages it's active in.

5 years agoAdd option to reflect buffer blocks & variables separately to uniforms
baldurk [Wed, 30 Jan 2019 14:18:43 +0000 (14:18 +0000)]
Add option to reflect buffer blocks & variables separately to uniforms

* Also note the uniform indices of atomic counter buffers

5 years agoReflect array stride, top-level array stride, and block member count
baldurk [Tue, 29 Jan 2019 19:10:56 +0000 (19:10 +0000)]
Reflect array stride, top-level array stride, and block member count

5 years agoReflect pipeline outputs as well as inputs, optionally from other stages
baldurk [Tue, 29 Jan 2019 16:04:44 +0000 (16:04 +0000)]
Reflect pipeline outputs as well as inputs, optionally from other stages

* We add an option to reflect inputs from other stages than vertex, if only a
  later subset of the stages is linked into the program.

5 years agoAdd an option to report array variables with trailing [0] suffix
baldurk [Tue, 29 Jan 2019 15:49:00 +0000 (15:49 +0000)]
Add an option to report array variables with trailing [0] suffix

* This is as expected by ARB_program_interface_query

5 years agoInclude array index in reflected uniform names more consistently
baldurk [Tue, 29 Jan 2019 12:12:59 +0000 (12:12 +0000)]
Include array index in reflected uniform names more consistently

* This comes from the resolution of issues 4, 5 & 6 in
  ARB_program_interface_query, stating that uniform buffers should have their
  members expanded out as normal and arrays should have elements added.
* If a buffer block has a large array e.g. [10000] we don't want to iterate over
  every array element. Instead we should only expand out the first [0] element,
  then expand as normal from there.
* The array name should still be appended with [0] to indicate that it's an
  array.

5 years agoAdd options to control how reflection information is built
baldurk [Tue, 29 Jan 2019 15:45:56 +0000 (15:45 +0000)]
Add options to control how reflection information is built

5 years agoMove TObjectReflection into public interface to clean up reflection
baldurk [Tue, 29 Jan 2019 15:30:48 +0000 (15:30 +0000)]
Move TObjectReflection into public interface to clean up reflection

* Forwarding functions are left to preserve source compatibility with code using
  the old queries.

5 years agoMerge pull request #1687 from Igalia/apinheiro/no-more-struct-member-offsets
John Kessenich [Sun, 3 Feb 2019 16:22:21 +0000 (23:22 +0700)]
Merge pull request #1687 from Igalia/apinheiro/no-more-struct-member-offsets

ParseHelper: don't assign xfb_offset for struct members

5 years agoMerge pull request #1667 from amdrexu/bugfix
John Kessenich [Sun, 3 Feb 2019 16:05:42 +0000 (23:05 +0700)]
Merge pull request #1667 from amdrexu/bugfix

Add 8-bit/16-bit transform feedback support for future use

5 years agoAdd 8-bit/16-bit transform feedback support for future use
Rex Xu [Mon, 21 Jan 2019 08:50:17 +0000 (16:50 +0800)]
Add 8-bit/16-bit transform feedback support for future use

5 years agoMerge pull request #1690 from BinaryRK/relative-include-fix
John Kessenich [Sun, 3 Feb 2019 03:32:33 +0000 (10:32 +0700)]
Merge pull request #1690 from BinaryRK/relative-include-fix

Use relative include paths in StandAlone/ResourceLimits.h

5 years agoSwitch to relative include path for ResourceLimits
BinaryRK [Sat, 2 Feb 2019 13:56:09 +0000 (15:56 +0200)]
Switch to relative include path for ResourceLimits

5 years agoMerge pull request #1688 from mattparks/patch-1
John Kessenich [Fri, 1 Feb 2019 14:28:20 +0000 (06:28 -0800)]
Merge pull request #1688 from mattparks/patch-1

Switched to std::string for TReflection and TObjectReflection

5 years agoFix #1682: flesh out more vulkan/SPV ModuleProcessed
John Kessenich [Fri, 1 Feb 2019 11:07:45 +0000 (04:07 -0700)]
Fix #1682: flesh out more vulkan/SPV ModuleProcessed

5 years agoMerge pull request #1686 from mspang/glslang-fuchsia-build
John Kessenich [Fri, 1 Feb 2019 07:27:01 +0000 (23:27 -0800)]
Merge pull request #1686 from mspang/glslang-fuchsia-build

Port Unix/ossource.cpp to Fuchsia

5 years agoMerge pull request #1685 from baldurk/warning-fix
John Kessenich [Fri, 1 Feb 2019 06:44:19 +0000 (22:44 -0800)]
Merge pull request #1685 from baldurk/warning-fix

Fix a couple of warnings clang found

5 years agoMerge pull request #1683 from null77/disable-extra-semi
John Kessenich [Fri, 1 Feb 2019 06:43:32 +0000 (22:43 -0800)]
Merge pull request #1683 from null77/disable-extra-semi

Disable Clang extra semicolon warning.

5 years agoSwitched to std::string for TReflection and TObjectReflection
Matthew Albrecht [Fri, 1 Feb 2019 04:51:50 +0000 (22:51 -0600)]
Switched to std::string for TReflection and TObjectReflection

In MSVC 2017 Debug mode when a reflection is deleted (when a shader goes out of scope) xutility will fail to clear the children due to the TString allocator implementation. By switching to std::string xutility no longer throws the error.

5 years agoParseHelper: don't assign xfb_offset for struct members
Alejandro Piñeiro [Thu, 31 Jan 2019 15:45:15 +0000 (16:45 +0100)]
ParseHelper: don't assign xfb_offset for struct members

This commit undoes the code on the commit "ParseHelper: assign
xfb_offset for struct members too" (commit
af8c1bdb161e4b2ddf019b61bdfca61f84cb1ca8), except the method renaming,
and updates the tests.

During the review of the implementation of Vulkan extension
VK_EXT_transform_feedback for the Linux Intel driver, it was pointed
that the Vulkan environment spec for SPIR-V only ever refers to block
or block members being decorated. It would be strange to not do the
same for OpenGL (ARB_gl_spirv). That would also fit better to what
GLSL does, where setting explicit xfb offsets for struct members is
not allowed.

FWIW, the original patch was proposed based on the fact that
ARB_gl_spirv is relying on OpenGL for how xfb offsets should be
assigned to members, and it was not clear (at least to me) which is
the responsible of such.

5 years agoPort Unix/ossource.cpp to Fuchsia
Michael Spang [Wed, 30 Jan 2019 20:11:42 +0000 (15:11 -0500)]
Port Unix/ossource.cpp to Fuchsia

Fuchsia has pthreads but doesn't have sys/resource.h and doesn't
implement pthread_cleanup_push().

ANGLE bug: 2475

5 years agoAdd missing override specifiers in virtual class
baldurk [Wed, 30 Jan 2019 17:29:31 +0000 (17:29 +0000)]
Add missing override specifiers in virtual class