Hans-Kristian Arntzen
0b95cbdea3
Merge pull request #1208 from KhronosGroup/fix-1206
...
HLSL: Add support to remove register() bindings.
2019-11-11 12:30:36 +01:00
Hans-Kristian Arntzen
b9e5fe01b0
HLSL: Add support to remove register() bindings.
...
Sometimes it's useful to get automatic binding assignment from the D3D
compiler instead.
2019-11-11 11:23:21 +01:00
Hans-Kristian Arntzen
cb73115bcc
Merge pull request #1204 from KhronosGroup/fix-1200
...
MSL: Fix unpacking of column from padded matrix.
2019-11-07 13:25:37 +01:00
Hans-Kristian Arntzen
0bbe041411
MSL: Remove dubious workaround code in unpack_expression.
...
From UE4 review, does not cause any changes in test output, and should
only change output if we were unpacking arrays or something like that,
which we don't support.
2019-11-07 11:35:07 +01:00
Hans-Kristian Arntzen
d9afa9e238
MSL: Fix unpack_expression from column of padded matrix.
2019-11-07 11:35:07 +01:00
Hans-Kristian Arntzen
7b380a68d6
Merge pull request #1201 from KhronosGroup/fix-1199
...
HLSL: Improve error reporting for cbuffer layout mismatch
2019-11-06 14:16:44 +01:00
Hans-Kristian Arntzen
0b417b586a
HLSL: Report more explicitly which member failed validation.
...
This will be awkward to report in GLSL where we check multiple packing
standards, but for HLSL it should be easy since there's only CBuffer
packing standard to worry about.
2019-11-06 11:21:39 +01:00
Hans-Kristian Arntzen
e73d9bee38
HLSL: Report which cbuffer failed validation.
2019-11-06 11:05:31 +01:00
Hans-Kristian Arntzen
b56c2f4271
Merge branch 'deps' of git://github.com/dj2/SPIRV-Cross
2019-11-06 10:43:17 +01:00
Hans-Kristian Arntzen
d4ca91f6c2
Move .invalid. test shaders to the more appropriate subfolders.
2019-11-06 10:40:37 +01:00
Dan Sinclair
d409210ee5
Move all .invalid shaders into no-opt folders.
2019-11-05 13:19:19 -05:00
Dan Sinclair
79721eda12
Remove old reference shaders
2019-11-05 12:49:04 -05:00
Dan Sinclair
e5af41255c
Only run spirv-opt if the spirv is valid.
...
This CL updates the test runner to only run spirv-opt if the generated
SPIR-V is valid. If validation is skipped it's possible to hit aborts
and other memory errors in the optimizer as it assumes the SPIR-V is
valid.
2019-11-05 11:00:49 -05:00
Dan Sinclair
9da21c24a4
Roll GLSLang and SPIRV-Tools
...
This CL rolls the GLSLang and SPIRV-Tools dependencies to tip-of-tree
and updates the tests as required.
2019-11-05 10:07:15 -05:00
Hans-Kristian Arntzen
24f209eb93
Merge pull request #1195 from KhronosGroup/fix-1190
...
C API updates
2019-11-04 12:50:36 +01:00
Hans-Kristian Arntzen
8e42c1c4d3
Merge pull request #1194 from KhronosGroup/fix-1182
...
GLSL: Fix issue with array-of-array inputs in tess.
2019-11-04 11:29:19 +01:00
Hans-Kristian Arntzen
e8ed10d445
Add spvc_type_get_base_type_id.
...
Wraps SPIRType::self which is necessary for advanced reflection.
2019-11-04 10:53:09 +01:00
Hans-Kristian Arntzen
e9ad6398de
C API: Add missing boolean options.
2019-11-04 10:42:20 +01:00
Hans-Kristian Arntzen
a8d676f2e4
GLSL: Fix issue with array-of-array inputs in tess.
...
Only one dimension can be unsized and wrong dimension was used for
unrolling purposes.
2019-11-04 10:34:49 +01:00
Hans-Kristian Arntzen
ab1564f3c9
Merge pull request #1193 from kvark/patch-1
...
Avoid including stdexcept in no-exception environment
2019-11-01 19:54:55 +01:00
Dzmitry Malyshau
5b4a099395
Avoid including stdexcept in no-exception environment
2019-11-01 12:48:26 -04:00
Hans-Kristian Arntzen
d253f41e17
Merge pull request #1192 from kakashidinho/master
...
Added BUILD.gn file to be used by Chromium's ANGLE project
2019-11-01 12:41:08 +01:00
Le Hoang Quyen
369edcfe1d
Updated BUILD.gn's license to APACHE.
2019-11-01 17:37:02 +08:00
Le Hoang Quyen
8a01365f19
Added BUILD.gn file to be used by Chromium's ANGLE project
2019-10-31 23:23:01 +08:00
Hans-Kristian Arntzen
00189b19a5
Merge pull request #1188 from KhronosGroup/missing-reference-ue4
...
MSL: Add missing reference output.
2019-10-29 12:36:01 +01:00
Hans-Kristian Arntzen
cd94f0c37e
Merge pull request #1187 from KhronosGroup/fix-1186
...
Fix broken access tracking for OpFunctionCall results.
2019-10-29 12:16:09 +01:00
Hans-Kristian Arntzen
42e6ce073b
MSL: Add missing reference output.
2019-10-29 11:17:38 +01:00
Hans-Kristian Arntzen
e2155053c5
Fix broken access tracking for OpFunctionCall results.
...
We were looking at args[1] after incrementing args array, not before,
which means we tracked garbage.
This is also an out-of-bounds hazard.
2019-10-29 11:13:39 +01:00
Hans-Kristian Arntzen
40cc0a00df
MSL: Avoid some fallthrough warnings.
2019-10-28 15:20:38 +01:00
Hans-Kristian Arntzen
123fa906ec
Merge branch 'ue4-merge'
2019-10-28 15:14:42 +01:00
Hans-Kristian Arntzen
39bd5f1834
Run format_all.sh.
2019-10-28 12:55:14 +01:00
Hans-Kristian Arntzen
1d5eba67f8
MSL: Remove hacky workaround for patch constant passing.
...
There was a hack to workaround a bug in DXC where control point -> patch
constant phase was passed in Function storage, but we have to use
Workgroup here. We will not support these kinds of hacks for invalid
SPIR-V, so hack the reference files to use the "proper" fix and remove
the hack for time being.
2019-10-28 12:52:28 +01:00
Hans-Kristian Arntzen
8f13a3f4b1
MSL: Remove workaround for passing constant arrays to functions.
...
Arrays are value-types now, so remove the old workaround.
2019-10-28 12:14:43 +01:00
Hans-Kristian Arntzen
32bd1329b6
Remove another dead reference file.
2019-10-28 11:51:31 +01:00
Hans-Kristian Arntzen
8670f7cbab
Remove some more dead reference files.
2019-10-28 11:49:57 +01:00
Hans-Kristian Arntzen
b2c6362c4b
Remove another dead reference file.
2019-10-28 11:33:09 +01:00
Hans-Kristian Arntzen
93ceead289
Remove dead reference file.
2019-10-28 11:31:04 +01:00
Hans-Kristian Arntzen
e1919744e9
Hack some constants in UE4 tests.
...
Need to make output 100% exact for MSVC and GCC libc testing, but they are 1 ULP
off when converting fp32 to string in some weird corner cases.
Roundtrip should be correct though, but that outside the scope of
SPIRV-Cross.
2019-10-28 11:20:41 +01:00
Hans-Kristian Arntzen
648dfa5070
MSL: Ensure stable output for access chain CFG workarounds.
...
We had output dependent on complex_continue being set, but setting that
flag was dependent on unordered_set declaration order. Make it invariant
to ordering and change the implementation so it knows about the new
temporary hoisting for access chains.
2019-10-28 10:57:51 +01:00
Hans-Kristian Arntzen
ac8d335480
MSL: Fix integer cast.
2019-10-26 20:30:24 +02:00
Hans-Kristian Arntzen
fa011f8547
MSL: Declare arrays with proper type wrapper.
...
Need to construct with value type spvUnsafeArray<T, N>({ elem0, elem1 })
to make array initialization work in complex scenarios.
2019-10-26 17:57:34 +02:00
Hans-Kristian Arntzen
2745959646
MSL: Deal with chained access chains for tessellation IO variables.
...
Need to specially deal with this since we might have to split up access
chain and deal with indexing into IB struct.
2019-10-26 17:26:56 +02:00
Hans-Kristian Arntzen
e1acbd3dcf
MSL: Declare struct type explicitly.
...
Disambiguates initializer list.
2019-10-26 16:21:46 +02:00
Hans-Kristian Arntzen
1fc3347873
MSL: Fix array of array declaration.
...
Arrays-of-arrays were declared in wrong order.
2019-10-26 16:10:12 +02:00
Hans-Kristian Arntzen
27d6d45671
MSL: Rewrite tessellation_access_chain.
...
To support loading array of array properly in tessellation, we need a
rewrite of how tessellation access chains are handled.
The major change is to remove the implicit unflatten step inside
access_chain which does not take into account the case where you load
directly from a control point array variable.
We defer unflatten step until OpLoad time instead.
This fixes cases where we load array of {array,matrix,struct}.
Removes the hacky path for MSL access chain index workaround.
2019-10-26 16:10:12 +02:00
Hans-Kristian Arntzen
bac2c34590
MSL: Slight cleanup in emit_tessellation_access_chain.
...
Hoist out some conditionals and make it clear that we go into this path
if strip_array is used when declaring resources, i.e. there was no
explicit unflatten step.
2019-10-26 16:10:12 +02:00
Hans-Kristian Arntzen
d0953f6e4c
MSL: Do not declare variables which will not be unflattened.
...
Non-patch arrays of IO variables in tesc/tese have their array index
stripped, and access chains are specially handled, we shouldn't attempt
to create "normal" arrays of these.
2019-10-26 16:10:12 +02:00
Hans-Kristian Arntzen
028ffc26dd
MSL: Report tess input array failures more accurately.
...
We cannot dynamically index into an array of inputs at the moment. Do
not fail with opaque "bad cast" error.
2019-10-26 16:10:12 +02:00
Hans-Kristian Arntzen
f2eb940536
MSL: Revert hack with kBufferSizeBufferBinding
2019-10-26 16:10:12 +02:00
Hans-Kristian Arntzen
62c4eaa7bf
MSL: Remove stale code for TextureSwizzle.
...
Was probably added mistakenly during an old rebase.
2019-10-26 16:10:12 +02:00