godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.23k stars 21.22k forks source link

Vulkan: SDFGI doesn't render on macOS (Intel/AMD/NVIDIA) #63149

Open salcodes1 opened 2 years ago

salcodes1 commented 2 years ago

Godot version

v4.0.alpha12.official [2c11e6d9e]

System information

macOS 12.1, MBP 15" 2018, Vulkan Clustered

Issue description

After enabling GI from the lighting and environment preview panel, the GI doesn't seem to work, and errors are outputted to the log.

image

Log output

Godot Engine v4.0.alpha12.official (c) 2007-2022 Juan Linietsky, Ariel Manzur & Godot Contributors.
  modules/gltf/register_types.cpp:92 - FBX file import is enabled, but no FBX2glTF path is configured. FBX files will not be imported.
--- Debug adapter server started ---
--- GDScript language server started ---
Switch Scene Tab
  drivers/vulkan/vulkan_context.cpp:159 -  - Message Id Number: 0 | Message Id Name: 
    VK_ERROR_FORMAT_NOT_SUPPORTED: VkFormat VK_FORMAT_R4G4B4A4_UNORM_PACK16 is not supported on this device.
    Objects - 1
        Object[0] - VK_OBJECT_TYPE_PHYSICAL_DEVICE, Handle 140635496947736
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  drivers/vulkan/vulkan_context.cpp:159 -  - Message Id Number: 0 | Message Id Name: 
    VK_ERROR_FORMAT_NOT_SUPPORTED: VkFormat VK_FORMAT_R4G4B4A4_UNORM_PACK16 is not supported on this device.
    Objects - 1
        Object[0] - VK_OBJECT_TYPE_PHYSICAL_DEVICE, Handle 140635496947736
  drivers/vulkan/vulkan_context.cpp:159 -  - Message Id Number: 0 | Message Id Name: 
    VK_ERROR_FORMAT_NOT_SUPPORTED: VkFormat VK_FORMAT_R4G4B4A4_UNORM_PACK16 is not supported on this device.
    Objects - 1
        Object[0] - VK_OBJECT_TYPE_PHYSICAL_DEVICE, Handle 140635496947736
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  Storage buffer supplied (binding: 1) must provide one ID (0 provided).
  ./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129 - Condition "rid.is_null()" is true. Returning: rid
  drivers/vulkan/rendering_device_vulkan.cpp:7411 - Condition "!uniform_set" is true.
  drivers/vulkan/vulkan_context.cpp:159 -  - Message Id Number: 0 | Message Id Name: 
    VK_ERROR_FORMAT_NOT_SUPPORTED: VkFormat VK_FORMAT_R4G4B4A4_UNORM_PACK16 is not supported on this device.
    Objects - 1
        Object[0] - VK_OBJECT_TYPE_PHYSICAL_DEVICE, Handle 140635496947736

Steps to reproduce

Minimal reproduction project

No response

Calinou commented 2 years ago

MBP 15" 2018

I remember reading somewhere that SDFGI could only be supported on M1/M2 GPUs due to hardware + MoltenVK limitations. cc @bruvzg

fabriceci commented 2 years ago

I just had a similar problem, when I activated SDFGI or SSAO, the meshes disappear from the screen.

Now I don't know why but the problem doesn't happen again, I have an error but it seems to work (on a 2018 mac).

@bruvzg if you need information don't hesitate, here is the error I have:

Screenshot 2022-07-29 at 21 07 01 Screenshot 2022-07-29 at 21 07 04

[mvk-error] VK_ERROR_FORMAT_NOT_SUPPORTED: VkFormat VK_FORMAT_R4G4B4A4_UNORM_PACK16 is not supported on this device.
ERROR:  - Message Id Number: 0 | Message Id Name:
    VK_ERROR_FORMAT_NOT_SUPPORTED: VkFormat VK_FORMAT_R4G4B4A4_UNORM_PACK16 is not supported on this device.
    Objects - 1
        Object[0] - VK_OBJECT_TYPE_PHYSICAL_DEVICE, Handle 140496299261976
   at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:171)
ERROR: Storage buffer supplied (binding: 1) must provide one ID (0 provided).
   at: uniform_set_create (drivers/vulkan/rendering_device_vulkan.cpp:6083)
