Commit Graph

27 Commits

Author SHA1 Message Date
Matthew Moulton
5073d93ec4
Apply GLSL memory decorations to top-level OpVariable
Apply memory decorations from GLSL source to the top-level OpVariable.
Previously, these decorations would only be applied to individual
members. While this is correct behavior, it is more convenient for some
front ends to see the decorations (specifically ReadOnly and WriteOnly)
applied to the whole variable rather than individual members.
2024-08-28 17:46:16 -04:00
Steven Perron
33c7e30860
Don't emit duplicate decorations. (#3635)
It is invalid if the same decoration is applied to the same id multiple
times. This adds a check before adding a decoration that the decoration
is not already in the list. If it is, then the duplicate is not added.

Fixes #3627
2024-06-28 19:16:59 -04:00
Jeremy Hayes
78221d619e Update CHANGES for release 11.12.0 2022-10-13 10:58:53 -06:00
tgfrerer
adfa0938a2
fix error message for hlslGrammar::acceptConstructor
Fix the error message for when an erroneous HLSL constructor statement
is detected.

Prior to this change, such error messages would not show correct file
path and line number information.

Additionally, update test data to account for updated error messages.
2021-05-11 09:42:11 +01:00
Graeme Leese
182ab460d9 Update test expected files with new magic number
Updating the SPIR-V generator version number changes the output of all
the SPIR-V tests.
2020-06-22 11:49:38 +01:00
John Kessenich
3641ff7378 Bump code gen version, due to removal of OpEntryPoint operands. 2020-06-10 07:40:56 -06:00
John Kessenich
31c3370d83 Bump up the generator version, which is exposed in SPV test results. 2019-11-02 21:26:40 -06:00
David Neto
8c3d5b4b6c SPIR-V: Aggressively prune unreachable merge, continue target
More aggressively prune unreachable code as follows.
When no control flow edges reach a merge block or continue target:
- delete their contents so that:
  - a merge block becomes OpLabel, then OpUnreachable
  - a continue target becomes OpLabel, then an OpBranch back to the
    loop header
- any basic block which is dominated by such a merge block or continue
  target is removed as well.
- decorations targeting the removed instructions are removed.

Enables the SPIR-V builder post-processing step the GLSLANG_WEB case.
2019-10-29 15:33:54 -04:00
Jeff Bolz
0a93cfbb79 Update to newest SPIRV-Tools. It checks the Vulkan rule that all resources must have a set and binding decoration, which many tests fail. So add code to set a default value of zero. Also disable PCH for Ninja builds. 2018-12-11 20:58:29 -06:00
John Kessenich
e045c23a34 SPV: Generate OpArrayLength with no signedness. 2018-11-27 09:19:10 -07:00
John Kessenich
cc14f2d329 SPV: Add SPIRV-Tools validator. This needs the latest SPIR-Tools. 2018-08-23 13:46:48 -06:00
John Kessenich
d6c975572e Change the major revision number for next commit. 2018-06-04 15:33:31 -06:00
John Kessenich
1c3ab274b1 Test Results Only: Include size in implicitly sized arrays (change to unsized).
This effects 60 tests, in a trivial way, but is critical to factor out this
noise from future planned changes.
2018-03-25 14:05:38 -06:00
John Kessenich
ac3707921e Revert the commits that change OpArrayLength type and bumped the version number.
Now, version 5.* is all connected to making the uint type, which doesn't quite work.
Generator versions 4 and 6 do not do this.
2018-03-07 11:48:25 -07:00
Rex Xu
e518772dc9 SPV: The result type of OpArrayLength should be UINT 2018-03-03 22:06:27 +08:00
John Kessenich
71b5da60d0 SPV: Bump up generator number, because previous commit changes code gen slightly. 2018-02-06 08:06:36 -07:00
John Kessenich
2b5ea9f851 SPV Version: Emit the requested SPIR-V version, not the header version.
Fixes #1236.
2018-01-31 18:41:59 -07:00
John Kessenich
6c1c2766b6 SPV: Bump SPIR-V header to the unified1 version (version 1.2). 2018-01-29 16:16:11 -07:00
John Kessenich
c72e5937dd SPV: Bump the generator number to account for barrier changes. 2017-12-16 00:34:08 -07:00
John Kessenich
07ed11f9a0 SPV: GeneratorVersion: bump version number because of atomic decrement change. 2017-10-07 11:41:20 -06:00
Rex Xu
286ca432cf SPV: Memory qualifiers should decorate top-level block members 2017-07-27 14:33:16 +08:00
John Kessenich
54596ff99e HLSL: Force flat (nointerp) onto integer fragment inputs.
Addresses #940.
2017-06-20 03:20:59 -06:00
John Kessenich
80f92a190a Fix #857: Convert uniform int to local bool for struct alias assignment.
This was done for one direction, but not both directions, so this commit
picks up the other direction.
2017-05-19 23:00:13 -06:00
John Kessenich
6fa17641b5 HLSL: Emit the OpSource HLSL instruction for HLSL, using new headers. 2017-04-07 15:40:01 -06:00
John Kessenich
71c100d7c0 GLSL output: Removed fixed-size buffer; fixes #769.
Makes some white-space differences in most output, plus a few cases
where more could have been put out but was cut short by the previous
fix-sized buffer.
2017-03-14 19:51:29 -06:00
steve-lunarg
dd8287a109 WIP: HLSL: add structuredbuffer pass by reference in fn params
This PR adds the ability to pass structuredbuffer types by reference
as function parameters.

It also changes the representation of structuredbuffers from anonymous
blocks with named members, to named blocks with pseudonymous members.
That should not be an externally visible change.
2017-02-26 11:13:42 -07:00
steve-lunarg
5da1f038d8 HLSL: implement 4 (of 6) structuredbuffer types
This is a partial implemention of structurebuffers supporting:

* structured buffer types of:
*   StructuredBuffer
*   RWStructuredBuffer
*   ByteAddressBuffer
*   RWByteAddressBuffer

* Atomic operations on RWByteAddressBuffer

* Load/Load[234], Store/Store[234], GetDimensions methods (where allowed by type)

* globallycoherent flag

But NOT yet supporting:

* AppendStructuredBuffer / ConsumeStructuredBuffer types
* IncrementCounter/DecrementCounter methods

Please note: the stride returned by GetDimensions is as calculated by glslang for std430,
and may not match other environments in all cases.
2017-02-21 15:51:49 -07:00