Rex Xu
37cdceed41
Implement extension GL_ARB_shader_stencil_export
2017-06-29 17:50:46 +08:00
John Kessenich
e2ff404f6b
Merge pull request #917 from KhronosGroup/remove-redundant-locations
...
Replace #422 : Remove the redundant location setting in AST->SPIR-V.
2017-06-15 12:11:37 -06:00
Rex Xu
301a2bc8a7
SPV: Fix an typo of SPV_AMD_texture_gather_bias_lod
2017-06-14 23:09:39 +08:00
Rex Xu
cabbb788b4
Implement extension GL_AMD_gpu_shader_int16
...
- Add int16 types (int16_t, uint16_t, i16vec, u16vec).
- Add int16 support to GLSL operators.
- Add int16 type conversions (to int16, from int16).
- Add int16 built-in functions.
2017-06-09 17:11:23 +08:00
Rex Xu
225e0fcadd
Implement the extension GL_AMD_texture_gather_bias_lod
2017-06-05 16:41:06 +08:00
John Kessenich
7cdf3fc3c6
Replace #422 : Remove the redundant location setting in AST->SPIR-V.
...
This was redundant in two ways:
1) it replicated algorithms owned in the front end, and
2) it sometimes left location information on both a block and its members.
2017-06-04 13:22:39 -06:00
John Kessenich
e485c7af58
SPV: Debug output: Include OpLine information for execution path.
...
Note that declaratives are not handled, only procedurals.
2017-05-31 18:50:53 -06:00
John Kessenich
121853f4df
SPV: Add OpSource shader source code and file name.
2017-05-31 17:14:15 -06:00
John Kessenich
d6af18f621
Merge pull request #901 from LoopDawg/imat-construct
...
HLSL: Add imat, umat, and bmat constructors
2017-05-24 23:12:58 -06:00
John Kessenich
84cc15f0d0
HLSL: Fix #903 : Don't short-circuit && or ||.
2017-05-24 16:47:32 -06:00
LoopDawg
174ccb8f1d
HLSL: Add imat, umat, and bmat constructors
...
Fixes #894
2017-05-20 21:54:16 -06:00
John Kessenich
7b8c386c5d
More non-determinism fixed.
2017-05-19 23:44:51 -06:00
John Kessenich
b6cabc4f24
Fix C++ portability, non-deterministic order of argument evaluation.
2017-05-19 23:29:50 -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
0d2b4713c5
HLSL: Don't do logical short-circuits when the operands are bool-vectors.
...
This seems a bit ill-defined, and was generating code that made OpPhi of two
operands that were Boolean vectors result in a scalar bool.
2017-05-19 20:19:00 -06:00
John Kessenich
a5c5fb6118
SPV: Emit extension for using StorageClassStorageBuffer.
2017-05-05 05:09:58 -06:00
steve-lunarg
f1709e7146
HLSL: implement [unroll] and [loop] attributes
...
This adds infrastructure suitable for any front end to create SPIR-V loop
control flags. The only current front end doing so is HLSL.
[unroll] turns into spv::LoopControlUnrollMask
[loop] turns into spv::LoopControlDontUnrollMask
no specification means spv::LoopControlMaskNone
2017-05-03 13:44:40 -06:00
John Kessenich
670271890d
SPV: Support test #pragma for generating the StorageBuffer storage class.
...
Longer term, this storage class should be generated based on the mode
of compilation.
2017-04-19 18:34:49 -06:00
John Kessenich
ae79697db1
Merge pull request #827 from amdrexu/feature4
...
Implement the extension SPV_KHR_16bit_storage
2017-04-08 10:03:45 -06:00
John Kessenich
6fa17641b5
HLSL: Emit the OpSource HLSL instruction for HLSL, using new headers.
2017-04-07 15:40:01 -06:00
Rex Xu
f89ad98013
Implement the extension SPV_KHR_16bit_storage
2017-04-07 23:22:33 +08:00
John Kessenich
4f1403ed1b
SPV: Fix #807 : use --hlsl-offsets to allow hlsl-style offsets in a buffer.
...
Corresponds to the EShMsgHlslOffsets flag in messages.
Works for both GLSL and HLSL.
2017-04-05 17:38:20 -06:00
steve-lunarg
e741249b72
HLSL: pass tessellation execution modes through to SPIR-V
...
The SPIR-V generator had assumed tessellation modes such as
primitive type and vertex order would only appear in tess eval
(domain) shaders. SPIR-V allows either, and HLSL allows and
possibly requires them to be in the hull shader.
This change:
1. Passes them through for either tessellation stage, and,
2. Does not set up defaults in the domain stage for HLSl compilation,
to avoid conflicting definitions.
2017-03-31 11:47:18 -06:00
John Kessenich
e434ad923e
Fix #809 : smear scalar condition in OpSelect for selecting vector operands.
2017-03-30 10:16:22 -06:00
John Kessenich
714e58b2fc
Merge pull request #801 from amdrexu/bugfix
...
HLSL: Fix an issue of frexp().
2017-03-29 10:04:30 -06:00
Rex Xu
bcf291a7ba
Don't emit NV-specific interface members if NV extensions are disabled.
2017-03-29 23:01:36 +08:00
Rex Xu
470026f9d7
HLSL: Fix an issue of frexp().
...
The "exp" parameter is floating-point type in HLSL intrinsic while it is
integer type in GLSL built-in function.
2017-03-29 17:12:40 +08:00
John Kessenich
aa3c64c214
Fix #800 (mostly): set of Linux warnings.
2017-03-28 09:52:38 -06:00
John Kessenich
0e7378446b
Fix #790 : Don't emit NV-specific interface members unless enabled by extension.
2017-03-24 18:40:40 -06:00
John Kessenich
3778979cd4
HLSL: non-static member functions: track and find active anonymous 'this' scopes and members.
...
Thanks to @steve-lunarg for his input and discussions on handling member functions.
2017-03-21 23:56:40 -06:00
John Kessenich
4960baaf66
HLSL: Basic turn on of non-static member functions.
...
Still need: pass by reference in SPIR-V and symbol-table level
for accessing 'this' members from member functions.
2017-03-19 18:09:59 -06:00
Rex Xu
5e317ffe40
SPV: Fix unexpected declarations of capability and extension
2017-03-16 23:02:39 +08:00
steve-lunarg
0b5c2ae70e
Preserve signedness in SPV image query ops
...
The AST->SPIRV translation of image queries was dropping signedness,
causing some validation troubles.
2017-03-10 12:51:59 -07:00
John Kessenich
0479437a5c
SPV: Fix #739 : OpSelect can only operate on scalars and vectors.
2017-03-01 13:49:11 -07:00
John Kessenich
69a2c69649
Merge pull request #736 from steve-lunarg/structbuffer-params
...
HLSL: add structuredbuffer pass by reference in fn params
2017-02-28 13:10:51 -07:00
John Kessenich
42e33c9bec
SPV: Update SPV header to official Rev. 10 of 1.0, and fix the consequences of doing so.
2017-02-27 01:50:28 -07:00
John Kessenich
6c8aaacd28
SPV: Implement new extensions GL_KHX_device_group and GL_KHX_multiview.
...
These correspond to SPV_KHR_device_group and SPV_KHR_multiview.
Also, bring tests up to date with Khronos internals, and some misc. related changes.
2017-02-27 01:20:51 -07: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
John Kessenich
4a57dced66
SPV: Handle nested opaque types as function parameters.
2017-02-24 19:22:54 -07:00
Rex Xu
3e783f9b49
SPV: Unexpected declarations of capabilities from NV extensions.
2017-02-22 16:44:48 +08:00
John Kessenich
8f674e821e
Fix issue #676 : emit error message on failure to open spv file.
2017-02-18 09:45:40 -07:00
John Kessenich
b0561d934c
Merge pull request #720 from flaviobortot/master
...
Added --vn option to generate a C header file containing a variable a…
2017-02-17 09:34:08 -07:00
Flavio
15017db971
Removed tabs and replaced with spaces. Changed layout for "else if"
2017-02-15 14:29:33 -08:00
chaoc
df3956c50f
Implement NVX_multiview_per_view_attributes
2017-02-14 15:04:33 -08:00
John Kessenich
8e6c6cef6a
SPV: Implement specialization constants for ?:.
2017-02-08 17:07:07 -07:00
John Kessenich
433e9ff896
SPV: Emit OpSelect when a selection node is simple enough.
...
Also, ensures it has a type, no disallowed side effects,
or performance trade offs.
2017-02-08 17:03:13 -07:00
John Kessenich
65ee230f1c
HLSL: Add tests and refine what decorations are passed through per stage/in/out.
2017-02-06 23:13:16 -07:00
Flavio
aea3c890d3
Added --vn option to generate a C header file containing a variable assigned to the hex representation of the shader. This is a standard feature on Microsoft's HLSL compiler and it allows developers to include pre-compiled shaders directly into the code. This option enables "Hex output", so it is NOT required to specify -x as well. The output file name is preserved, so no ".h" extension is added. If you want the output file to have ".h" extension then you have to specify it on the output file name. The generated header file uses the "#pragma once" pragma to avoid multiple inclusions.
2017-02-06 11:46:35 -08:00
Endre Oma
ad58d45437
SPV: Emit names of specialization constants
2017-01-31 21:16:17 +01:00
John Kessenich
64b010f390
Merge pull request #678 from chaoc/stereo_view_rendering
...
support SPV_NV_viewport_array2 and SPV_NV_stereo_view_rendering
2017-01-21 12:05:47 -07:00