ERROR: Condition "rid.is_null()" is true. Returning: rid
   at: _allocate_from_uniforms (./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129)
ERROR: Condition "!uniform_set" is true.
   at: draw_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7561)
ERROR: Storage buffer supplied (binding: 1) must provide one ID (0 provided).
   at: uniform_set_create (drivers/vulkan/rendering_device_vulkan.cpp:6083)
ERROR: Condition "rid.is_null()" is true. Returning: rid
   at: _allocate_from_uniforms (./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129)
ERROR: Condition "!uniform_set" is true.
   at: draw_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7561)
ERROR: Storage buffer supplied (binding: 1) must provide one ID (0 provided).
   at: uniform_set_create (drivers/vulkan/rendering_device_vulkan.cpp:6083)
ERROR: Condition "rid.is_null()" is true. Returning: rid
   at: _allocate_from_uniforms (./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129)
ERROR: Condition "!uniform_set" is true.
   at: draw_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7561)
ERROR: Storage buffer supplied (binding: 1) must provide one ID (0 provided).
   at: uniform_set_create (drivers/vulkan/rendering_device_vulkan.cpp:6083)
ERROR: Condition "rid.is_null()" is true. Returning: rid
   at: _allocate_from_uniforms (./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129)
ERROR: Condition "!uniform_set" is true.
   at: draw_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7561)
ERROR: Storage buffer supplied (binding: 1) must provide one ID (0 provided).
   at: uniform_set_create (drivers/vulkan/rendering_device_vulkan.cpp:6083)
ERROR: Condition "rid.is_null()" is true. Returning: rid
   at: _allocate_from_uniforms (./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129)
ERROR: Condition "!uniform_set" is true.
   at: draw_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7561)
ERROR: Storage buffer supplied (binding: 1) must provide one ID (0 provided).
   at: uniform_set_create (drivers/vulkan/rendering_device_vulkan.cpp:6083)
ERROR: Condition "rid.is_null()" is true. Returning: rid
   at: _allocate_from_uniforms (./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129)
ERROR: Condition "!uniform_set" is true.
   at: draw_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7561)
[mvk-error] VK_ERROR_FORMAT_NOT_SUPPORTED: VkFormat VK_FORMAT_R4G4B4A4_UNORM_PACK16 is not supported on this device.
ERROR:  - Message Id Number: 0 | Message Id Name:
    VK_ERROR_FORMAT_NOT_SUPPORTED: VkFormat VK_FORMAT_R4G4B4A4_UNORM_PACK16 is not supported on this device.
    Objects - 1
        Object[0] - VK_OBJECT_TYPE_PHYSICAL_DEVICE, Handle 140496299261976
   at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:171)
[mvk-error] VK_ERROR_FORMAT_NOT_SUPPORTED: VkFormat VK_FORMAT_R4G4B4A4_UNORM_PACK16 is not supported on this device.
ERROR:  - Message Id Number: 0 | Message Id Name:
    VK_ERROR_FORMAT_NOT_SUPPORTED: VkFormat VK_FORMAT_R4G4B4A4_UNORM_PACK16 is not supported on this device.
    Objects - 1
        Object[0] - VK_OBJECT_TYPE_PHYSICAL_DEVICE, Handle 140496299261976
   at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:171)
[mvk-error] VK_ERROR_FORMAT_NOT_SUPPORTED: VkFormat VK_FORMAT_R4G4B4A4_UNORM_PACK16 is not supported on this device.
ERROR:  - Message Id Number: 0 | Message Id Name:
    VK_ERROR_FORMAT_NOT_SUPPORTED: VkFormat VK_FORMAT_R4G4B4A4_UNORM_PACK16 is not supported on this device.
    Objects - 1
        Object[0] - VK_OBJECT_TYPE_PHYSICAL_DEVICE, Handle 140496299261976
   at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:171)
Calinou commented 2 years ago

See https://github.com/godotengine/godot/pull/63589 which may be related to this.

snougo commented 2 years ago

it's now working but not the way we want in Godot4 beta5 and beta4

https://user-images.githubusercontent.com/64188282/202373934-35c3dcf7-42f9-4834-89f6-febad7e35347.mov