3158 Commits

Author SHA1 Message Date
John Kessenich
cc4a756d48 Build: Update to latest SPIR-V header. 2019-03-06 11:21:38 +07:00
John Kessenich
9390154c55
Merge pull request #1699 from jeffbolznv/buffer_reference_fold
Handle buffer references vs 'const'
2019-03-04 13:41:27 -07:00
Jeff Bolz
be63facd80 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.
2019-03-04 12:46:11 -06:00
John Kessenich
d90d548161
Merge pull request #1713 from jeffbolznv/fix_nv_extension_disabled
Fix NV_EXTENSIONS-disabled build
2019-02-28 14:47:04 -05:00
Jeff Bolz
1994fe4523 Fix NV_EXTENSIONS-disabled build 2019-02-28 11:59:35 -06:00
John Kessenich
822817977c
Merge pull request #1701 from jeffbolznv/cooperative_matrix
Implement GL_NV_cooperative_matrix
2019-02-26 21:27:09 +07:00
Jeff Bolz
4605e2ed2b Implement GL_NV_cooperative_matrix 2019-02-25 23:42:59 -06:00
John Kessenich
ec484527b6
Merge pull request #1709 from KhronosGroup/fix-pp
PP: Fix #1605: Paste tokens for ## through number->letter transitions.
2019-02-23 01:09:17 +07:00
John Kessenich
a84079dcf3 PP: Fix #1605: Paste tokens for ## through number->letter transitions. 2019-02-22 08:54:38 -07:00
John Kessenich
a51d3d9f22
Merge pull request #1706 from nico/master
Fix -Wextra-semi warnings in headers used in Chromium
2019-02-21 23:46:27 +07:00
John Kessenich
b0f4b427d5
Merge pull request #1705 from baldurk/fix-indexindirect-reflection
Fix type recursion with EOpIndexIndirect dereferences
2019-02-21 23:43:59 +07:00
Nico Weber
76577b1aec Fix -Wextra-semi warnings in headers used in Chromium 2019-02-21 11:05:21 -05:00
baldurk
141bc5a54f 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.
2019-02-21 12:52:05 +00:00
John Kessenich
5432f0dd8f
Merge pull request #1702 from greg-lunarg/kg101
Update SPIRV-Tools known good
2019-02-21 13:36:31 +07:00
John Kessenich
17a8d9ad00
Merge pull request #1703 from dj2/mem_leak
Allocate empty function name in the string pool.
2019-02-21 13:10:18 +07:00
John Kessenich
ade579fbc5
Merge pull request #1704 from dj2/leak
Fixup leak of TString
2019-02-21 13:09:30 +07:00
Dan Sinclair
0560138e66 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.
2019-02-20 16:40:13 -05:00
Dan Sinclair
756bfd0ad1 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.
2019-02-20 16:32:49 -05:00
Greg Fischer
f8939eff7a Update SPIRV-Tools known good 2019-02-20 13:17:09 -07:00
John Kessenich
58d6905ea0
Merge pull request #1700 from KhronosGroup/fix-pp
PP: Remove sub-tokens in macro recording and record spaces correctly.
2019-02-19 23:57:06 +07:00
John Kessenich
6225dd4ba1 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.
2019-02-19 07:26:54 -07:00
John Kessenich
5cdf3c5a23 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.
2019-02-19 07:26:36 -07:00
John Kessenich
bce1f51096 Build: Fix #1640: Change strcpy to snprintf. 2019-02-18 22:25:58 -07:00
John Kessenich
9f538c7207
Merge pull request #1696 from baldurk/fix-nonblock-array-size
Fix treatment of array input/output variables in reflection
2019-02-17 13:15:11 +07:00
John Kessenich
6fee94460f PP: Fix #1694: Rationalize errors on partially expanded macro argument. 2019-02-16 07:35:13 -07:00
John Kessenich
da1be9a322
Merge pull request #1697 from sparmarNV/fix-NV_mesh_shader
Fix resizing of gl_PrimitiveIndicesNV[] to max_primitives*geomSize
2019-02-14 17:49:29 +07:00
Sahil Parmar
6708b0ee82 Handle resizing/error checks for mesh shader out arrays 2019-02-13 17:40:27 -08:00
Sahil Parmar
9466850f54 Update gtest to explicitly size gl_PrimitiveIndicesNV[] 2019-02-12 12:27:21 -08:00
Sahil Parmar
ab027bef3d 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[].
2019-02-11 15:15:33 -08:00
baldurk
879562b766 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.
2019-02-11 16:39:12 +00:00
John Kessenich
05d12a9461
Merge pull request #1695 from baldurk/explode-reflected-io-blocks
Add option to unwrap I/O block aggregates in reflection
2019-02-11 22:08:10 +07:00
baldurk
1905069857 Add option to unwrap I/O block aggregates in reflection
* We follow similar rules to uniform block exploding.
2019-02-11 11:53:52 +00:00
John Kessenich
567396b6b4 Whitespace: Fix some tabs->spaces, mostly to retriggered failed bots. 2019-02-11 03:43:12 -07:00
John Kessenich
9840f11f85 PP: Fix #1694: Handle badly formed argument substitution.
Also added a warning for no space after a macro name.
2019-02-11 03:05:00 -07:00
John Kessenich
d83344fc4e
Merge pull request #1684 from baldurk/reflection-interface-improve
Opt-in improvements to reflection interface
2019-02-09 12:59:30 +07:00
baldurk
4513df9175 Reflow for better readability 2019-02-08 10:48:48 +00:00
John Kessenich
f6e7c4d2de Bump version. 2019-02-07 23:56:53 -07:00
John Kessenich
377bccb143 Build: Fix #1665: remove __fastcall 2019-02-07 23:28:37 -07:00
John Kessenich
1ff8346b38
Merge pull request #1693 from sparmarNV/fix-NV_mesh_shader
Add missing support for gl_MeshViewCountNV/gl_MeshViewIndicesNV in task shaders
2019-02-08 11:34:47 +07:00
Sahil Parmar
3958927a59 Add missing support for gl_MeshViewCountNV/gl_MeshViewIndicesNV in task shaders 2019-02-07 14:28:12 -08:00
John Kessenich
9dda1281e6
Merge pull request #1692 from alan-baker/update-spvtools
Update SPIRV-Tools and tests expectations
2019-02-07 10:27:58 +07:00
Alan Baker
aeeaf08f02 Update expected test results 2019-02-06 14:18:19 -05:00
Alan Baker
75f443bdc8 Update SPIRV-Tools version 2019-02-06 14:17:51 -05:00
baldurk
a972e73ad7 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.
2019-02-04 12:02:59 +00:00
baldurk
657acc0c40 Add option to reflect buffer blocks & variables separately to uniforms
* Also note the uniform indices of atomic counter buffers
2019-02-04 12:02:59 +00:00
baldurk
4a2aa82236 Reflect array stride, top-level array stride, and block member count 2019-02-04 12:02:59 +00:00
baldurk
0af5e3e346 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.
2019-02-04 12:02:59 +00:00
baldurk
edf8212ab8 Add an option to report array variables with trailing [0] suffix
* This is as expected by ARB_program_interface_query
2019-02-04 11:21:09 +00:00
baldurk
15c37f79a9 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.
2019-02-04 11:21:09 +00:00
baldurk
6d47785825 Add options to control how reflection information is built 2019-02-04 11:21:09 +00:00