Agisoft Metashape

Agisoft Metashape => Bug Reports => Topic started by: bgreenstone on November 02, 2021, 04:37:21 AM

Title: VK Error when creating textures in 1.8
Post by: bgreenstone on November 02, 2021, 04:37:21 AM
Testing out the 1.8 beta on my new MacBook Pro M1 Max, and while everything worked fine I did see this error in the log output right at the end when it was generating the texture:

2021-11-01 20:24:31 Failed to initialize context. Reason: VK Error : VkResult is "ERROR_INITIALIZATION_FAILED" at line 66

It generated the texture just fine.  It seems to give this same error on both Orthophoto and Keep UV modes.  I didn't try any others to see if it does that for all of them.  However, running the exact same project on my old Mac Pro did not yield that error.  Here is more the log:

2021-11-01 20:24:31 Found 1 GPUs in 2.1e-05 sec (OpenCL: 1.7e-05 sec)
2021-11-01 20:24:31 Using device: Apple M1 Max, 32 compute units, 43690 MB global memory, OpenCL 1.2
2021-11-01 20:24:31   driver version: 1.2 1.0, platform version: OpenCL 1.2 (Oct  1 2021 19:40:58)
2021-11-01 20:24:31   max work group size 256
2021-11-01 20:24:31   max work item sizes [256, 256, 256]
2021-11-01 20:24:31   max mem alloc size 8192 MB
2021-11-01 20:24:31 Failed to initialize context. Reason: VK Error : VkResult is "ERROR_INITIALIZATION_FAILED" at line 66
2021-11-01 20:24:31 Done "load_model" in 0
2021-11-01 20:24:31 blending textures... ************************************ done in 4.91948 sec
2021-11-01 20:24:36 postprocessing atlas... done in 6.45553 sec
2021-11-01 20:24:43 Finished processing in 12.99 sec (exit code 1)

Title: Re: 1.8 beta ERROR_INITIALIZATION_FAILED
Post by: Alexey Pasumansky on November 02, 2021, 12:45:51 PM
Hello bgreenstone,

Which OS version is installed on your MacBook Pro M1?
Title: Re: 1.8 beta ERROR_INITIALIZATION_FAILED
Post by: bgreenstone on November 02, 2021, 01:18:18 PM
MacOS 12.0.1
Title: VK Error when creating textures in 1.8
Post by: bgreenstone on January 08, 2022, 02:04:04 AM
I saw this problem in the beta, but it's still spitting out this error message in the 1.8 release:

Failed to initialize context. Reason: VK Error : VkResult is "ERROR_INITIALIZATION_FAILED" at line 66

The textures still get created just fine, but I see that error in the log pretty much every time.

Title: Re: VK Error when creating textures in 1.8
Post by: Paulo on January 08, 2022, 04:46:09 AM
Hello bgreenstone,

what graphics card are you using? For older GPUs, texture blending using Vulkan technology (VK) cannot be accomplished as specified in following from https://agisoft.freshdesk.com/support/solutions/articles/31000150614-general-information-related-to-gpu-processing:
Quote
*** Texture blending support on GPU is using Vulkan technology. Currently GPU accelerated texture blending is supported only for frame camera type on NVIDIA cards since GeForce GTX 9XX / Quadro M4000 and driver versions from 435.xx and on AMD cards since Radeon R9 29x series / FirePro W9100 and 17.1.x drivers. Some older GPUs could also support texture blending using Vulkan, however, it is not guaranteed.
for older GPUs, texture blending will continue with CPU but slower...
Title: Re: VK Error when creating textures in 1.8
Post by: bgreenstone on January 08, 2022, 05:37:46 AM
MacBook Pro M1 Max
Title: Re: VK Error when creating textures in 1.8
Post by: Alexey Pasumansky on January 08, 2022, 08:44:36 PM
Hello Brian,

GPU-based texturing is not yet supported on Apple M1 in Metashape 1.8.0, so the texture blending is performed on CPU.
Title: M1 Pro issue
Post by: ruudstelten on May 01, 2022, 03:57:29 AM
Hey everyone,

I am trying to build a model using the latest version of Metashape (1.8.3.14298). I have a 2021 Macbook Pro with M1 Pro chip. I selected the chip's GPU in Preferences.

When building the texture, I get the following error message: "Failed to initialize context. Reason: Failed to load vulkan library!"

It then proceeds building the texture, but it does so extremely slow. I think it's only using the CPU in this case, and not the GPU. Can anyone help me figure out how to fix this?

Thanks!
Title: Re: VK Error when creating textures in 1.8
Post by: ruudstelten on June 29, 2022, 06:12:47 AM
Alexey,

Do you know when GPU-based texturing on Apple M1 will be available in Metashape? The entire process is super fast on M1, but texturing using CPU only takes a long time...