Hans-Kristian Arntzen
c365cc1b43
Deal with OpPhi and case fallthrough.
...
This is quite complex since we cannot flush Phi inside the case labels,
we have to do it outside by emitting a lot of manual branches ourselves.
This should be extremely rare, but we need to handle this case.
2019-06-21 13:38:23 +02:00
Hans-Kristian Arntzen
22e3beaab9
Deal with switch block fallthrough more correctly ...
2019-06-20 12:14:19 +02:00
Hans-Kristian Arntzen
bc3bf47446
Rewrite how switch block case labels are emitted.
2019-06-20 11:57:05 +02:00
Hans-Kristian Arntzen
a1f7c8dc8e
Merge pull request #1031 from KhronosGroup/fix-1009
...
MSL: Support 64-bit integers.
2019-06-19 15:29:27 +02:00
Hans-Kristian Arntzen
7fdb418f18
Merge pull request #1028 from KhronosGroup/fix-1010
...
MSL: Support barycentrics and PrimitiveID in fragment shaders
2019-06-19 15:29:14 +02:00
Hans-Kristian Arntzen
4c20c941f0
Merge pull request #1025 from KhronosGroup/fix-1013
...
MSL: Support OpImageQueryLod.
2019-06-19 14:07:39 +02:00
Hans-Kristian Arntzen
4daeb1ca55
Merge pull request #1023 from KhronosGroup/fix-1012
...
MSL: Support MinLod operand.
2019-06-19 14:07:26 +02:00
Hans-Kristian Arntzen
a6798d06a2
MSL: Error out on int64_t/uint64_t buffer members.
...
Not supported for whatever reason.
2019-06-19 10:14:46 +02:00
Hans-Kristian Arntzen
a6b71ae999
MSL: Support 64-bit integers.
2019-06-19 09:55:00 +02:00
Hans-Kristian Arntzen
2e1cee5e1e
MSL: Support PrimitiveID in fragment and barycentrics.
2019-06-19 09:52:35 +02:00
Hans-Kristian Arntzen
707312b83a
GLSL: Support NV barycentrics.
2019-06-19 09:52:35 +02:00
Hans-Kristian Arntzen
0671b3c35b
MSL: Support OpImageQueryLod.
...
Correctness is a bit unclear at the moment. The spec document for 2.2 is
not updated for query-lod, but this is the best we can do anyways.
2019-06-19 09:51:56 +02:00
Hans-Kristian Arntzen
f171d82590
MSL: Support MinLod operand.
2019-06-19 09:43:03 +02:00
Hans-Kristian Arntzen
05ea055096
Merge pull request #1032 from KhronosGroup/test-script-workaround
...
Make sure args.msl22 is set in test_shaders.py.
2019-06-18 19:59:00 +02:00
Hans-Kristian Arntzen
856a8d200e
Make sure args.msl22 is set in test_shaders.py.
...
Works locally, but apparently not on Travis?
2019-06-18 12:22:46 +02:00
Hans-Kristian Arntzen
e9ec5ce7b1
Merge pull request #1030 from KhronosGroup/msl-2.2-invalid-test
...
MSL: Fix path check in test_shaders.py.
2019-06-18 10:38:35 +02:00
Hans-Kristian Arntzen
33fc2ad8cc
MSL: Fix path check in test_shaders.py.
2019-06-18 10:36:10 +02:00
Hans-Kristian Arntzen
146dc453bc
Merge pull request #1029 from KhronosGroup/msl-2.2-validation-fix
...
Prepare for MSL 2.2 testing
2019-06-17 19:06:02 +02:00
Hans-Kristian Arntzen
be1e27a6e5
MSL: Conditionally validate MSL 2.2 shaders.
...
Travis CI Xcode image does not support MSL 2.2 yet (beta), so just do
local validation for now.
2019-06-17 16:07:07 +02:00
Hans-Kristian Arntzen
026a167549
MSL: New SDK errors out on cull distance.
...
Not supported, so just ignore this test for now, it should not have
compiled in the first place.
2019-06-14 12:12:40 +02:00
Hans-Kristian Arntzen
4104e36300
Merge pull request #1027 from KhronosGroup/fix-1026
...
MSL: Fix regression with Private parameter declaration.
2019-06-13 13:45:01 +02:00
Hans-Kristian Arntzen
d81bfc5b58
MSL: Fix regression with Private parameter declaration.
...
If we compile multiple times due to forced_recompile, we had
deferred_declaration = true while emitting function prototypes which
broke an assumption. Fix this by clearing out stale state before leaving
a function.
2019-06-13 10:36:21 +02:00
Hans-Kristian Arntzen
95053ea4bc
Merge pull request #1024 from KhronosGroup/fix-1016
...
GLSL/MSL: Support stencil export
2019-06-12 12:48:10 +02:00
Hans-Kristian Arntzen
00a8539d1d
Merge pull request #1022 from KhronosGroup/fix-1017
...
MSL: Support Invariant qualifier on position.
2019-06-12 11:35:08 +02:00
Hans-Kristian Arntzen
14d0a1eb0c
MSL: Support stencil export.
2019-06-12 10:21:20 +02:00
Hans-Kristian Arntzen
a9da59b0b8
GLSL: Support GL_ARB_shader_stencil_export.
2019-06-12 10:06:54 +02:00
Hans-Kristian Arntzen
a7b2ba28a0
MSL: Support Invariant qualifier on position.
2019-06-12 09:39:12 +02:00
Hans-Kristian Arntzen
fccf1d0462
Add MSL 2.2 path in test_shaders.py.
2019-06-12 09:30:41 +02:00
Hans-Kristian Arntzen
5e9e8918f9
Merge pull request #1020 from KhronosGroup/msl-constexpr-by-binding
...
MSL: Support remapping constexpr samplers by set/binding.
2019-06-11 10:11:29 +02:00
Hans-Kristian Arntzen
7fd379774e
Expand constexpr sampler sanity check.
2019-06-10 16:00:20 +02:00
Hans-Kristian Arntzen
30bb197a5d
MSL: Support remapping constexpr samplers by set/binding.
...
Older API was oriented around IDs which are not available unless you're
doing full reflection, which is awkward for certain use cases which know
their set/bindings up front.
Optimize resource bindings to be hashmap rather than doing linear seeks
all the time.
2019-06-10 15:41:36 +02:00
Hans-Kristian Arntzen
3e53273cc7
Merge pull request #1019 from KhronosGroup/fix-1018
...
Employ heuristics to figure out how to emit SSBO/UAV reflection names.
2019-06-10 14:05:37 +02:00
Hans-Kristian Arntzen
457eba355e
Employ heuristics to figure out how to emit SSBO/UAV reflection names.
...
This is rather shaky, but we don't have many choices here except add a
lot of awkward and unintuitive options. Try to deduce this from OpSource
and fallback to heuristic.
2019-06-10 11:24:24 +02:00
Hans-Kristian Arntzen
a38eb6209d
Merge pull request #1008 from KhronosGroup/fix-1007
...
Deal with case where a variable is dominated by inner part of a loop.
2019-06-06 14:41:50 +02:00
Hans-Kristian Arntzen
6b52b0fe8b
Deal with nested loops.
...
Actually need to hoist out variable to outermost loop.
2019-06-06 14:37:02 +02:00
Hans-Kristian Arntzen
02ae99f399
Use the existing loop dominator when doing loop variable preservation.
2019-06-06 12:22:28 +02:00
Hans-Kristian Arntzen
bf56dc88b9
Rewrite how loop dominators are propagated.
...
Do this analysis in the CFG stage rather than last minute with the
ad-hoc algorithm we had in place before CFG was introduced.
2019-06-06 12:17:46 +02:00
Hans-Kristian Arntzen
03d93abc1a
Deal with case where a variable is dominated by inner part of a loop.
...
There is a risk that we try to preserve a loop variable through multiple
iterations, even though the dominating block is inside a loop.
Fix this by analyzing if a block starts off by writing to a variable. In
that case, there cannot be any preservation going on. If we don't, pretend the
loop header is reading the variable, which moves the variable to an
appropriate scope.
2019-06-06 11:11:44 +02:00
Hans-Kristian Arntzen
720681da39
Merge pull request #1006 from KhronosGroup/fix-1003
...
Deal with case where a block is somehow emitted in a duplicated fashion.
2019-06-05 16:11:06 +02:00
Hans-Kristian Arntzen
990756b2d4
Merge pull request #1005 from pmoursnv/SPV_NV_ray_tracing
...
Add some missing features for NV_ray_tracing
2019-06-05 16:10:39 +02:00
Patrick Mours
8d64d5e776
Fix storage packing qualifiers missing on "shaderRecordNV" buffers
2019-06-05 13:31:24 +02:00
Patrick Mours
b1d406e481
Add test for callable data
2019-06-05 13:31:24 +02:00
Patrick Mours
be3035db26
Fix callable data variables
2019-06-05 13:31:24 +02:00
Patrick Mours
789178666f
Add support for "shaderRecordNV" qualifier
2019-06-05 13:31:24 +02:00
Hans-Kristian Arntzen
c09ca74c61
Deal with case where a block is somehow emitted in a duplicated fashion.
...
We seen to have to deal with a case where a block is used multiple times
without any "proper" structured control flow, so we risk losing deferred
declaration state.
2019-06-05 12:39:40 +02:00
Hans-Kristian Arntzen
af40a212c2
Fix erronous default for emit_line_directives.
2019-06-02 16:20:21 +02:00
Hans-Kristian Arntzen
2c396ae44b
Merge pull request #1000 from KhronosGroup/fix-998
...
MSL: Fix declaration of unused input variables.
2019-05-31 15:52:02 +02:00
Hans-Kristian Arntzen
314efdcc42
MSL: Fix declaration of unused input variables.
...
In multiple-entry-point modules, we declared builtin inputs which were
not supposed to be used for that entry point.
Fix this, by being more strict when checking which builtins to emit.
2019-05-31 13:23:34 +02:00
Hans-Kristian Arntzen
cb686a5dba
Merge pull request #996 from KhronosGroup/fix-989
...
Support emitting OpLine directive.
2019-05-28 15:53:01 +02:00
Hans-Kristian Arntzen
48a7da4f4d
Fixup OpLine parsing comments.
2019-05-28 15:51:42 +02:00