Hans-Kristian Arntzen
17ad62eea4
MSL: Support edge case with DX layout in scalar block layout.
...
DX may emit ArrayStride and MatrixStride of 16, but the size of the
object does not align with that and expect to pack other members inside
its last member.
The workaround is to emit array size/col/row one less than we expect and
rely on padding to carve out a "dead zone" for the last member.
2020-04-20 15:29:24 +02:00
Hans-Kristian Arntzen
f38cbeb814
Merge pull request #1330 from KhronosGroup/fix-1320
...
MSL: Allow removing clip distance user varyings.
2020-04-20 13:23:19 +02:00
Hans-Kristian Arntzen
ebf463674d
MSL: Allow removing clip distance user varyings.
...
Only safe if user knows that subsequent shader stage will not read clip
distance.
2020-04-20 09:58:40 +02:00
Hans-Kristian Arntzen
aa5fbc004b
Merge pull request #1329 from godlikepanos/master
...
Reflection: Add specialization constant name
2020-04-18 23:34:22 +02:00
Panagiotis Christopoulos Charitos
b3109b8ad0
Reflection: Add specialization constant name
...
Fixes #1311
2020-04-18 22:00:36 +02:00
Hans-Kristian Arntzen
90198199df
Merge pull request #1324 from cdavis5e/msl-disabled-builtin-names
...
MSL: Force disabled fragment builtins to have the right name.
2020-04-16 10:26:40 +02:00
Chip Davis
96f7008aa8
MSL: Force disabled fragment builtins to have the right name.
...
DXVK emits SPIR-V where fragment shader builtins have names derived from
DXBC assembly, e.g. `oDepth` for `FragDepth`. When we declared the
disabled output, we used this name, but when referencing it, we
continued to use the GLSL name. This breaks compilation.
2020-04-15 19:25:18 -05:00
Hans-Kristian Arntzen
fbc560782c
Merge pull request #1323 from cdavis5e/msl-disable-frag-only
...
MSL: Only disable output variables in fragment shaders.
2020-04-15 20:29:39 +02:00
Chip Davis
495e48de44
MSL: Only disable output variables in fragment shaders.
...
Forgot to do this in #1319 .
Fixes #1322 .
2020-04-15 12:14:57 -05:00
Hans-Kristian Arntzen
54658d6255
Merge pull request #1319 from cdavis5e/msl-frag-outputs
...
MSL: Add options to control emission of fragment outputs.
2020-04-14 10:17:01 +02:00
Chip Davis
b29f83c383
MSL: Add options to control emission of fragment outputs.
...
Like with `point_size` when not rendering points, Metal complains when
writing to a variable using the `[[depth]]` qualifier when no depth
buffer be attached. In that case, we must avoid emitting `FragDepth`,
just like with `PointSize`.
I assume it will also complain if there be no stencil attachment and the
shader write to `[[stencil]]`, or it write to `[[color(n)]]` but there
be no color attachment at n.
2020-04-13 15:29:11 -05:00
Hans-Kristian Arntzen
fcbc590937
Merge pull request #1316 from Malacath-92/master
...
Improve compatibility with clang-cl
2020-04-09 18:19:53 +02:00
Hanno
4560ee24fd
Improve compatibility with clang-cl
2020-04-09 17:30:20 +02:00
Hans-Kristian Arntzen
a1d9b474b5
Merge pull request #1314 from KhronosGroup/fix-1313
...
MSL: Do not use base expression with PhysicalTypeID OpCompositeExtract.
2020-04-07 19:31:45 +02:00
Hans-Kristian Arntzen
c7b75a8fe6
MSL: Do not use base expression with PhysicalTypeID OpCompositeExtract.
...
Similar reasoning as packed expressions.
2020-04-07 18:25:44 +02:00
Hans-Kristian Arntzen
6637610b16
Merge pull request #1309 from KhronosGroup/fix-1305
...
Expose query if a resource was used as a comparison/depth resource
2020-04-03 17:47:22 +02:00
Hans-Kristian Arntzen
941cceedb4
Expose a query if samplers or images are comparison resources.
2020-04-03 17:43:42 +02:00
Hans-Kristian Arntzen
b691b7d1e3
Do not add NonWritable/NonReadable decorations for regular images.
2020-04-03 17:43:42 +02:00
Hans-Kristian Arntzen
14f24d71ab
Merge pull request #1308 from KhronosGroup/fix-1306
...
HLSL: Add support for treating NonWritable UAV texture as SRV instead.
2020-04-03 17:42:56 +02:00
Hans-Kristian Arntzen
cfcd84319b
Merge pull request #1310 from KhronosGroup/msl-force-declare-implicit-builtins
...
MSL: Deal with cases where builtin is implicitly needed, declared, but unused
2020-04-03 17:41:09 +02:00
Hans-Kristian Arntzen
d9d3359ffb
MSL: Deal with cases where builtin is implicitly needed, declared, but unused.
...
We need to make sure any builtins which are declared and unused are
emitted as active variables.
2020-04-03 12:50:21 +02:00
Hans-Kristian Arntzen
01cee74b02
Merge pull request #1307 from troughton/patch-1
...
MSL: mark BuiltInFragCoord as implicitly used for subpass reads
2020-04-03 12:39:30 +02:00
Hans-Kristian Arntzen
28bf9057df
HLSL: Add support for treating NonWritable UAV texture as SRV instead.
2020-04-03 11:50:50 +02:00
Thomas Roughton
4cf736d753
MSL: mark BuiltInFragCoord as implicitly used for subpass reads
...
Without this patch, `gl_FragCoord` is not output for subpass reads in certain cases where `gl_FragCoord` is not used elsewhere in the shader.
I'm not sure why this isn't caught by existing tests (e.g. [input-attachment.frag](shaders-msl/frag/input-attachment.frag)), but I encountered this issue in code generated by DXC and passed through spire-opt.
2020-04-03 14:32:31 +13:00
Hans-Kristian Arntzen
e58e8d5dbe
Merge pull request #1303 from KhronosGroup/fix-1302
...
MSL: Fix access chain for deep struct hierarchy on array of buffers.
2020-03-31 17:25:53 +02:00
Hans-Kristian Arntzen
3cb6aeb480
MSL: Fix access chain for deep struct hierarchy on array of buffers.
2020-03-31 14:17:29 +02:00
Hans-Kristian Arntzen
84ec99c531
Merge pull request #1301 from dj2/roll_deps
...
Roll GLSLang, SPIRV-Tools and SPIRV-Headers
2020-03-30 21:58:28 +02:00
dan sinclair
32307df73a
Roll GLSLang, SPIRV-Tools and SPIRV-Headers
...
This CL rolls the various dependencies and updates tests as needed.
2020-03-30 11:03:43 -04:00
Hans-Kristian Arntzen
9b3c5e12be
Merge pull request #1299 from KhronosGroup/fix-1298
...
Add support for forcefully zero-initialized variables.
2020-03-26 17:58:27 +01:00
Hans-Kristian Arntzen
b8905bbd95
Add support for forcefully zero-initialized variables.
...
Useful to better support certain platforms which require all variables
to be initialized to something.
2020-03-26 13:38:27 +01:00
Hans-Kristian Arntzen
871c85d7f0
Merge pull request #1297 from KhronosGroup/fix-1295
...
GLSL: Implement GL_EXT_shader_framebuffer_fetch.
2020-03-19 16:19:19 +01:00
Hans-Kristian Arntzen
04e877df12
GLSL: Implement GL_EXT_shader_framebuffer_fetch.
2020-03-19 14:53:39 +01:00
Hans-Kristian Arntzen
c2655ab291
Run format_all.sh.
2020-03-19 14:22:49 +01:00
Hans-Kristian Arntzen
c3d216c011
Merge pull request #1296 from KhronosGroup/fix-1292
...
Fix nonuniform qualifier with atomics
2020-03-19 13:29:19 +01:00
Hans-Kristian Arntzen
05004a57ea
GLSL/HLSL: Fix nonuniform qualifier for SSBO atomics.
2020-03-19 12:05:27 +01:00
Hans-Kristian Arntzen
a3d3c80dd7
GLSL/HLSL: Implement nonuniform qualifier for image atomics.
2020-03-19 11:35:29 +01:00
Hans-Kristian Arntzen
65aa0c35d6
include/spirv_cross: Fix typo.
2020-03-10 10:52:27 +01:00
Hans-Kristian Arntzen
7d42fd7f7b
Merge pull request #1290 from KhronosGroup/fix-1289
...
HLSL: Do not emit globallycoherent for SRV ByteAddressBuffer.
2020-03-05 12:23:40 +01:00
Hans-Kristian Arntzen
185551bfaf
HLSL: Do not emit globallycoherent for SRV ByteAddressBuffer.
2020-03-05 10:37:36 +01:00
Hans-Kristian Arntzen
d19f30a90e
Merge pull request #1287 from KhronosGroup/read-write-decoration-tweaks
...
Improve handling of readonly/writeonly flags in some cases
2020-03-04 17:43:14 +01:00
Hans-Kristian Arntzen
95cd20f1c7
Add test for disable-storage-image-qualifier-deduction.
2020-03-04 16:42:31 +01:00
Hans-Kristian Arntzen
c27e1efbf1
HLSL: Add option to always treat SSBO as UAV, even with readonly.
...
This can make codegen more predictable since ByteAddressBuffer is SRV
and not UAV.
2020-03-04 16:42:31 +01:00
Hans-Kristian Arntzen
01968c4486
Add option to disable storage image qualifier deduction.
2020-03-04 16:42:31 +01:00
Hans-Kristian Arntzen
3ebc83da46
Remove old hack which forces NonWritable/NonReadable.
...
Somehow this has been lingering in the code base and effectively ignores
readonly/writeonly decoration declared by the shader.
2020-03-04 16:42:31 +01:00
Hans-Kristian Arntzen
9deb6ffbba
Merge pull request #1285 from KhronosGroup/vulkan-semantics-shorthand
...
Add -V alias for --vulkan-semantics.
2020-03-02 14:19:51 +01:00
Hans-Kristian Arntzen
3f2de0d5d3
Add -V alias for --vulkan-semantics.
2020-03-02 11:56:23 +01:00
Hans-Kristian Arntzen
c5f7b55756
Merge pull request #1284 from KhronosGroup/fix-1282
...
MSL: Reintroduce workarounds for arrays not being value types
2020-02-24 15:40:34 +01:00
Hans-Kristian Arntzen
16796e92be
MSL: Add C API for force native arrays.
2020-02-24 13:51:08 +01:00
Hans-Kristian Arntzen
d91e134500
MSL: Add native array test for composite array initialization.
2020-02-24 13:34:51 +01:00
Hans-Kristian Arntzen
30343f3e95
MSL: Reintroduce workaround for constant arrays being passed by value.
2020-02-24 13:22:52 +01:00