Closed SRSaunders closed 1 month ago
After a bit of debugging, I believe the first one is a SPIRVCross defect. I patched in the old SPIRVCross (from MoltenVK 1.2.4) at commit 12542fc6fc05000e04742daf93892a0b10edbe80 to the most recent head of MoltenVK 1.2.9. I had to comment out a few newer msl options, but this did not seem to affect things for the descriptorindexing example. I now have a working example with this mashup. Note the newest SPRIVCross for SDK 1.3.283/MVK 1.2.9 does not fix it.
I have not done any research on the second issue above (oit example). Using the older SPIRVCross does not fix it.
Issue one (descriptorindexing) reported with additional data at the existing https://github.com/KhronosGroup/SPIRV-Cross/issues/2198
Issue two (oit) still not understood.
The oit example runs well up to SDK 1.3.275.0/MoltenVK 1.2.7, but fails on the current release (1.3.280.0/1):
-[MTLTextureDescriptorInternal validateWithDevice:]:1344: failed assertion `Texture Descriptor Validation MTLTextureUsage has unknown bits 0x20.
What OS? More specifically, what version?
OS is Ventura 13.6.6 (on x86) with Xcode 15.2. GPU is AMD Radeon 6600 (Metal Tier 2).
OS is Ventura 13.6.6 (on x86) with Xcode 15.2. GPU is AMD Radeon 6600 (Metal Tier 2).
The bit 0x20 is MTLTextureUsageShaderAtomic
, which wasn't introduced until Sonoma. We shouldn't be using that bit prior to Sonoma.
The descriptorindexing example runs well on Vulkan SDK 1.3.250.1/MoltenVK 1.2.4, but fails on any later release... /clip/ ...The first of these may be a duplicate of https://github.com/KhronosGroup/MoltenVK/issues/2180, but I just wanted to report them here to make sure the MoltenVK team is aware.
Thanks for submitting this as an issue affecting a known sample app! It made it much easier to track down!
PR #2231 fixes this part of this issue.
OS is Ventura 13.6.6 (on x86) with Xcode 15.2. GPU is AMD Radeon 6600 (Metal Tier 2).
The bit 0x20 is
MTLTextureUsageShaderAtomic
, which wasn't introduced until Sonoma. We shouldn't be using that bit prior to Sonoma.
@SRSaunders Can you try changing:
to include , _shouldSupportAtomics && getPhysicalDevice()->useNativeTextureAtomics());
(and maybe put a couple of line-returns as needed to make the line not so far off to the right), and then retest, please?
Fantastic! Both issues are solved for me now.
For issue one (arg buffer padding), I checked out https://github.com/KhronosGroup/SPIRV-Cross/commit/e41d79fe8fae3b950253e4da6527c34bc93b13dd and rebuilt the External Dependencies project, followed by the MoltenVK project. The descriptorindexing example is now working fine.
For issue two (MTLTextureUsageShaderAtomic
), I added your additional code and rebuilt MoltenVK. The oit example is now working again.
Thanks for jumping on these and solving so quickly.
For issue two (
MTLTextureUsageShaderAtomic
), I added your additional code and rebuilt MoltenVK. The oit example is now working again.
Wonderful! Thanks for testing.
I'll make that simple change here and run CTS to see if it breaks anything, then I'll issue a PR.
For issue two (
MTLTextureUsageShaderAtomic
), I added your additional code and rebuilt MoltenVK. The oit example is now working again.Wonderful! Thanks for testing.
I'll make that simple change here and run CTS to see if it breaks anything, then I'll issue a PR.
The updated PR #2231 now also fixes this part of this issue.
I have now tested against the new merged PR and the Vulkan examples work well. Thanks again.
Closing issue.
I have been working on updating macOS and iOS support and fixing a few defects that I found in Sascha Willems' Vulkan examples repository. See https://github.com/SaschaWillems/Vulkan/pull/1117 and https://github.com/SaschaWillems/Vulkan/pull/1119. During this work I observed two examples that expose what appear to regressions across MoltenVK releases:
• The descriptorindexing example runs well on Vulkan SDK 1.3.250.1/MoltenVK 1.2.4, but fails on any later release with:
• The oit example runs well up to SDK 1.3.275.0/MoltenVK 1.2.7, but fails on the current release (1.3.280.0/1):
The first of these may be a duplicate of #2180, but I just wanted to report them here to make sure the MoltenVK team is aware.