-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mvk-error] SPIR-V to MSL conversion error: Argument buffer resource base type could not be determined. #2198
Comments
I am having a similar problem with StructuredBuffer. Could it be related to |
Looks like it |
I'm experiencing the same problem, specifically for use of a StructuredBuffer -- other tests without that work fine. The sdk release version 261.1 works fine, but 268.1 breaks, so hopefully that helps to identify what changed to cause the problem? |
Is this perhaps the source of the problem? 255ff2b @HansKristian-Work ? I don't know anything about this particular extension but the error message references "tier 2" -- and there is some info about buffer sizing errors in the description here: https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GLSL_EXT_buffer_reference2.txt |
Not seeing repro SPIR-V here. |
I'm happy to report that the latest 1.3.275.0 version of the SDK works for me! |
I get the same error when running Sasha Willems' descriptorindexing example (see Vulkan) using the most recent SDK 1.3.280/MVK 1.2.8 as well as current head for the upcoming SDK 1.3.283/MoltenVK 1.2.9. This example last worked when using SDK 1.3.250/MoltenVK 1.2.4. [mvk-error] SPIR-V to MSL conversion error: Argument buffer resource base type could not be determined. When padding argument buffer elements, all descriptor set resources must be supplied with a base type by the app. Specifically, the SPIRVCross compiler fails when processing the descriptorindexing.frag.spv fragment shader from Sascha Willems' Vulkan repository. I have verified that using the old SPIRVCross compiler from SDK 1.3.250 with the most recent MoltenVK does not show the error, and works properly for the descriptorindexing example, i.e. the issue is not likely due to MoltenVK's msl compiler settings. Here is the log output of the failure using the current SPRIVCross master:
And now, here is the working version from SDK 1.3.250 (at SPIRVCross commit 12542fc):
|
PR #2320 should fix this. Please pull from SPIRV-Cross branch |
This solves the issue for Sascha Willems' descriptorindexing example (see Vulkan). Thanks for fixing. |
I was told to repost this
After I updated to the latest version of MVK I git the following error:
[mvk-error] SPIR-V to MSL conversion error: Argument buffer resource base type could not be determined. When padding argument buffer elements, all descriptor set resources must be supplied with a base type by the app.
[mvk-error] VK_ERROR_INVALID_SHADER_NV: Fragment shader function could not be compiled into pipeline. See previous logged error.`
The shader is written in hlsl, here are the relevent inputs:
[[vk::push_constant]]
struct rx_pushConstants {
uint instanceRefIndicies[6];
} rx_pushConstants;
[[vk::binding(0, 0)]] ByteAddressBuffer rx_staticResBlocks;
[[vk::binding(1, 0)]] ByteAddressBuffer rx_dynamicResBlocks;
[[vk::binding(2, 0)]] Texture2D rx_textures[];
[[vk::binding(3, 0)]] SamplerState rx_samplers[];
I use dxc to compile hlsl to spirv and MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS = 1
SpirvCross may does not like the ByteAddressBuffer? Is there a way around this problem without breaking my code?
Thanks for your help!
The text was updated successfully, but these errors were encountered: