Commit Graph

3025 Commits

Author SHA1 Message Date
Chip Davis
03ad13bae6 MSL: Simplify spvSubgroupBallot().
A bitcast to `uint2` will do just fine. I honestly don't know why I
didn't do it this way earlier.
2021-07-21 00:25:09 -05:00
Hans-Kristian Arntzen
6196e3b029 MSL: Remove redundant path for SampleMask. 2021-07-15 16:34:06 +02:00
Hans-Kristian Arntzen
2fcbef398c
Merge pull request #1709 from billhollings/fix-sample-mask-in
MSL: Adjust gl_SampleMaskIn for sample-shading and/or fixed sample mask.
2021-07-15 16:32:35 +02:00
Hans-Kristian Arntzen
fe08bf4af4 Remove EXPERIMENTAL from JSON reflection backend. 2021-07-15 16:21:58 +02:00
Bill Hollings
ebb5098def MSL: Adjust gl_SampleMaskIn for sample-shading and/or fixed sample mask.
Vulkan specifies that the Sample Mask Test occurs before fragment shading.
This means gl_SampleMaskIn should be influenced by both sample-shading and
VkPipelineMultisampleStateCreateInfo::pSampleMask.

CTS tests dEQP-VK.pipeline.multisample_shader_builtin.* bear this out.

For sample-shading, gl_SampleMaskIn should only have a single bit set,
Since Metal does not filter for this, apply a bitmask based on gl_SampleID.

For a fixed sample mask, since Metal is unaware of
VkPipelineMultisampleStateCreateInfo::pSampleMask, we need to ensure that
we apply it to both gl_SampleMaskIn and gl_SampleMask. This has the side
effect of a redundant application of pSampleMask if the shader already
includes gl_SampleMaskIn when setting gl_SampleMask, but I don't see an
easy way around this.

Also, simplify the logic for including the fixed sample mask in gl_ShaderMask,
and print the fixed sample mask as a hex value for readability of bits.
2021-07-13 21:22:13 -04:00
Hans-Kristian Arntzen
be3988b13c
Merge pull request #1706 from SpaceIm/fix/ios-bundle
CMake: fix cross-build to iOS/tvOS/watchOS
2021-07-13 13:23:48 +02:00
Hans-Kristian Arntzen
a70ce5192e
Merge pull request #1708 from KhronosGroup/fix-interpolant-access-chain
MSL: Add test for PR 1707
2021-07-13 13:23:36 +02:00
Hans-Kristian Arntzen
71b83a18f4 MSL: Add test for scalar access chain pull interpolant. 2021-07-13 12:25:18 +02:00
Hans-Kristian Arntzen
d42c0b2e08
Merge pull request #1707 from billhollings/fix-interpolant-access-chain
MSL: Fix setting SPIRVCrossDecorationInterpolantComponentExpr decoration.
2021-07-13 12:25:08 +02:00
Bill Hollings
3e04eee491 MSL: Fix setting SPIRVCrossDecorationInterpolantComponentExpr decoration.
When setting SPIRVCrossDecorationInterpolantComponentExpr decoration, take
into consideration a possible array of vectors in an access chain, and don't
apply the decoration until we traverse through the array into the vector itself.
2021-07-12 14:52:07 -04:00
SpaceIm
d74eaabde0 fix cross-build to iOS/tvOS/watchOS
see https://cmake.org/cmake/help/latest/policy/CMP0006.html
2021-07-11 15:22:43 +02:00
Hans-Kristian Arntzen
1ae2b58f19
Merge pull request #1700 from pkasting/master
Fix -Wunreachable-code-aggressive.
2021-06-30 22:16:02 +02:00
Hans-Kristian Arntzen
bf746bd680
Merge pull request #1699 from KhronosGroup/pervertexnv
GLSL: Support pervertexNV in NV barycentric extension.
2021-06-30 19:13:21 +02:00
Peter Kasting
7cdab07efe Fix -Wunreachable-code-aggressive.
Bug: chromium:1066980
2021-06-30 09:17:59 -07:00
Hans-Kristian Arntzen
206ee8f171 GLSL: Support pervertexNV in NV barycentric extension. 2021-06-30 16:27:46 +02:00
Hans-Kristian Arntzen
c5b8022e61
Merge pull request #1669 from KhronosGroup/1560-reuse1
Make repository REUSE compliant and check licenses in CI
2021-06-29 11:52:33 +02:00
Hans-Kristian Arntzen
54882ad16d Add GLSL.std.450.h to REUSE. 2021-06-29 11:03:52 +02:00
Jon Leech
3781d49d7c .gitignore ignored new license text 2021-06-29 11:03:52 +02:00
Jon Leech
c862f8d22d Actually checkout repo into new reuse job 2021-06-29 11:03:52 +02:00
Jon Leech
f2a65545b8 Finish adding SPDX tags and setup a reuse checked in Github Actions CI 2021-06-29 11:03:52 +02:00
Jon Leech
2ceca64004 Add missing copyright headers. 2021-06-29 11:03:38 +02:00
Hans-Kristian Arntzen
853e84e8bf
Merge pull request #1698 from KhronosGroup/fix-1691
HLSL: Rewrite how block IO is emitted.
2021-06-29 10:56:34 +02:00
Hans-Kristian Arntzen
d6b29ab017 HLSL: Rewrite how block IO is emitted.
Emit block members directly in the IO structs and sort them.
Ensures we can get some kind of stable order between stages.

