Hans-Kristian Arntzen
816c1167ce
Handle invariant decoration more robustly.
...
Avoids certain cases of variance between translation units by forcing
every dependent expression of a store to be temporary.
Should avoid the major failure cases where invariance matters.
2018-11-22 11:55:57 +01:00
Hans-Kristian Arntzen
4e5c8d7199
Deal with depth_greater/depth_less qualifiers.
...
Adds support on HLSL SM 5.0, and fixes bug on GLSL.
Makes sure early fragment tests is tested on MSL as well.
2018-11-12 10:35:36 +01:00
Hans-Kristian Arntzen
b778e16e48
HLSL: Complete support for combined image samplers in legacy.
2018-11-12 09:59:39 +01:00
Minmin Gong
e3ebfdaae5
HLSL: Combine image and sampler on shader model <= 30
2018-11-10 13:44:59 -08:00
Chip Davis
ca4744ab72
Support constants of 16-bit integral type in GLSL and MSL.
...
Constants of 8-bit type aren't supported in GLSL, since there's no
extension letting you use them.
2018-11-02 14:39:55 -05:00
Hans-Kristian Arntzen
00d542ed44
Minor nit, set emitted when emitting spec constant op in HLSL.
2018-11-01 11:49:32 +01:00
Hans-Kristian Arntzen
6e99fcf695
Run format_all.sh.
2018-11-01 11:23:48 +01:00
Hans-Kristian Arntzen
62db535b3f
Update tests.
2018-11-01 11:23:48 +01:00
Hans-Kristian Arntzen
fd6ff3617a
Support macro overrides for spec constants in HLSL.
2018-11-01 11:23:48 +01:00
Hans-Kristian Arntzen
226d837d7e
HLSL: Use same logic as GLSL for picking cbuffer block name.
...
HLSL just picked the variable name which did not work as expected for
some users. Use the same logic as GLSL and set up declared_block_names,
so the actual name can be queried later.
2018-10-22 09:50:04 +02:00
Hans-Kristian Arntzen
5bcf02f7c9
Hoist out parsing module from spirv_cross::Compiler.
...
This is a large refactor which splits out the SPIR-V parser from
Compiler and moves it into its more appropriately named Parser module.
The Parser is responsible for building a ParsedIR structure which is
then consumed by one or more compilers.
Compiler can take a ParsedIR by value or move reference. This should
allow for optimal case for both multiple compilations and single
compilation scenarios.
2018-10-19 12:01:31 +02:00
Hans-Kristian Arntzen
a697299bc1
Refactor MSL to use SPIRCombinedImageSampler.
...
Avoids special "meta" data to express this type.
Makes MSL implementation in line with HLSL.
2018-10-05 09:49:57 +02:00
Hans-Kristian Arntzen
737715214e
Implement atomic increment/decrement in GLSL and HLSL.
2018-09-17 15:54:21 +02:00
Hans-Kristian Arntzen
ecc94ccd1a
Merge branch 'legacy-color-4comp' of git://github.com/crosire/SPIRV-Cross
2018-09-12 09:37:40 +02:00
crosire
0cdfbe490b
Fix invalid code generation for shader model 3 when fragment shader output is not a four-component vector
2018-09-11 20:29:24 +02:00
Hans-Kristian Arntzen
af672b7a4b
Add composite array test shaders for GLSL and HLSL as well.
2018-09-10 10:21:08 +02:00
Hans-Kristian Arntzen
18b82caf83
Properly track read dependencies for UAV access chain.
2018-07-09 14:02:50 +02:00
Hans-Kristian Arntzen
b5ed706860
Hoist out variable scope analysis.
2018-07-05 10:42:05 +02:00
Hans-Kristian Arntzen
c26c41b26b
Make the CFGs for all active functions available.
...
Will make writing other CFG-depended stuff easier.
2018-07-04 17:26:53 +02:00
Hans-Kristian Arntzen
e044732896
Support OpTypeImage with depth == 2 (unknown) properly.
...
Track which OpSampledImages are ever used with Dref opcodes.
2018-07-04 14:26:23 +02:00
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