Hans-Kristian Arntzen
f1752e58e1
Add basic namespace to internal macros.
...
Some projects build SPIRV-Cross as a single translation unit
and this causes a lot of warnings because the same macro is redeclared
multiple times in the different backends. This make sure that each
backend has its own namespace for internal macros.
2018-06-28 22:57:52 +02:00
Bill Hollings
f66507a701
Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross
2018-06-25 10:52:15 -04:00
Hans-Kristian Arntzen
994f789465
Merge pull request #624 from KhronosGroup/fix-619
...
Support branch/loop hints in HLSL.
2018-06-25 10:53:52 +02:00
Hans-Kristian Arntzen
33c61d2abe
Support branch/loop hints in HLSL.
2018-06-25 10:33:13 +02:00
Hans-Kristian Arntzen
10dfaf79d5
Support globallycoherent in HLSL.
2018-06-25 10:04:25 +02:00
Bill Hollings
e091031613
CompilerMSL pass builtin struct members into functions.
...
Add and use Compiler::get_non_pointer_type() convenience functions.
2018-06-24 15:06:12 -04:00
Hans-Kristian Arntzen
f1e8555801
Emit matrix layouts in structs directly.
...
Unlike GLSL, child structs do not inherit matrix layouts.
2018-06-05 09:42:07 +02:00
Hans-Kristian Arntzen
991b655c72
Declare OpSpecConstantOp up-front on relevant targets.
...
Required, since spec constants can include results from constant ops.
2018-05-15 14:20:16 +02:00
Hans-Kristian Arntzen
0617b98613
Run format_all.sh.
2018-05-15 11:16:35 +02:00
Pascal Muetschard
aced6058b4
Don't limit GLSL identifiers with HLSL keywords.
...
- The HLSL compiler now has its own list of keywords in addition to
the ones from GLSL.
- Added "buffer", "precise", and "shared" to the GLSL keywords.
2018-05-07 10:58:52 -07:00
Hans-Kristian Arntzen
d93807a625
Deal with OpImageFetch without explicit LOD.
2018-04-30 10:54:44 +02:00
Hans-Kristian Arntzen
b9cd3dcd7f
Run format_all.sh.
2018-04-17 15:01:31 +02:00
Hans-Kristian Arntzen
c266429be9
Partially implement subgroup ops for HLSL SM 6.0.
...
Lots of stuff that needs tons of emulation, which I'm not going to
bother with.
2018-04-11 15:57:41 +02:00
msiglreith
f260c452f7
Fix naming of root constants
2018-04-08 15:04:45 +02:00
Hans-Kristian Arntzen
382101bd05
Run format_all.sh.
2018-04-04 09:26:53 +02:00
Hans-Kristian Arntzen
1d082e9b79
Fix passing arrays of combined image samplers in HLSL.
2018-04-04 09:26:53 +02:00
Hans-Kristian Arntzen
938c7debed
Handle control-dependent temporaries.
...
Derivatives, subgroup and implicit-lod instructions all need to happen
in the block they were created.
2018-03-12 17:34:54 +01:00
Hans-Kristian Arntzen
e8e58844d4
Rewrite everything to use Bitset rather than uint64_t.
2018-03-12 13:24:14 +01:00
Hans-Kristian Arntzen
9a52713d77
Run format_all.sh.
2018-03-09 15:26:36 +01:00
Hans-Kristian Arntzen
a803e5ae38
Deprecate set_options()/get_options() interface, replace it.
...
Replace with common/hlsl/msl instead. The old interface had some bad
interaction with overloading which meant you had to up-cast to base
class to be able to use set_options, which was awkward.
2018-03-09 15:25:25 +01:00
Hans-Kristian Arntzen
e0efa737ca
Expand the implementation of inherit_expression_dependencies.
2018-03-09 13:21:38 +01:00
Hans-Kristian Arntzen
47d94ff8d9
Add FP16 to HLSL.
...
Cannot be used in buffer types, similar to mediump in GLSL.
half is useless, because it's 32-bit in FXC.
2018-03-07 10:21:25 +01:00
Hans-Kristian Arntzen
b380a2113a
Implement MatrixInverse on HLSL.
...
Copy-paste implementation from MSL. I assume it's correct.
2018-02-23 16:42:40 +01:00
Hans-Kristian Arntzen
f6d08e6113
Add workaround for PointCoord builtin on HLSL.
2018-02-23 15:58:35 +01:00
Hans-Kristian Arntzen
a04bdcc7f7
Handle overloaded functions which share the same OpName.
...
Awkward, but legal SPIR-V.
2018-02-23 14:15:51 +01:00
Hans-Kristian Arntzen
4543dacca3
Run format_all.sh.
2018-02-23 13:13:02 +01:00
Hans-Kristian Arntzen
0673f27b7c
Fix incorrect loop range.
2018-02-22 17:00:41 +01:00
Hans-Kristian Arntzen
114c2c5e37
Add clip/cull-distance support to HLSL.
2018-02-22 16:40:04 +01:00
Hans-Kristian Arntzen
3fa6cc8f2c
Implement FRem.
2018-02-15 13:31:29 +01:00
Hans-Kristian Arntzen
843e34b604
Add IsFrontFace support to HLSL.
2018-02-15 12:42:56 +01:00
Hans-Kristian Arntzen
6a0f6980ef
Set width when creating NumWorkgroups buffer.
2018-02-14 09:22:47 +01:00
Hans-Kristian Arntzen
18a594a76b
Implement subpass input support in HLSL.
2018-02-10 10:54:42 +01:00
Hans-Kristian Arntzen
00ccd590ee
Return arrays in HLSL/MSL by writing to an output variable instead.
2018-02-08 12:22:08 +01:00
Hans-Kristian Arntzen
9fa91f7e1c
Support returning arrays from functions in GLSL/MSL.
...
Not possible in HLSL apparently, need workaround ...
2018-02-08 12:22:08 +01:00
msiglreith
d096f5cafe
hlsl: Support custom root constant layout
2018-02-07 15:21:52 +01:00
Hans-Kristian Arntzen
18e8833eeb
Support gl_NumWorkgroups in HLSL.
2018-02-05 10:29:20 +01:00
twinaphex
59a12c7e71
Uniquely name these static functions
2018-02-03 23:23:30 +01:00
Hans-Kristian Arntzen
5d9df6a31c
Do not declare constant composites inline in HLSL.
...
Move arrays and structs out to their own global static constants.
Also, replace illegal names in HLSL as well.
2018-02-02 10:12:26 +01:00
Hans-Kristian Arntzen
988f00fe3c
Fix OpImage on OpSampledImages in HLSL.
2018-02-01 09:22:16 +01:00
Bill Hollings
1c94715350
Update copyright dates to 2018 in main files.
2018-01-31 17:08:43 -05:00
Hans-Kristian Arntzen
06041985d0
Fix HLSL regression with struct declaration.
...
It actually worked surprisingly. Fix it properly.
2018-01-23 16:36:20 +01:00
Hans-Kristian Arntzen
9c3d4e7c60
Rewrite barrier handling in HLSL.
2018-01-09 12:41:13 +01:00
Hans-Kristian Arntzen
9c72aa00c9
Overhaul barrier handling in GLSL.
2018-01-09 12:07:07 +01:00
Hans-Kristian Arntzen
1a5a755ce5
Flatten structs based on instance name rather than block name.
...
Block name is too brittle, optimizes will merge block types, making
flattening impossible with unique names.
2018-01-09 10:36:04 +01:00
Hans-Kristian Arntzen
c4e787ccf8
Merge pull request #378 from KhronosGroup/fix-371
...
Fix swizzling of scalar integers in HLSL.
2018-01-04 13:42:27 +01:00
Hans-Kristian Arntzen
4590c63b40
Fix swizzling of integers.
...
Add scalar swizzling to constant composites as well.
2018-01-04 13:16:56 +01:00
Hans-Kristian Arntzen
d9c0948a9c
Run format_all.sh.
2018-01-04 12:15:55 +01:00
Hans-Kristian Arntzen
ec1180f198
Support arrays in to_sampler_expression.
2018-01-04 12:14:18 +01:00
Hans-Kristian Arntzen
c7f4b1528f
Declare arrays of resources in HLSL.
2018-01-04 11:05:40 +01:00
Hans-Kristian Arntzen
950732512e
Fix compatibility with FXC.
2017-12-12 12:35:22 +01:00