To complete the story, we'll need to be able to inject unused inputs /
builtins, or eliminate unused outputs (probably easiest solution).
2021-06-28 15:04:49 +02:00
Hans-Kristian Arntzen
9338996f3b
Merge pull request #1697 from KhronosGroup/fix-1693
GLSL: Emit num_views for OVR_multiview2.
2021-06-28 14:26:29 +02:00
Hans-Kristian Arntzen
3149095585
Merge pull request #1696 from KhronosGroup/fix-1694
Handle SPIR-V 1.4 selection constructs.
2021-06-28 13:03:06 +02:00
Hans-Kristian Arntzen
d75666b170 GLSL: Emit num_views for OVR_multiview2. 2021-06-28 12:56:27 +02:00
Hans-Kristian Arntzen
8216e87f02 Handle SPIR-V 1.4 selection constructs.
Fix bug in to_trivial_mix_op, where we made a pre-1.4 assumption that
component count of selector is equal to value component count.
2021-06-28 12:23:44 +02:00
Hans-Kristian Arntzen
9cdeefb5e3
Merge pull request #1692 from Kangz/fix_default_copy_dtor
Fix IVariant -Wdeprecated-copy-with-dtor
2021-06-21 14:53:13 +02:00
Corentin Wallez
6a85c695cc Fix IVariant -Wdeprecated-copy-with-dtor
Since C++11 the generation of implicit copy constructor is deprecated if
the type has a user-defined constructor or destructor (even if defaulted).
Same thing for the implicit copy assignment operator.

Fix this by adding a defaulted copy-constructor for IVariant that remove
the implicit default constructor, so add it too.
2021-06-21 14:11:31 +02:00
Hans-Kristian Arntzen
2e1b5fb39e
Merge pull request #1686 from KhronosGroup/fix-1684
GLSL: Support control flow hints
2021-06-03 14:13:18 +02:00
Hans-Kristian Arntzen
fa42f1ce34
Merge pull request #1685 from KhronosGroup/fix-1683
Handle odd type for textureGather component.
2021-06-03 12:21:27 +02:00
Hans-Kristian Arntzen
449f68ef3b Ensure loop control flow hints only appear above loops. 2021-06-03 12:19:10 +02:00
Hans-Kristian Arntzen
d62b3c2b92 GLSL: Implement control flow hints. 2021-06-03 12:01:49 +02:00
Hans-Kristian Arntzen
165dbff228 Handle odd type for textureGather component. 2021-06-03 11:37:45 +02:00
Hans-Kristian Arntzen
585fc6f3cb MSL: Always enable support for base vertex/index on iOS.
No good reason to not just enable it in CLI.
2021-06-03 11:27:49 +02:00
Hans-Kristian Arntzen
a6ce49ca24
Merge pull request #1680 from xndcn/cc
Add comment after inf/nan float number for clarifying.
2021-05-27 11:56:54 +02:00
xndcn
02fb8f2a24 Add comment after inf/nan float number for clarifying. 2021-05-27 02:40:41 +08:00
Hans-Kristian Arntzen
ff61890722
Merge pull request #1679 from okuoku/fix-c-sample-code
Fix C sample code in README.md
2021-05-21 18:43:08 +02:00
okuoku
38c6ef1d56 Fix C sample code in README.md 2021-05-22 01:18:26 +09:00
Hans-Kristian Arntzen
faec1a8643
Merge pull request #1678 from KhronosGroup/fix-1674
MSL: Add CLI option for sampler suffix.
2021-05-21 17:37:02 +02:00
Hans-Kristian Arntzen
9ea0e8b859
Merge pull request #1677 from KhronosGroup/fix-1673
MSL: Improve handling of split tessellation access chains.
2021-05-21 17:22:48 +02:00
Hans-Kristian Arntzen
c87cb54499 MSL: Add CLI option for sampler suffix. 2021-05-21 16:47:41 +02:00
Hans-Kristian Arntzen
bf3793dd35 MSL: Improve handling of split tessellation access chains. 2021-05-21 16:32:03 +02:00
Hans-Kristian Arntzen
a6c9514856
Merge pull request #1676 from KhronosGroup/fix-1671
GLSL: Implement noncoherent framebuffer fetch.
2021-05-21 15:43:58 +02:00
Hans-Kristian Arntzen
0214990e7c
Merge pull request #1675 from KhronosGroup/fix-1670
MSL: Support array-of-component IO variables in vertex/fragment
2021-05-21 14:27:07 +02:00
Hans-Kristian Arntzen
26a4986009 GLSL: Implement noncoherent framebuffer fetch. 2021-05-21 14:22:57 +02:00
Hans-Kristian Arntzen
99ae0d32e9 MSL: Handle array with component when we cannot rely on user() attrib.
In these cases, we emit one variable per location, and so we must
flatten stuff.
2021-05-21 13:46:33 +02:00
Hans-Kristian Arntzen
a64ddcdd49 MSL: Handle array of IO variable with Component decoration. 2021-05-21 12:31:33 +02:00
Hans-Kristian Arntzen
418542eaef
Merge pull request #1668 from KhronosGroup/fix-1665
Implement NoContraction decoration
2021-05-07 13:51:24 +02:00
Hans-Kristian Arntzen
b8115ffbe0 HLSL: Implement invariant as precise.
Only option we have.
2021-05-07 13:15:55 +02:00