Skip to content
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

VK_ERROR_INITIALIZATION_FAILED: Shader library compile failed #13

Open
ExtreLin opened this issue Mar 23, 2022 · 6 comments
Open

VK_ERROR_INITIALIZATION_FAILED: Shader library compile failed #13

ExtreLin opened this issue Mar 23, 2022 · 6 comments

Comments

@ExtreLin
Copy link

When running on macOS Monterey we get this error.
program_source:38:174: error: cannot reserve 'texture' resource locations at index 0
fragment void main0(main0_in in [[stage_in]], device _66& _68 [[buffer(2)]], device _101& _103 [[buffer(3)]], constant _20& _22 [[buffer(4)]], array<texture2d, 1024> _19 [[texture(0)]], array<sampler, 1024> _19Smplr [[sampler(0)]])
^
program_source:38:215: error: cannot reserve 'sampler' resource locations at index 0
fragment void main0(main0_in in [[stage_in]], device _66& _68 [[buffer(2)]], device _101& _103 [[buffer(3)]], constant _20& _22 [[buffer(4)]], array<texture2d, 1024> _19 [[texture(0)]], array<sampler, 1024> _19Smplr [[sampler(0)]])

macbook pro m1.

@AdamYuan
Copy link
Owner

AdamYuan commented Mar 23, 2022

KhronosGroup/MoltenVK#1174
It seems that MoltenVK do not support more than 16 samplers. I'll try to reduce the default sampler count in voxelizer.frag and see if it could work.

@AdamYuan AdamYuan reopened this Mar 25, 2022
@AdamYuan
Copy link
Owner

I tried to change the default sampler count to 1, please check whether this (https://github.com/AdamYuan/SparseVoxelOctree/suites/5794061208/artifacts/193446487) could work.

@ExtreLin
Copy link
Author

ExtreLin commented Apr 6, 2022

also has error
[mvk-error] VK_ERROR_INITIALIZATION_FAILED: Render pipeline compile failed (Error code 3):
Fragment input(s) user(locn1) mismatching vertex shader output type(s) or not written by vertex shader.

@ExtreLin
Copy link
Author

ExtreLin commented Apr 6, 2022

I tried to change the default sampler count to 1, please check whether this (https://github.com/AdamYuan/SparseVoxelOctree/suites/5794061208/artifacts/193446487) could work.

seems to be a syntax error(not match the input and output)

@AdamYuan
Copy link
Owner

AdamYuan commented Apr 6, 2022

感觉像是Spirv-Cross的bug
能设置这几个环境变量再看看程序输出吗

MVK_CONFIG_LOG_LEVEL=2
MVK_DEBUG=1

@ExtreLin
Copy link
Author

ExtreLin commented Apr 6, 2022

感觉像是Spirv-Cross的bug 能设置这几个环境变量再看看程序输出吗

MVK_CONFIG_LOG_LEVEL=2
MVK_DEBUG=1

没有其他输出,还是我上面给你的错误提示。
lin-pc@lin-pcdeMacBook-Pro bin % echo $MVK_CONFIG_LOG_LEVEL
2
lin-pc@lin-pcdeMacBook-Pro bin % echo $MVK_DEBUG
1
lin-pc@lin-pcdeMacBook-Pro bin % ./SparseVoxelOctree
[15:50:20.198] [info] [thread 167747] Physical Device: Apple M1
[15:50:20.198] [info] [thread 167747] Present Queue: (0)0x600001b144e8, Main Queue: (0)0x600001b144e8, Loader Queue: (1)0x600001b14438, PathTracer Queue: (1)0x600001b14438
[15:50:28.454] [info] [thread 168048] Enter loader thread
[15:50:28.460] [info] [thread 168048] Meshes loaded from /Users/lin-pc/Downloads/coca-cola/coca-cola.obj
[15:50:28.461] [info] [thread 168048] Mesh optimized (874/3060 vertices)
[15:50:28.470] [info] [thread 168048] Vertex and Index buffers generated
[15:50:28.499] [info] [thread 168049] Texture /Users/lin-pc/Downloads/coca-cola/coca-cola.jpg loaded
[15:50:28.501] [info] [thread 168048] 1 textures loaded
[mvk-error] VK_ERROR_INITIALIZATION_FAILED: Render pipeline compile failed (Error code 3):
Fragment input(s) user(locn1) mismatching vertex shader output type(s) or not written by vertex shader.
zsh: segmentation fault ./SparseVoxelOctree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants