Forum

Author Topic: VK Error when creating textures in 1.8  (Read 3932 times)

bgreenstone

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
VK Error when creating textures in 1.8
« 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)


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: 1.8 beta ERROR_INITIALIZATION_FAILED
« Reply #1 on: November 02, 2021, 12:45:51 PM »
Hello bgreenstone,

Which OS version is installed on your MacBook Pro M1?
Best regards,
Alexey Pasumansky,
Agisoft LLC

bgreenstone

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Re: 1.8 beta ERROR_INITIALIZATION_FAILED
« Reply #2 on: November 02, 2021, 01:18:18 PM »
MacOS 12.0.1

bgreenstone

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
VK Error when creating textures in 1.8
« Reply #3 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.


Paulo

  • Hero Member
  • *****
  • Posts: 1303
    • View Profile
Re: VK Error when creating textures in 1.8
« Reply #4 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...
« Last Edit: January 08, 2022, 04:47:55 AM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor

bgreenstone

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Re: VK Error when creating textures in 1.8
« Reply #5 on: January 08, 2022, 05:37:46 AM »
MacBook Pro M1 Max

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: VK Error when creating textures in 1.8
« Reply #6 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.
Best regards,
Alexey Pasumansky,
Agisoft LLC

ruudstelten

  • Newbie
  • *
  • Posts: 2
    • View Profile
M1 Pro issue
« Reply #7 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!

ruudstelten

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: VK Error when creating textures in 1.8
« Reply #8 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...